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
| tool | price | purpose |
|---|---|---|
preflight | $0.001 | Endpoint risk before PAYMENT-SIGNATURE. |
preflight_batch | $0.025 | One settlement for up to 50 URLs. |
forensics | $0.001 | 7-day probe and risk history for one URL. |
catalog_decoys | $0.005 | Current decoy / zombie / dead blacklist. |
alternatives | $0.005 | Healthy siblings for a blocked endpoint. |
whats_new | $0.001 | Catalog diff polling. |
buy_credits | $0.50 | 1000 prepaid preflight calls. |
watch_subscribe | $0.01 | 30-day webhook watch + 100 alerts. |
credits_status | free | Credit balance lookup by creditId. |
watch_status | free | Watch state lookup by id + secret. |
watch_unsubscribe | free | Stop a watch by id + secret. |
Related Surfaces
- /llms.txt — autonomous flow and agent policy.
- /skill.md — single-file agent skill.
- /.well-known/agent-card.json — A2A-style discovery card with framework metadata.
- /api/openapi.json — OpenAPI 3.1 for raw HTTP clients.