~ / rigs / nirholas / x402-mcp-commerce

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

↗ GitHub ★ 8 Apache-2.0 updated 17d ago project Claude CodeCodex
share on X
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
GUARDRAILS
0/5
No committed guardrails · details
Quality 3/100 Guardrails v2

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)

serversourceest. 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

copied ✓