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
- Transport:
streamable-http - MCP URL:
https://canix402-mcp.compx.io/mcp - Metadata:
https://canix402-mcp.compx.io/.well-known/mcp - Health:
https://canix402-mcp.compx.io/health
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
canix_get_quote— free, stateless quote fromPOST /swaps/quote.canix_optin— free output-asset and application opt-ins fromPOST /swaps/optin.-
canix_swap— paid swap transaction response fromPOST /swaps/transactions, with a 0.005 USDC fallback price.
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
-
Call a paid tool (e.g.
canix_list_opportunities) withoutpaymentSignature. -
The tool returns
PAYMENT_REQUIREDmetadata with gateway payment requirements (same x402 policy as direct HTTP). -
Your agent builds a
PAYMENT-SIGNATUREpayload client-side and retries the same tool withpaymentSignatureset. - 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.
-
canix_health -
canix_get_metadata -
canix_get_discovery -
canix_get_openapi -
canix_get_token_prices -
canix_list_execution_shapes -
canix_list_opportunities -
canix_search_opportunities -
canix_get_personalized_opportunities -
canix_get_protocol_opportunities -
canix_get_positions -
canix_get_execution_quote -
canix_list_strategies -
canix_get_strategy -
canix_publish_strategy -
canix_revise_strategy -
canix_compile_strategy -
canix_get_quote -
canix_optin -
canix_swap
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
- MCP — best for agent hosts (Cursor, Claude Desktop) that speak MCP; typed tools and structured payment-retry hints.
- Direct HTTP — best for custom integrations; use the gateway with discovery/OpenAPI and manual x402 headers.
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.