MCP adapter

x402station-mcp

Stdio MCP server for x402station.io. It gives MCP-compatible clients pre-payment endpoint evidence before an agent signs PAYMENT-SIGNATURE. The adapter pays x402station routes with the wallet you provide; x402station does not custody funds or endorse target endpoints.

Install

# use directly from any MCP host
npx -y x402station-mcp

# or install globally
npm install -g x402station-mcp

Package: npm/x402station-mcp · Source: github.com/sF1nX/x402station-mcp · Registry: io.github.sF1nX/x402station

Configure

Set AGENT_PRIVATE_KEY to a wallet with Base mainnet USDC. Every paid tool call settles through x402; free status tools do not require a payment.

{
  "mcpServers": {
    "x402station": {
      "command": "npx",
      "args": ["-y", "x402station-mcp"],
      "env": {
        "AGENT_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY_HERE"
      }
    }
  }
}

Agent Flow

# 1. discover the service contract
curl -s https://x402station.io/.well-known/mcp/server-card.json
curl -s https://x402station.io/.well-known/agent-card.json

# 2. preflight a target URL before paying it
curl -i -X POST https://x402station.io/api/v1/preflight \
  -H "content-type: application/json" \
  -d '{"url":"https://api.example.com/x402-endpoint"}'

# 3. after signing the x402station challenge, inspect the verdict
curl -s -X POST https://x402station.io/api/v1/preflight \
  -H "content-type: application/json" \
  -H "PAYMENT-SIGNATURE: <signed-x402station-payment>" \
  -d '{"url":"https://api.example.com/x402-endpoint"}'

If ok is false, do not pay the target endpoint. Call alternatives or ask for operator confirmation. Treat unknown_endpoint as no independent history, not as safety.

Tools

toolpricepurpose
preflight$0.001Endpoint risk before PAYMENT-SIGNATURE.
preflight_batch$0.025One settlement for up to 50 URLs.
forensics$0.0017-day probe and risk history for one URL.
catalog_decoys$0.005Current decoy / zombie / dead blacklist.
alternatives$0.005Healthy siblings for a blocked endpoint.
whats_new$0.001Catalog diff polling.
buy_credits$0.501000 prepaid preflight calls.
watch_subscribe$0.0130-day webhook watch + 100 alerts.
credits_statusfreeCredit balance lookup by creditId.
watch_statusfreeWatch state lookup by id + secret.
watch_unsubscribefreeStop a watch by id + secret.

Related Surfaces