{"_id":"@davidmaronio/stellarpay402-mcp","_rev":"2-cd2c3aa69018b5a97e9e3f16ff41a79d","name":"@davidmaronio/stellarpay402-mcp","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@davidmaronio/stellarpay402-mcp","version":"0.1.0","keywords":["mcp","model-context-protocol","x402","stellar","soroban","agent","ai","claude","claude-desktop","cursor","usdc"],"author":{"name":"davidmaronio"},"license":"MIT","_id":"@davidmaronio/stellarpay402-mcp@0.1.0","maintainers":[{"name":"davidmaronio","email":"prince.akpolo@adtmtech.com"}],"homepage":"https://github.com/davidmaronio/StellarPay402#readme","bugs":{"url":"https://github.com/davidmaronio/StellarPay402/issues"},"bin":{"stellarpay402-mcp":"index.mjs"},"dist":{"shasum":"fbd865a93b5968d8458bc8e80c4c277d32d3e150","tarball":"https://registry.npmjs.org/@davidmaronio/stellarpay402-mcp/-/stellarpay402-mcp-0.1.0.tgz","fileCount":3,"integrity":"sha512-SRdoYyjkrGmjxpSk+M6RBQt2Z/k3RuSHQfx664gAJYrqX+Me2hcLyLVeLMAA79fXbOx5EPA8r7gbgzOcrGg2Vg==","signatures":[{"sig":"MEUCIQCEMnpeetaoVPnY9WEbt5OJnUM+1ZMGaQJEOzLdyrA1vQIgAk60vlAjbKyh1CDkiA4WEP7pg23awdUdo4Yn1n5lLZQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13412},"type":"module","engines":{"node":">=20"},"gitHead":"148f80ce436f69cc238ad5c04a65ec274e3e63c2","scripts":{"start":"node index.mjs"},"_npmUser":{"name":"davidmaronio","email":"prince.akpolo@adtmtech.com"},"repository":{"url":"git+https://github.com/davidmaronio/StellarPay402.git","type":"git","directory":"mcp-server"},"_npmVersion":"11.6.2","description":"MCP server that bridges any AI assistant to a StellarPay402 marketplace. AI agents discover paid APIs and pay for them autonomously using x402 on Stellar.","directories":{},"_nodeVersion":"24.12.0","dependencies":{"@x402/core":"^2.9.0","@x402/stellar":"^2.9.0","@stellar/stellar-sdk":"^15.0.1","@modelcontextprotocol/sdk":"^1.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/stellarpay402-mcp_0.1.0_1775655079199_0.19525830004779432","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@davidmaronio/stellarpay402-mcp","version":"0.1.1","description":"MCP server that bridges any AI assistant to a StellarPay402 marketplace. AI agents discover paid APIs and pay for them autonomously using x402 on Stellar.","type":"module","bin":{"stellarpay402-mcp":"index.mjs"},"scripts":{"start":"node index.mjs"},"keywords":["mcp","model-context-protocol","x402","stellar","soroban","agent","ai","claude","claude-desktop","cursor","usdc"],"license":"MIT","author":{"name":"davidmaronio"},"homepage":"https://github.com/davidmaronio/StellarPay402#readme","repository":{"type":"git","url":"git+https://github.com/davidmaronio/StellarPay402.git","directory":"mcp-server"},"bugs":{"url":"https://github.com/davidmaronio/StellarPay402/issues"},"engines":{"node":">=20"},"publishConfig":{"access":"public"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.4","@stellar/stellar-sdk":"^15.0.1","@x402/core":"^2.9.0","@x402/stellar":"^2.9.0"},"gitHead":"760cf35259e77ba444ca05214734e9f89e9395ea","_id":"@davidmaronio/stellarpay402-mcp@0.1.1","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-1y4a08MAwL+yLAs3B16rkiPZpq59AxGsFNXYMGwzWhm+6OKXs80cvJ826rRUT+cclNCx2bNkq56ELdg+8D5xKQ==","shasum":"68287bd3e424e8a4d2ea3b19cb60567ac5a80ea5","tarball":"https://registry.npmjs.org/@davidmaronio/stellarpay402-mcp/-/stellarpay402-mcp-0.1.1.tgz","fileCount":3,"unpackedSize":13511,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCTnWiVYp1G3XWHgQifbsByMM/bm7z5JqyFCfhqAa3ssgIhANhpKZkY7WGgDhBSWN/LAqFW8Ab9c11/gO52DGO7BOsL"}]},"_npmUser":{"name":"davidmaronio","email":"prince.akpolo@adtmtech.com"},"directories":{},"maintainers":[{"name":"davidmaronio","email":"prince.akpolo@adtmtech.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stellarpay402-mcp_0.1.1_1775663389983_0.6491369960275302"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-08T13:31:19.081Z","modified":"2026-04-08T15:49:50.258Z","0.1.0":"2026-04-08T13:31:19.326Z","0.1.1":"2026-04-08T15:49:50.135Z"},"bugs":{"url":"https://github.com/davidmaronio/StellarPay402/issues"},"author":{"name":"davidmaronio"},"license":"MIT","homepage":"https://github.com/davidmaronio/StellarPay402#readme","keywords":["mcp","model-context-protocol","x402","stellar","soroban","agent","ai","claude","claude-desktop","cursor","usdc"],"repository":{"type":"git","url":"git+https://github.com/davidmaronio/StellarPay402.git","directory":"mcp-server"},"description":"MCP server that bridges any AI assistant to a StellarPay402 marketplace. AI agents discover paid APIs and pay for them autonomously using x402 on Stellar.","maintainers":[{"name":"davidmaronio","email":"prince.akpolo@adtmtech.com"}],"readme":"# @davidmaronio/stellarpay402-mcp\n\nA Model Context Protocol (MCP) server. It exposes every endpoint in a running StellarPay402 marketplace as a tool to any MCP-aware AI assistant. When the AI calls a tool, the server signs an x402 payment with its configured Stellar testnet key, sends it to the proxy, and returns the API response.\n\n## Install\n\nThe package is on the public npm registry. There is nothing to install yourself. `npx` fetches it on first run:\n\n```bash\nnpx -y @davidmaronio/stellarpay402-mcp@latest\n```\n\nIf you want to hack on the source, clone the parent repo and run it directly:\n\n```bash\ncd StellarPay402/mcp-server\nnpm install\nnode index.mjs\n```\n\n## Configuration\n\nThe server reads everything from environment variables.\n\n| Variable | Required | Default | Description |\n| --- | --- | --- | --- |\n| `STELLAR_SECRET_KEY` | yes | none | Stellar testnet secret key (`S...`). Used to sign x402 payments. |\n| `MARKETPLACE_URL` | no | `https://stellar-pay402.vercel.app` | Base URL of the StellarPay402 marketplace. Use `http://localhost:3000` if you are running the marketplace locally. |\n| `MAX_USDC_PER_SESSION` | no | `0.50` | Spending cap per session, enforced by the client. The server refuses any payment that would push your cumulative spend past this. |\n\n### Get a testnet wallet\n\n1. Open <https://laboratory.stellar.org/#account-creator?network=test>.\n2. Generate a new keypair. Save the secret key.\n3. Click \"Fund account with Friendbot\" to credit it with test XLM.\n4. Add a trustline for USDC. Asset code `USDC`, issuer `GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5`.\n5. Swap a small amount of XLM for USDC on the testnet DEX.\n\n## Claude Desktop\n\nAdd this block to `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, or the equivalent path on your platform:\n\n```json\n{\n  \"mcpServers\": {\n    \"stellarpay402\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@davidmaronio/stellarpay402-mcp@latest\"],\n      \"env\": {\n        \"STELLAR_SECRET_KEY\": \"S...\",\n        \"MARKETPLACE_URL\": \"https://stellar-pay402.vercel.app\",\n        \"MAX_USDC_PER_SESSION\": \"0.50\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop. Every public endpoint in the marketplace shows up as a tool named `{userSlug}_{endpointSlug}`.\n\n## How it behaves\n\nOn startup, the server connects over stdio, logs its config to stderr, and waits for MCP requests.\n\nOn `tools/list`:\n\n1. It fetches `${MARKETPLACE_URL}/api/marketplace`.\n2. It returns one tool per endpoint.\n3. Tool descriptions include the provider name and the USDC price per call.\n\nOn `tools/call`:\n\n1. The server hits the endpoint with no payment header. It expects a 402 response with x402 payment requirements.\n2. It checks the price against the remaining session budget. If the call would exceed the budget, it fails with a budget error.\n3. It builds and signs an x402 payment payload with `@x402/stellar` and the configured secret key.\n4. It retries the request with the `X-PAYMENT` header.\n5. It returns the response body to the model. The response starts with a summary that includes the USDC amount paid, the cumulative session spend, and a link to the settled transaction on Stellar Expert.\n\n## Output format\n\n```\nPaid 0.0100 USDC on Stellar testnet\nPayment proof: https://stellar.expert/explorer/testnet/tx/<hash>\nSession spend: 0.0100 / 0.5000 USDC\n\nAPI Response\n<body returned by the upstream API>\n```\n\n## Spending cap\n\nThe session budget runs on the client side only. The marketplace proxy has its own per-payer hourly cap on the server side. See the main repository README.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}