Cloud relay for KOReader MCP server - enables remote access via WebSocket bridge
This server exposes 8 tools with significant definition gaps. Most tools lack proper descriptions (register, poll, pong, status, verify-passcode, authorize are under 20 chars or missing context). Parameter descriptions are sparse or absent. Schemas are present but incomplete, many parameters lack type definitions or descriptions. The 'mcp' tool is inferred from package.json, not explicitly registered in source. Error handling is minimal. No tool annotations (readOnlyHint/destructiveHint). This is a relay/infrastructure server, not a user-facing tool suite, which explains some gaps, but definition quality remains well below production baseline.
OAuth authorization endpoint. Shows a login form where users enter the device ID and passcode from their KOReader device. Handles both GET (show form) and POST (submit credentials)
MCP client sends requests to the device via the relay. Requires OAuth Bearer token authentication. Queues request for device to poll or delivers to waiting device
Device long-polls for requests. Returns queued request immediately if available, otherwise blocks for up to 30 seconds waiting for a request or sends a ping
Device responds to ping with pong to keep connection alive
Device announces itself with device-generated credentials. First registration: device provides deviceId + passcodeHash. Re-registration: device provides same deviceId + passcodeHash (must match stored)
Device sends response to a request. Delivers the response to the waiting MCP client
Get device connection status. Returns online status, device name, connection time, and last activity
poll, pong, status tools have empty or minimal input schemas. poll and pong accept no parameters but schema is not documented as empty object with description.
Missing parameter descriptions for critical fields. 'poll' has no description of what it returns or when to call it. 'status' lacks detail on response structure.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Tools like 'register' and 'response' modify state but lack destructiveHint. 'poll' and 'status' are read-only but lack readOnlyHint.
Error handling is minimal. No recovery guidance in descriptions. E.g., 'verify-passcode' returns 401 on invalid passcode but does not guide the agent on retry or user notification.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 44 | <=2025-11-25 | v2 |
Internal endpoint for OAuth authorization flow. Called by the auth handler to verify device passcode during OAuth flow. Returns 200 OK if valid, 401 if invalid
'mcp' tool is inferred from package.json and index.ts, not explicitly registered with schema in relay.ts.