Documentation

MCP server

POST /mcp is a hand-rolled JSON-RPC 2.0 MCP server — no SDK, no sessions. Every request carries the same Bearer agw_… key; tools/list shows only what the key may call, and tools/call enforces the same scopes as the /v1 endpoints. Memory tools appear only for keys with memory scopes.

Tools

FieldscopeDescription
search_websearchWeb search — same pipeline as /v1/search (query, k?, lang?).
read_urlreadClean page text — the /v1/read fetch+extract engine (url).
researchsearchThe /v1/research evidence bundle (question, depth?).
remembermemory:writeStore items in private memory (items[]).
recallmemory:readSemantic memory search (query, k?).

Client setup

Point an MCP-aware client at the endpoint with your key — same config for Claude Desktop and Cursor (both speak streamable-http MCP):

claude_desktop_config.json
// Claude Desktop → claude_desktop_config.json
{
  "mcpServers": {
    "agent-gateway": {
      "url": "https://agw.orcanox.xyz/mcp",
      "headers": { "Authorization": "Bearer agw_…" }
    }
  }
}
mcp.json
// Cursor → ~/.cursor/mcp.json
{
  "mcpServers": {
    "agent-gateway": {
      "url": "https://agw.orcanox.xyz/mcp",
      "headers": { "Authorization": "Bearer agw_…" }
    }
  }
}
POST /mcp api-key #

Hand-rolled JSON-RPC 2.0 — no SDK, no sessions. Every request carries the same Bearer agw_… key; tools filter by the key's scopes. GET returns 405 Allow: POST. Methods: initialize, tools/list, tools/call, ping.

Request

FieldTypeDescription
jsonrpc'2.0'requiredAlways "2.0".
method'initialize' | 'tools/list' | 'tools/call' | 'ping'requiredinitialize | tools/list | tools/call | ping — notifications/* are accepted silently.
idstring | numberoptionalEchoed back in the response.
paramsobjectoptionalMethod params — tools/call takes {name, arguments}.

Example

curl -X POST https://agw.orcanox.xyz/mcp \
  -H "Authorization: Bearer agw_…" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id": 1,"method":"tools/list"}'

Response

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "protocolVersion": "2025-06-18",
    "capabilities": {
      "tools": {
        "listChanged": false
      }
    },
    "serverInfo": {
      "name": "agent-gateway",
      "version": "0.1.0"
    }
  }
}

Errors

StatuscodeExample
401-32001{"code":-32001,"message":"invalid api key"}
403-32003{"code":-32003,"message":"missing required scope: memory:write"}
405method_not_allowed{"code":"method_not_allowed","message":"POST only — MCP speaks JSON-RPC over POST"}