nirholas/x402-mcp-commerce
MCP server that gives Claude/GPT agents commerce tools — each tool call pays an upstream x402 endpoint and returns its artifact
ARCHETYPE
Pragmatist
A balanced, no-drama setup: some rules, some tools, nothing extreme.
CONTEXT TAX · EVERY TURN
up to ~8.0k tokens
Claude Code loads MCP tools on demand, so the real cost is usually lower.
Heavy · median rig: 2.3k · breakdown
Copy this rig
# review before running: this installs third-party code $ claude mcp add x402-commerce -e MAX_CALLS=YOUR_MAX_CALLS -e MAX_PER_CALL_USD=YOUR_MAX_PER_CALL_USD -e MAX_SESSION_USD=YOUR_MAX_SESSION_USD -e PRIVATE_KEY=YOUR_PRIVATE_KEY -e X402_RAIL=YOUR_X402_RAIL -e X402_UPSTREAM_X402_FLIGHT_SEARCH=YOUR_X402_UPSTREAM_X402_FLIGHT_SEARCH -e X402_UPSTREAM_X402_STOREFRONT=YOUR_X402_UPSTREAM_X402_STOREFRONT -e X402_UPSTREAM_X402_TABLEBOOK=YOUR_X402_UPSTREAM_X402_TABLEBOOK -- npx tsx /absolute/path/to/x402-mcp-commerce/src/mcp.ts $ claude mcp add x402-commerce-solana -e MAX_PER_CALL_USD=YOUR_MAX_PER_CALL_USD -e MAX_SESSION_USD=YOUR_MAX_SESSION_USD -e PRIVATE_KEY=YOUR_PRIVATE_KEY -e SOLANA_PRIVATE_KEY=YOUR_SOLANA_PRIVATE_KEY -e SOLANA_RPC_URL=YOUR_SOLANA_RPC_URL -e X402_RAIL=YOUR_X402_RAIL -e X402_RAIL_BOOK_TABLE=YOUR_X402_RAIL_BOOK_TABLE -- npx tsx /absolute/path/to/x402-mcp-commerce/src/mcp.ts $ claude mcp add x402-commerce-sandbox -e MAX_PER_CALL_USD=YOUR_MAX_PER_CALL_USD -e MAX_SESSION_USD=YOUR_MAX_SESSION_USD -e PRIVATE_KEY=YOUR_PRIVATE_KEY -e X402_TOOLS_CONFIG=YOUR_X402_TOOLS_CONFIG -- npx tsx /absolute/path/to/x402-mcp-commerce/src/mcp.ts
MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.
$ claude mcp add x402-commerce -e MAX_CALLS=YOUR_MAX_CALLS -e MAX_PER_CALL_USD=YOUR_MAX_PER_CALL_USD -e MAX_SESSION_USD=YOUR_MAX_SESSION_USD -e PRIVATE_KEY=YOUR_PRIVATE_KEY -e X402_RAIL=YOUR_X402_RAIL -e X402_UPSTREAM_X402_FLIGHT_SEARCH=YOUR_X402_UPSTREAM_X402_FLIGHT_SEARCH -e X402_UPSTREAM_X402_STOREFRONT=YOUR_X402_UPSTREAM_X402_STOREFRONT -e X402_UPSTREAM_X402_TABLEBOOK=YOUR_X402_UPSTREAM_X402_TABLEBOOK -- npx tsx /absolute/path/to/x402-mcp-commerce/src/mcp.ts $ claude mcp add x402-commerce-solana -e MAX_PER_CALL_USD=YOUR_MAX_PER_CALL_USD -e MAX_SESSION_USD=YOUR_MAX_SESSION_USD -e PRIVATE_KEY=YOUR_PRIVATE_KEY -e SOLANA_PRIVATE_KEY=YOUR_SOLANA_PRIVATE_KEY -e SOLANA_RPC_URL=YOUR_SOLANA_RPC_URL -e X402_RAIL=YOUR_X402_RAIL -e X402_RAIL_BOOK_TABLE=YOUR_X402_RAIL_BOOK_TABLE -- npx tsx /absolute/path/to/x402-mcp-commerce/src/mcp.ts $ claude mcp add x402-commerce-sandbox -e MAX_PER_CALL_USD=YOUR_MAX_PER_CALL_USD -e MAX_SESSION_USD=YOUR_MAX_SESSION_USD -e PRIVATE_KEY=YOUR_PRIVATE_KEY -e X402_TOOLS_CONFIG=YOUR_X402_TOOLS_CONFIG -- npx tsx /absolute/path/to/x402-mcp-commerce/src/mcp.ts
This rig commits no guardrails. Here is the community baseline instead — the deny/ask rules most often found across all 16.2k rigs:
{
"permissions": {
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(**/.env)",
"Read(~/.ssh/**)",
"Bash(git push --force:*)",
"Read(**/*.pem)",
"Read(.env)",
"Read(~/.aws/**)",
"Read(**/*.key)",
"Read(**/.env.*)",
"Bash(git push --force*)",
"Bash(rm -rf:*)",
"Bash(rm -rf *)",
"Bash(sudo *)",
"Bash(sudo:*)",
"Bash(rm -rf /)",
"Bash(git push -f:*)",
"Read(.env.*)",
"Bash(git reset --hard*)",
"Bash(rm -rf /*)"
],
"ask": [
"Bash(git push:*)",
"Bash(git push *)",
"Bash(gh pr merge *)",
"Bash(git commit:*)",
"Bash(rm *)",
"Bash(gh pr merge:*)",
"Bash(gh pr create *)",
"Bash(git reset --hard:*)",
"Bash(npm publish:*)",
"Bash(git rebase *)"
]
}
} MCP servers (3)
| server | source | est. tokens |
|---|---|---|
| tsx · "x402-commerce" env: MAX_CALLS, MAX_PER_CALL_USD, MAX_SESSION_USD, PRIVATE_KEY, X402_RAIL +3 | npm | 2.5k |
| tsx · "x402-commerce-solana" env: MAX_PER_CALL_USD, MAX_SESSION_USD, PRIVATE_KEY, SOLANA_PRIVATE_KEY, SOLANA_RPC_URL +2 | npm | 2.5k |
| tsx · "x402-commerce-sandbox" env: MAX_PER_CALL_USD, MAX_SESSION_USD, PRIVATE_KEY, X402_TOOLS_CONFIG | npm | 2.5k |
Similar rigs
ExaDev/agent-comms
Cross-harness communication mesh for LLM agents, with rooms, direct messages, presence and visibility over TCP and no filesystem dependencies.
Pragmatist 2.5k tok · · Q0
chezsal12/sample-tax-return-calculator
A TypeScript library for estimating US federal and state income tax, built with Kiro using spec-driven development and property-based testing
Pragmatist 2.8k tok · · Q0
uedayou/loa-mcp-server
住所LOD(uedayou.net/loa)を利用し、日本の住所を検索してポリゴン/ポイントの位置情報を取得できるローカル実行のMCPサーバー
Pragmatist 2.5k tok · · Q0
AlleyBo55/doraemon
Doraemon live in desktop
Automator 14.7k tok · · Q5