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
| Field | scope | Description |
|---|---|---|
search_web | search | Web search — same pipeline as /v1/search (query, k?, lang?). |
read_url | read | Clean page text — the /v1/read fetch+extract engine (url). |
research | search | The /v1/research evidence bundle (question, depth?). |
remember | memory:write | Store items in private memory (items[]). |
recall | memory:read | Semantic 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_…" } } } }
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
| Field | Type | Description | |
|---|---|---|---|
jsonrpc | '2.0' | required | Always "2.0". |
method | 'initialize' | 'tools/list' | 'tools/call' | 'ping' | required | initialize | tools/list | tools/call | ping — notifications/* are accepted silently. |
id | string | number | optional | Echoed back in the response. |
params | object | optional | Method 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"}'
import requests r = requests.post("https://agw.orcanox.xyz/mcp", headers={"Authorization": "Bearer agw_…"}, json={"jsonrpc":"2.0","id": 1,"method":"tools/list"}) print(r.status_code, r.json())
const r = await fetch("https://agw.orcanox.xyz/mcp", { method: "POST", headers: { "Authorization": "Bearer agw_…", "Content-Type": "application/json" }, body: JSON.stringify({"jsonrpc":"2.0","id": 1,"method":"tools/list"}) }); console.log(r.status, await r.json());
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
| Status | code | Example |
|---|---|---|
| 401 | -32001 | {"code":-32001,"message":"invalid api key"} |
| 403 | -32003 | {"code":-32003,"message":"missing required scope: memory:write"} |
| 405 | method_not_allowed | {"code":"method_not_allowed","message":"POST only — MCP speaks JSON-RPC over POST"} |