MCP server
Amarok MCP is a walletless wrapper over the public Caddy gateway. Agents call typed tools for discovery, prediction-market research, and unsigned execution quotes, and handle x402 payment signing on the client side. Production agents should use the remote Streamable HTTP endpoint; local stdio is available for development against a gateway you control.
Remote endpoint (recommended)
- Transport:
streamable-http - MCP URL:
https://amarok-mcp.compx.io/mcp - Metadata:
https://amarok-mcp.compx.io/.well-known/mcp - Health:
https://amarok-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.
The Cloudflare Worker accepts POST and DELETE on
/mcp. GET /mcp returns 405 — this host does not
offer an SSE stream (Streamable HTTP still works over POST). Opening the MCP URL in a browser
is not a valid check; use health or /.well-known/mcp instead.
Research and execution tools
amarok_list_opportunities— paid ranked opportunities.-
amarok_get_market/amarok_get_quotes/amarok_get_scan— paid Alpha research. Scan is capped (~12 markets, 45s orderbook budget) so MCP clients with ~60s tool timeouts can finish; the payload may includetimedOut/capped. -
amarok_get_polymarket_scan/amarok_list_polymarket_rewards/amarok_list_polymarket_spreads/amarok_list_polymarket_parity/amarok_list_polymarket_opportunities/amarok_list_polymarket_markets/amarok_get_polymarket_market/amarok_get_kalshi_scan/amarok_list_kalshi_markets/amarok_get_kalshi_market/amarok_list_kalshi_rewards/amarok_list_kalshi_spreads/amarok_list_kalshi_parity/amarok_list_kalshi_opportunities— paid scan-only venue research (own caps; light GETs acceptsessionToken; neither/scanis covered). No execution, WebSockets, Perps, cross-venue matching, quotes/bundle SKUs, watchlist/history, orGET /quotes. -
amarok_get_research_bundle— paid one-shot opportunities + quotes + N markets. -
amarok_create_research_session— paid 1h token; passsessionTokenon covered research GETs instead of a newpaymentSignature. -
amarok_register_watchlist/amarok_poll_watchlist— paid register of market ids, then delta-only poll from coarse 5m history (not a full rescan; not covered by session). -
amarok_get_portfolio— paid portfolio-by-address (balances, positions, open orders). Free Ghillie showcase stays on HTTP only. -
amarok_get_advisor— paid inventory-aware advisor (post snapshot → exits / cancels / claims / size adjustments;executionSubmitted: false). amarok_list_execution_shapes— free shape catalog.-
amarok_get_execution_quote— paid unsigned place-limit, cancel, claim, market (match legs), merge, split, and opt-in groups (executionSubmitted: false).amarok_list_parityis research-only.
The MCP does not retain quotes, sign transactions, or submit them; gateway responses pass through to the caller.
Verify the deployment
curl -s https://amarok-mcp.compx.io/health | jq
curl -s https://amarok-mcp.compx.io/.well-known/mcp | jq
# Expect 405 — GET SSE is not offered on this Worker
curl -i -X GET https://amarok-mcp.compx.io/mcp /.well-known/mcp should return transport: "streamable-http" and
url pointing at https://amarok-mcp.compx.io/mcp.
Client setup — remote URL
Point your MCP client at the remote endpoint. No local npm package is required for production
use. Copy-paste snippets also live on the website quickstart
(same JSON as mcp/mcp.json.example).
npm run test -w @amarok/mcp).
Cursor
~/.cursor/mcp.json or project .cursor/mcp.json.
{
"mcpServers": {
"amarok": {
"url": "https://amarok-mcp.compx.io/mcp"
}
}
}
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or
%APPDATA%\Claude\claude_desktop_config.json (Windows).
{
"mcpServers": {
"amarok": {
"url": "https://amarok-mcp.compx.io/mcp"
}
}
}
See also the x402 page for payment context when using paid tools.
Client setup — local stdio
For local development, run @amarok/mcp over stdio against compose at
http://127.0.0.1:8788. Same tools as remote MCP. Paid calls still settle x402 on
a live Caddy gateway; use the stub e2e suite to avoid mainnet USDC.
{
"mcpServers": {
"amarok": {
"command": "npx",
"args": [
"tsx",
"mcp/src/index.ts"
],
"env": {
"AMAROK_API_URL": "http://127.0.0.1:8788"
}
}
}
}
From the monorepo root after npm install. Details:
mcp/README.md in the repo. Prefer the remote URL for hosted agents.
Paid tool flow
-
Call a paid tool (e.g.
amarok_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.
-
amarok_health -
amarok_get_discovery -
amarok_get_openapi -
amarok_list_markets -
amarok_list_rewards -
amarok_list_spreads -
amarok_list_parity -
amarok_list_opportunities -
amarok_get_market -
amarok_get_quotes -
amarok_get_scan -
amarok_get_polymarket_scan -
amarok_get_kalshi_scan -
amarok_list_kalshi_markets -
amarok_get_kalshi_market -
amarok_list_kalshi_rewards -
amarok_list_kalshi_spreads -
amarok_list_kalshi_parity -
amarok_list_kalshi_opportunities -
amarok_list_polymarket_rewards -
amarok_list_polymarket_spreads -
amarok_list_polymarket_parity -
amarok_list_polymarket_opportunities -
amarok_list_polymarket_markets -
amarok_get_polymarket_market -
amarok_list_execution_shapes -
amarok_get_execution_quote -
amarok_get_portfolio -
amarok_get_advisor -
amarok_get_research_bundle -
amarok_create_research_session -
amarok_register_watchlist -
amarok_poll_watchlist
Free tools include health, discovery, OpenAPI, and execution shapes. Paid tools include opportunities, market, quotes, scan, and execution quotes.
MCP vs direct HTTP
- Remote MCP — best for agent hosts (Cursor, Claude Desktop) that speak MCP; typed tools and structured payment-retry hints.
- Local stdio MCP — same tools, for developing against a local or staging gateway without the Cloudflare Worker.
- Direct HTTP — best for custom integrations; use the gateway with discovery/OpenAPI and manual x402 headers.
All paths hit the same public Caddy gateway for paid data. The MCP layer is a thin pass-through and does not call a private upstream API.