{"_id":"@aipp/satsgate-mcp-server","_rev":"2-574121a44b2db1a3578c5a365958c7bf","name":"@aipp/satsgate-mcp-server","dist-tags":{"latest":"0.4.1"},"versions":{"0.4.0":{"name":"@aipp/satsgate-mcp-server","version":"0.4.0","keywords":["mcp","satsgate","lightning","l402","bitcoin","ai","paywall"],"license":"MIT","_id":"@aipp/satsgate-mcp-server@0.4.0","maintainers":[{"name":"aipp","email":"farukucal@gmail.com"}],"bin":{"satsgate-mcp":"dist/cli.js"},"dist":{"shasum":"a0a72dc46190a7f3626a2522b5fc3f8a64102d56","tarball":"https://registry.npmjs.org/@aipp/satsgate-mcp-server/-/satsgate-mcp-server-0.4.0.tgz","fileCount":22,"integrity":"sha512-wQgoOcNE4bLvibhUhK1JxL1HQ3mQH2Lk4hcma35jRxP0TPmB8MwadwpA1lteqXUHOyeE9n1Ia2NAxc7z0yhrYA==","signatures":[{"sig":"MEUCIQCSd2v+oUXO9EijIvdo3s4g1h9mdx4uiga5ggdsX3PW1gIga70UKXJuceIFjWl1Fu752dVzq4lrAVFliW/P3FvlkMY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":55417},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"gitHead":"31222addf3639c355a351c4709b02822078342b6","scripts":{"test":"node --test dist/tests/test_server.js","build":"tsc","start":"node dist/cli.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"aipp","email":"farukucal@gmail.com"},"_npmVersion":"10.8.2","description":"MCP server for satsgate — L402 Lightning paywall for AI agents","directories":{},"_nodeVersion":"20.20.2","dependencies":{"zod":"^3.24.0","@modelcontextprotocol/sdk":"^1.11.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/satsgate-mcp-server_0.4.0_1781978877913_0.5814456188940436","host":"s3://npm-registry-packages-npm-production"}},"0.4.1":{"name":"@aipp/satsgate-mcp-server","version":"0.4.1","description":"MCP server for satsgate — L402 Lightning paywall for AI agents","type":"module","main":"dist/index.js","types":"dist/index.d.ts","bin":{"satsgate-mcp":"dist/src/cli.js"},"scripts":{"build":"tsc","start":"node dist/cli.js","test":"node --test dist/tests/test_server.js","prepublishOnly":"npm run build"},"keywords":["mcp","satsgate","lightning","l402","bitcoin","ai","paywall"],"license":"MIT","engines":{"node":">=18"},"dependencies":{"@modelcontextprotocol/sdk":"^1.11.0","zod":"^3.24.0"},"devDependencies":{"typescript":"^5.4.0","@types/node":"^20.0.0"},"_id":"@aipp/satsgate-mcp-server@0.4.1","gitHead":"31222addf3639c355a351c4709b02822078342b6","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-mM5FgkLZw7z9o/lO7GXAQpFS3f6DJ7FwOY7a0+Y/TuIHMafDA6Fve5GMs+ow10ZdIL8uVWOH52/15lqeZxL0Mw==","shasum":"a9d80b7dcc3f5fbd165523b500ba771f62043306","tarball":"https://registry.npmjs.org/@aipp/satsgate-mcp-server/-/satsgate-mcp-server-0.4.1.tgz","fileCount":22,"unpackedSize":55471,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC4HVf+UL81E7BQytXtPvk2tQfg1gSRysNJ+4stPUXRIAIgYvSYCv2IdR7URT5gEuuS0vMr0enmjTfZ48kx9ixNhbg="}]},"_npmUser":{"name":"aipp","email":"farukucal@gmail.com"},"directories":{},"maintainers":[{"name":"aipp","email":"farukucal@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/satsgate-mcp-server_0.4.1_1781978904722_0.38851574027088875"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-20T18:07:57.779Z","modified":"2026-06-20T18:08:24.986Z","0.4.0":"2026-06-20T18:07:58.054Z","0.4.1":"2026-06-20T18:08:24.880Z"},"license":"MIT","keywords":["mcp","satsgate","lightning","l402","bitcoin","ai","paywall"],"description":"MCP server for satsgate — L402 Lightning paywall for AI agents","maintainers":[{"name":"aipp","email":"farukucal@gmail.com"}],"readme":"# @satsgate/mcp\n\nMCP (Model Context Protocol) server for [satsgate](https://aipp.dev) -- an L402 Lightning paywall that lets AI agents manage credits, create paywall challenges, verify payments, and track usage.\n\nThis server exposes satsgate API operations as MCP tools so that AI clients like Claude Desktop, Cursor, and other MCP-compatible agents can interact with the satsgate payment gateway.\n\n## Installation\n\n```bash\nnpm install @satsgate/mcp\n```\n\nOr run directly with npx:\n\n```bash\nnpx @satsgate/mcp\n```\n\n## Configuration\n\nThe server is configured via environment variables:\n\n| Variable | Required | Default | Description |\n|---|---|---|---|\n| `SATSGATE_API_KEY` | Yes | -- | Your satsgate API key |\n| `SATSGATE_BASE_URL` | No | `https://api.aipp.dev` | Base URL of the satsgate API |\n\n## Usage with MCP Clients\n\n### Claude Desktop\n\nAdd to your Claude Desktop configuration file:\n\n**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"satsgate\": {\n      \"command\": \"npx\",\n      \"args\": [\"@satsgate/mcp\"],\n      \"env\": {\n        \"SATSGATE_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to your Cursor MCP settings (Settings > MCP > Add new MCP server):\n\n```json\n{\n  \"mcpServers\": {\n    \"satsgate\": {\n      \"command\": \"npx\",\n      \"args\": [\"@satsgate/mcp\"],\n      \"env\": {\n        \"SATSGATE_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n### Other MCP Clients\n\nAny MCP-compatible client can connect to this server via stdio transport. The general configuration pattern is:\n\n```json\n{\n  \"command\": \"npx\",\n  \"args\": [\"@satsgate/mcp\"],\n  \"env\": {\n    \"SATSGATE_API_KEY\": \"your-api-key-here\",\n    \"SATSGATE_BASE_URL\": \"https://api.aipp.dev\"\n  }\n}\n```\n\nOr if installed globally:\n\n```json\n{\n  \"command\": \"satsgate-mcp\",\n  \"env\": {\n    \"SATSGATE_API_KEY\": \"your-api-key-here\"\n  }\n}\n```\n\n## Available Tools\n\n### Account\n\n| Tool | Description |\n|---|---|\n| `satsgate_balance` | Get the current credit balance for the authenticated account |\n| `satsgate_client_info` | Get the client profile information for the authenticated account |\n| `satsgate_set_payee` | Set the payee Lightning address for receiving payments |\n| `satsgate_list_plans` | List all available credit purchase plans |\n\n### Paywall (L402)\n\n| Tool | Description |\n|---|---|\n| `satsgate_paywall_challenge` | Create a new L402 paywall challenge for a protected resource |\n| `satsgate_paywall_verify` | Verify an L402 payment authorization header and optionally deduct credits |\n\n### Credits\n\n| Tool | Description |\n|---|---|\n| `satsgate_spend` | Spend credits with an idempotency key to prevent duplicate charges |\n| `satsgate_ledger` | Get ledger entries showing credit transactions (debits and credits) |\n\n### Usage & Analytics\n\n| Tool | Description |\n|---|---|\n| `satsgate_usage_summary` | Get a summary of credit usage over a specified time period |\n| `satsgate_usage_daily` | Get daily usage breakdown for the specified number of days |\n| `satsgate_usage_forecast` | Get usage forecast based on historical data with configurable parameters |\n\n## Tool Reference\n\n### satsgate_balance\n\nNo parameters required. Returns the current credit balance.\n\n### satsgate_client_info\n\nNo parameters required. Returns the client profile.\n\n### satsgate_set_payee\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `lightningAddress` | string | Yes | Lightning address (e.g. `user@wallet.com`) |\n\n### satsgate_list_plans\n\nNo parameters required. Returns available credit purchase plans.\n\n### satsgate_paywall_challenge\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `resource` | string | Yes | Unique resource identifier (URI or path) |\n| `amountSats` | number | Yes | Amount in satoshis required to access the resource |\n| `memo` | string | No | Human-readable memo for the invoice |\n\n### satsgate_paywall_verify\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `authorizationHeader` | string | Yes | The full L402 Authorization header value |\n| `expectedResource` | string | No | Expected resource identifier to validate against |\n| `costCredits` | number | No | Credit cost to deduct upon successful verification |\n\n### satsgate_spend\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `idempotencyKey` | string | Yes | Unique key to prevent duplicate spends |\n| `cost` | number | No | Custom cost in credits (defaults to plan cost) |\n\n### satsgate_ledger\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `limit` | number | No | Maximum entries to return (default 20, max 100) |\n| `beforeId` | string | No | Cursor for pagination |\n\n### satsgate_usage_summary\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `sinceHours` | number | No | Hours to look back (default 24) |\n\n### satsgate_usage_daily\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `days` | number | No | Number of days of daily usage (default 7) |\n\n### satsgate_usage_forecast\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `lookbackHours` | number | No | Hours of historical data to analyze (default 168) |\n| `bufferDays` | number | No | Days of buffer to add to forecast (default 3) |\n| `maxTopups` | number | No | Maximum top-ups in forecast (default 5) |\n| `triggerHours` | number | No | Hours threshold for alert (default 24) |\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Run tests\nnpm test\n\n# Start the server manually (for debugging)\nnpm start\n```\n\n## Programmatic Usage\n\nYou can also use the server programmatically:\n\n```typescript\nimport { createServer } from '@satsgate/mcp';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\n\nconst server = createServer();\nconst transport = new StdioServerTransport();\nawait server.connect(transport);\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}