Cell API
    Preparing search index...

    Class McpServer

    The protocol side of an MCP server (JSON-RPC 2.0, tools only), without a transport: cell mcp feeds it lines from stdin, cell dev the bodies of POST /_cell/mcp. Tool calls run one at a time; a failing tool answers with isError and the CellError as JSON (docs/design/agent-first.md R5, R8).

    Index
    queue: Promise<unknown> = ...
    INVALID_PARAMS: -32602
    INVALID_REQUEST: -32600
    METHOD_NOT_FOUND: -32601
    PARSE_ERROR: -32700
    PROTOCOL_VERSIONS: string[] = ...
    • Parameters

      • method: string
      • params: Record<string, unknown>

      Returns Promise<unknown>

    • Handles one line or body of JSON; returns the response text, or undefined for a notification.

      Parameters

      • text: string

      Returns Promise<string | undefined>

    • Parameters

      • value: unknown
      • schema: Record<string, unknown>

      Returns string | undefined

    • Checks the arguments against the top level of the tool's JSON Schema: required properties, the type of each property (and of array items), enums, and unknown properties when additionalProperties is false. Returns the first problem, or undefined.

      Parameters

      • schema: Record<string, unknown>
      • args: Record<string, unknown>

      Returns string | undefined