{"_id":"@curless/mcpbuyer","_rev":"2-2fc3542f53ebb3331e0b57e5874587d5","name":"@curless/mcpbuyer","dist-tags":{"latest":"0.3.0"},"versions":{"0.2.0":{"name":"@curless/mcpbuyer","version":"0.2.0","license":"MIT","_id":"@curless/mcpbuyer@0.2.0","maintainers":[{"name":"sparkyu","email":"spark@curless.ai"},{"name":"robin_curless","email":"robin@curless.ai"}],"homepage":"https://gitlab.com/sparkcurless/agentbank#readme","bugs":{"url":"https://gitlab.com/sparkcurless/agentbank/issues"},"dist":{"shasum":"a6b03a34354ef57d744b23e5bcceb2dbc4eedeab","tarball":"https://registry.npmjs.org/@curless/mcpbuyer/-/mcpbuyer-0.2.0.tgz","fileCount":6,"integrity":"sha512-HcXEeL98UAEhtJShPd+erhE3EvuMIp67RFprzDfSeqC7zLzrRppzmA89afvGJMENxEuICXFSfGmC+9P2tngpzA==","signatures":[{"sig":"MEYCIQDX/7+qEB3nyWCvjZv2Y7s9kXHon77HrQEX+riHEdMv1QIhAILhmWmtcNHgANshCcywDeViYJ7gPaFmiE7f1SzFVRIp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17058},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"16b79004e30958e3c35a6ef9c75511ccdea6e3ef","scripts":{"test":"vitest run","build":"tsc"},"_npmUser":{"name":"sparkyu","email":"spark@curless.ai"},"repository":{"url":"git+https://gitlab.com/sparkcurless/agentbank.git","type":"git","directory":"sdk/packages/mcpbuyer"},"_npmVersion":"10.9.4","description":"Buyer-side Curless payment tools — mount curless_create_payment_session / curless_charge / curless_get_charge_status in any MCP server, agent, or skill to initiate and verify payments.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"*","typescript":"*","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/mcpbuyer_0.2.0_1781148016859_0.6165030560045321","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@curless/mcpbuyer","version":"0.3.0","type":"module","description":"Buyer-side Curless payment tools — mount curless_create_payment_session / curless_charge / curless_get_charge_status in any MCP server, agent, or skill to initiate and verify payments.","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","test":"vitest run"},"license":"MIT","repository":{"type":"git","url":"git+https://gitlab.com/sparkcurless/agentbank.git","directory":"sdk/packages/mcpbuyer"},"sideEffects":false,"devDependencies":{"@types/node":"^20.11.0","typescript":"*","vitest":"*"},"_id":"@curless/mcpbuyer@0.3.0","gitHead":"9147230ec042ca04eb2c89b3effe8ff256e6f99e","bugs":{"url":"https://gitlab.com/sparkcurless/agentbank/issues"},"homepage":"https://gitlab.com/sparkcurless/agentbank#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-STjG7FG2dpWDp+9EdrB4liMFhc5VCyGR4xVrBQHYku26B4IPi/hdzPw4ddrmICOLdPL6cNaYnSububhTYc6QMQ==","shasum":"9d7d1007c5989f74878d2fa667aea4f630202fd5","tarball":"https://registry.npmjs.org/@curless/mcpbuyer/-/mcpbuyer-0.3.0.tgz","fileCount":6,"unpackedSize":22184,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCBUA6Mg95gg2cz5/+48gYim6fQnX7sRvtsNlimCECIKQIhAMuqu8x1ZNfGLpSO28LbQC2UxUFBarayiQG5ddUPcQAh"}]},"_npmUser":{"name":"sparkyu","email":"spark@curless.ai"},"directories":{},"maintainers":[{"name":"sparkyu","email":"spark@curless.ai"},{"name":"robin_curless","email":"robin@curless.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcpbuyer_0.3.0_1781269683855_0.7762264349603549"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-11T03:20:16.676Z","modified":"2026-06-12T13:08:04.105Z","0.2.0":"2026-06-11T03:20:17.011Z","0.3.0":"2026-06-12T13:08:03.982Z"},"bugs":{"url":"https://gitlab.com/sparkcurless/agentbank/issues"},"license":"MIT","homepage":"https://gitlab.com/sparkcurless/agentbank#readme","repository":{"type":"git","url":"git+https://gitlab.com/sparkcurless/agentbank.git","directory":"sdk/packages/mcpbuyer"},"description":"Buyer-side Curless payment tools — mount curless_create_payment_session / curless_charge / curless_get_charge_status in any MCP server, agent, or skill to initiate and verify payments.","maintainers":[{"name":"sparkyu","email":"spark@curless.ai"},{"name":"robin_curless","email":"robin@curless.ai"}],"readme":"# @curless/mcpbuyer\n\nBuyer-side Curless payment tools. Mount them in **any** MCP server, agent, or\nskill to *initiate* and *verify* payments against the Curless platform.\n\n> This is the **buyer/orchestration** half. To *charge for your own tools*\n> (seller side), use [`@curless/mcp`](../mcp)'s `CurlessPaywall`.\n\n## Install\n\n```bash\nnpm install @curless/mcpbuyer\n```\n\n## Use\n\n```ts\nimport { curlessPaymentTools } from '@curless/mcpbuyer'\n\nconst tools = curlessPaymentTools({\n  apiKey: process.env.CURLESS_SECRET_KEY!,        // merchant secret\n  agentToken: () => readAgentTokenFromSession(),  // the spending principal\n})\n\n// Each entry is { descriptor, handler } — wire into whatever MCP server you run:\nfor (const t of tools) {\n  myServer.registerTool(t.descriptor.name, t.descriptor.inputSchema, t.handler)\n}\n```\n\n`agentToken` accepts a string, a resolver function, or omit it and let callers\npass `agent_token` in the tool args.\n\n## Tools\n\n| Tool | Caller | Purpose |\n|---|---|---|\n| `curless_create_payment_session` | merchant | Lock an amount → `ps_…` id (hand the id, not the amount, to the agent) |\n| `curless_charge` | agent | Create + auto-capture a charge (by `session_id` or `amount`). Returns `next_action` |\n| `curless_get_charge_status` | either | Confirm-authority — the only call that asserts `credited` from a real ledger entry |\n\n## The contract (obey `next_action`)\n\n`curless_charge` returns a `next_action`: `COMPLETE`, `EXEC_CAPTURE`,\n`AWAIT_APPROVAL`, `WAIT_FOR_CONFIRM`, `WAIT_FOR_WEBHOOK`, or `STOP`.\n\n**Cardinal rule:** a charge response is *not* proof of payment. Read\n`credited: true` from `curless_get_charge_status` (or the `intent.succeeded`\nwebhook) before telling the user \"paid\".\n\n## Zero-dependency discovery\n\nThe canonical tool definitions are also served over HTTP — no install needed:\n\n```bash\ncurl https://backend-omega-steel-11.vercel.app/v1/integrations/tools\n```\n","readmeFilename":"README.md"}