x402-mcp-agentcost
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
x402-mcp-agentcost
Standalone Pay-Per-Call MCP Server built for Cloudflare Workers implementing the x402 v2 (HTTP 402 Payment Required) machine-to-machine micropayment protocol over Base USDC.
Web Companion UI: AgentCostLab (
Jettlin927/agentcostlab)Live Remote Endpoint:
https://x402-mcp-agentcost.jettlin666.workers.dev/mcpTransport: Streamable HTTP MCP (JSON-RPC 2.0 at
POST /mcp)Discovery:
GET /.well-known/x402.json,GET /.well-known/mcp.json,GET /llms.txt,GET /openapi.jsonPayments:
x402v2 (PAYMENT-REQUIRED,PAYMENT-SIGNATURE,PAYMENT-RESPONSEheaders) + Facilitator/verify&/settle(plusX-DEMO-MODE: truedry-run support)License: MIT
Connect in Any MCP Client (mcp.json)
{
"mcpServers": {
"agentcostlab": {
"type": "streamable-http",
"url": "https://x402-mcp-agentcost.jettlin666.workers.dev/mcp"
}
}
}Related MCP server: remote-mcp-authless
Tool Pricing
Tool | Price | Purpose |
| FREE | Discovery: 24 models across 9 providers with Nov-2026 pricing (incl. MiniMax-M3, Grok 4.7, GLM-5.3 / 5.3-Flash, Kimi K3.1 Pro, Qwen4-Max, Gemini 4 Neon/Hydrogen & GPT-6.1 Terra), AA Intelligence & SWE-bench scores |
| $0.005 USDC | Pareto-optimal model + Hybrid Planner/Worker routing for a workload & budget |
| $0.005 USDC | Full $O(N^2)$ multi-turn loop simulation with caching, retries & long-context step-ups |
| $0.010 USDC | Audit |
Local Dev & Test
npm install
npm test
npm run typecheck
npm run devQuick curl Verification (Local or Deployed)
# 1. Free discovery
curl -s http://localhost:8787/.well-known/mcp.json
# 2. Unpaid call -> HTTP 402 Payment Required + PAYMENT-REQUIRED header
curl -i -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"recommend_pareto_route","arguments":{"turns":24}}}'
# 3. Demo sandbox dry-run (when X402_ALLOW_DEMO=true)
curl -s -X POST http://localhost:8787/mcp \
-H "Content-Type: application/json" \
-H "X-DEMO-MODE: true" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"recommend_pareto_route","arguments":{"turns":24}}}'Deploy to Cloudflare Workers
# 1. Authenticate Wrangler
npx wrangler login
# 2. Set your Base USDC receiving wallet address (0x...)
npx wrangler secret put X402_PAY_TO
# 3. Deploy to global edge
npm run deployTo disable demo bypass in production, set
"X402_ALLOW_DEMO": "false"inwrangler.jsonc.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
15 paid AI agent primitives via x402 (USDC on Base). Pay-per-call MCP server.
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA hosted HTTP MCP server for Cloudflare Workers that exposes a bundle of tools via a remote /mcp endpoint, enabling Claude-compatible clients to connect without a local server.1BSD Zero Clause
- FlicenseNot gradedqualityNot gradedmaintenanceA remote MCP server deployed on Cloudflare Workers without authentication, enabling tool usage via SSE from clients like Cloudflare AI Playground and Claude Desktop.-
- FlicenseAqualityCmaintenanceMCP server for a live x402 payment gateway on Base (USDC). Lets AI agents discover, preview for free, then pay per call — with prepaid gasless payments, signed receipts, and delta delivery.7-
- AlicenseAqualityBmaintenanceMCP server that gives Claude/GPT agents commerce tools — each tool call pays an upstream x402 endpoint and returns its artifact.1512 npm8Apache 2.0