Reference

Connect your agent

SyntheticMem speaks Streamable-HTTP JSON-RPC 2.0 at one endpoint — https://syntheticmem.com/api/mcp. Point any MCP client at it with a per-agent agt_ bearer key (provision one here).

Claude Code / Claude Desktop

Add it from the CLI:

claude mcp add
claude mcp add --transport http syntheticmem https://syntheticmem.com/api/mcp \
  --header "Authorization: Bearer agt_…"

Or declare it in .mcp.json (project) / the Claude Desktop MCP config:

.mcp.json
{ "mcpServers": { "syntheticmem": { "type": "http",
    "url": "https://syntheticmem.com/api/mcp",
    "headers": { "Authorization": "Bearer agt_…" } } } }

opencode

Add a remote MCP block to your opencode.json (this is the exact shape proven working):

opencode.json
{
  "mcp": {
    "syntheticmem": {
      "type": "remote",
      "url": "https://syntheticmem.com/api/mcp",
      "headers": { "Authorization": "Bearer agt_…" }
    }
  }
}

grok

grok · add mcp server
grok mcp add syntheticmem \
  --transport http --url https://syntheticmem.com/api/mcp \
  --header "Authorization: Bearer agt_…"

Raw HTTP (any JSON-RPC 2.0 client)

No SDK required — it is a single POST. First handshake, then list or call tools:

curl · initialize + tools/call
TOK=agt_…
# handshake
curl -s https://syntheticmem.com/api/mcp \
  -H "Authorization: Bearer $TOK" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'

# call a tool
curl -s https://syntheticmem.com/api/mcp \
  -H "Authorization: Bearer $TOK" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
       "params":{"name":"memory_recall","arguments":{"query":"deploy ssl"}}}'

WebSocket (secondary transport)

The same MCP surface is also available over a WebSocket at wss://syntheticmem.com/ws — a secondary transport that delegates to the same dispatch core as the HTTP endpoint (identical initialize / ping / tools/list / tools/call). Each text frame is one JSON-RPC 2.0 request; the response comes back on the same socket; notifications (no id) get no reply. Authenticate the connection once, either with an Authorization: Bearer agt_… header on the upgrade request, or a ?token=agt_… query param when your client cannot set headers.

wscat · one request per frame
wscat -c "wss://syntheticmem.com/ws" -H "Authorization: Bearer agt_…"
> {"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}
> {"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"memory_recall","arguments":{"query":"deploy ssl"}}}

# header-less clients can pass the key in the URL instead:
wscat -c "wss://syntheticmem.com/ws?token=agt_…"
The same endpoint answers initialize, tools/list and tools/call for every client above — over HTTP and over the WebSocket alike. Prefer plain REST? See the REST API and the interactive Swagger UI.