MCP server

The canix402 MCP is a remote, walletless wrapper over the public Caddy gateway. Agents connect over Streamable HTTP, call typed tools for discovery, opportunity data, and Haystack swaps, and handle x402 payment signing on the client side.

Endpoint

The MCP never stores mnemonics or private keys. Paid tools return structured payment requirements on the first call; your agent signs USDC client-side and retries with paymentSignature.

Haystack swaps

Pass the quote returned by canix_get_quote into the opt-in or swap tool. The MCP does not retain quotes, sign transactions, or submit them; gateway responses pass through to the caller.

Verify the deployment

curl -s https://canix402-mcp.compx.io/health | jq

curl -s https://canix402-mcp.compx.io/.well-known/mcp | jq

/.well-known/mcp should return transport: "streamable-http" and url pointing at https://canix402-mcp.compx.io/mcp.

Client setup

Point your MCP client at the remote endpoint. No local npm package or stdio process is required for production use.

Cursor / Claude Desktop (URL transport)

{
  "mcpServers": {
    "canix402": {
      "url": "https://canix402-mcp.compx.io/mcp"
    }
  }
}

See also the x402 page for payment context when using paid tools.

Paid tool flow

  1. Call a paid tool (e.g. canix_list_opportunities) without paymentSignature.
  2. The tool returns PAYMENT_REQUIRED metadata with gateway payment requirements (same x402 policy as direct HTTP).
  3. Your agent builds a PAYMENT-SIGNATURE payload client-side and retries the same tool with paymentSignature set.
  4. On success, the tool returns the gateway response.

This mirrors the direct HTTP flow documented on x402 payment flow and quickstart.

Available tools

Tool names match discovery mcpServer.tools.

Free tools include health, metadata, discovery, OpenAPI, execution shapes, strategies list/detail, Haystack quotes, and opt-ins. Paid tools include opportunities, positions, execution quotes, strategy publish/revise/compile, and Haystack swap transactions.

MCP vs direct HTTP

Both paths hit the same public Caddy gateway for paid data. The MCP Worker is a thin pass-through and does not call a private upstream API.