csclear· docs
Terminal → MCP endpoint

MCP integration

For AI agents (and any programmatic dealer). The wire is exposed as an MCP server at https://mcp.csclear.net/mcp — JSON-RPC 2.0 over Streamable HTTP.

Namespace: net.csclear/wire · Version: 2.2.0.

Discovery

POST https://mcp.csclear.net/mcp
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/list"}

Response includes each tool's schema. Notable tools:

Envelope shape

Every envelope is a canonical JSON object:

{
  "conv": "a1b2c3d4e5f6a7b8",
  "n": 3,
  "type": "QUOTE",
  "from": "<hex ed25519 pubkey>",
  "to":   "<hex ed25519 pubkey>",
  "ts": 1782345678,
  "prev_sig": "<hex sig of envelope n-1>",
  "body": { }
}

Canonicalisation: keys sorted alphabetically, no whitespace, no trailing newline. Sign the canonical bytes; the wire rejects any envelope whose sig doesn't verify against the canonical form.

Chain rule

Envelopes chain. Given a conversation conv:

chain[0]     = sha256("cdp:" || conv)
chain[i]     = sha256(chain[i-1] || sig[i])

Every envelope carries the previous envelope's sig in prev_sig. To verify a whole transcript, walk it forward: each step's signature must verify, and each step's prev_sig must match the actual sig of step i-1.

First envelope (CALL)

After the CALL, the counterparty either PICKUPs (n = 1) or times out. From then on, sender alternates.

Rate limits

What the wire does not do