CogniRelay

MCP Guide

This document describes CogniRelay’s MCP-facing surface and how it relates to the broader HTTP API.

Scope

CogniRelay exposes two machine-oriented integration styles:

The #216 runtime target is MCP 2025-11-25 Streamable HTTP with a temporary bounded posture. For startup compatibility, initialize accepts both MCP protocol versions 2025-06-18 and 2025-11-25; 2025-11-25 remains the preferred/latest version in examples and descriptor metadata.

The base posture remains tools-first. It does not add MCP resources, MCP prompts, SSE, or a broader compatibility transport. Runtime help/reference surfaces are post-bootstrap request methods, not tools.

Bootstrap Flow

For an MCP-oriented client, the canonical slice-2 bootstrap sequence is exactly:

  1. GET /.well-known/mcp.json
  2. POST /v1/mcp with {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25"}}

Standards-compliant clients may also include capabilities and clientInfo metadata:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2025-11-25",
    "capabilities": {},
    "clientInfo": {
      "name": "agent-client",
      "version": "1.0.0",
      "title": "Agent Client"
    }
  }
}

After initialize succeeds, normal MCP usage may call:

Clients may still send POST /v1/mcp with {"jsonrpc":"2.0","method":"notifications/initialized","params":{}}; CogniRelay accepts it as a notification-only compatibility call and returns 204.

The well-known descriptor advertises:

What MCP Exposes

The MCP tool catalog is broad. It covers the project’s substantive feature set, including:

In other words, the usable application capabilities are available through MCP tools.

Continuity enhancements via MCP tools

The post-#119 continuity enhancements are not separate MCP tools — they are parameters and response fields on existing tools. When calling continuity tools through MCP, pass the same parameters as the HTTP API:

Feature discovery: system.capabilities_v1

GET /v1/capabilities is exposed as the MCP tool system.capabilities_v1. It returns a versioned, machine-readable feature map — see API Surface for the response shape and feature registry.

This complements tools/list (which returns the available MCP tools and their schemas) with semantic feature discovery (which tells you what continuity, coordination, and integration capabilities the instance supports). Both are useful: tools/list answers “what can I call?”, system.capabilities_v1 answers “what does this instance support?”.

What MCP Does Not Mirror One-To-One

Not every HTTP endpoint appears as an MCP tool name. The main exclusions are transport and descriptor endpoints:

Those endpoints exist to describe or host the MCP bridge rather than to represent domain actions.

Tool Model

tools/list returns each tool with:

That metadata lets an agent understand both the MCP entrypoint and the underlying HTTP behavior without scraping the REST docs separately.

Slice 2 supports only the first tools/list page:

Tool-to-HTTP Mapping

MCP tools are adapters over the HTTP API. Examples:

For the complete runtime mapping, prefer tools/list and GET /v1/discovery/tools.

Auth and Authorization

tools/call uses the same bearer-token model as the HTTP API:

This means MCP is not a separate permission system. It is a protocol wrapper over the same authorization rules.

Response Shape

Successful tools/call requests return:

Clients should treat structuredContent as the authoritative machine-readable payload for those tool results.

The MCP help/reference surfaces are separate request methods, not tools:

Successful calls to those methods return top-level JSON-RPC result objects containing exactly:

Each structuredContent payload includes the canonical httpEquivalent help path plus the method-specific fields required by the runtime help contract. The onboarding and validation-limit methods mirror GET /v1/help/onboarding, GET /v1/help/onboarding/bootstrap, GET /v1/help/onboarding/sections/{id}, GET /v1/help/limits, and GET /v1/help/limits/{field_path}.

Error Behavior

The slice-2 runtime returns JSON-RPC errors for:

HTTP status handling is intentionally narrow:

Schedule validation failures raised before dispatch map to JSON-RPC -32602 with error.data.reason="schema validation failed" and the single schedule detail under error.data.detail. Schedule domain 404, 409, 422, and 503 failures after dispatch map to -32003 Tool execution failed with the HTTP detail preserved under error.data.detail. Degraded schedule reads/lists that return HTTP 200 remain JSON-RPC successes with structuredContent.ok=false and warning codes in the structured payload.

Recommendations