{"_id":"@getalby/mcp","_rev":"4-3605060f9065332a804922f8c8881f56","name":"@getalby/mcp","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@getalby/mcp","version":"1.0.0","keywords":["lightning","nostr","nwc","wallet","mcp","model-context-protocol","ai"],"author":{"name":"Alby contributors"},"license":"MIT","_id":"@getalby/mcp@1.0.0","maintainers":[{"name":"rolznz","email":"roland.bewick@gmail.com"},{"name":"im-adithya","email":"imadithyavardhan@gmail.com"},{"name":"reneaaron","email":"rene@twentyuno.net"},{"name":"bumi","email":"hello@michaelbumann.com"}],"homepage":"https://github.com/getAlby/mcp#readme","bugs":{"url":"https://github.com/getAlby/mcp/issues"},"bin":{"mcp":"build/index.js"},"dist":{"shasum":"6b3daaba1ee5a4c28b2450c803b15e02e5f94244","tarball":"https://registry.npmjs.org/@getalby/mcp/-/mcp-1.0.0.tgz","fileCount":28,"integrity":"sha512-DeSCua6FHZMtZJCpaRYDHbxJVtLdHRMmxyrqhxWF6Jk98Cv9oFMVz0jw2UCMuDZdg6hA68bf7qdR4BlFb5F7Mw==","signatures":[{"sig":"MEYCIQDHPhdhFjWoEa5t1ijkuviRmYB2duuOckmimX0zCGZ9ZwIhAKAGFIGda4IdQrJy3hxw8Z5Phdzj0e7cTHl56jd+29kO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38744},"main":"build/index.js","type":"module","gitHead":"11cf84acb60232ec7929df6457d1face58f41eb7","scripts":{"build":"tsc && chmod 755 build/index.js","start":"node build/index.js","inspect":"npx @modelcontextprotocol/inspector node build/index.js","prepack":"yarn build","start:http":"MODE=HTTP node build/index.js"},"_npmUser":{"name":"rolznz","actor":{"name":"rolznz","type":"user","email":"roland.bewick@gmail.com"},"email":"roland.bewick@gmail.com"},"repository":{"url":"git+https://github.com/getAlby/mcp.git","type":"git"},"_npmVersion":"10.7.0","description":"MCP server for controlling a Lightning wallet using Nostr Wallet Connect","directories":{},"_nodeVersion":"20.14.0","dependencies":{"dotenv":"^16.4.7","express":"^5.1.0","typescript":"^5.3.3","@types/node":"^20.11.5","@getalby/sdk":"^4.1.1","websocket-polyfill":"0.0.3","@getalby/lightning-tools":"^5.2.0","@modelcontextprotocol/sdk":"^1.12.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/express":"^5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp_1.0.0_1750161489617_0.7773939068206575","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@getalby/mcp","version":"1.1.0","keywords":["lightning","nostr","nwc","wallet","mcp","model-context-protocol","ai"],"author":{"name":"Alby contributors"},"license":"MIT","_id":"@getalby/mcp@1.1.0","maintainers":[{"name":"rolznz","email":"roland.bewick@gmail.com"},{"name":"im-adithya","email":"imadithyavardhan@gmail.com"},{"name":"reneaaron","email":"rene@twentyuno.net"},{"name":"bumi","email":"hello@michaelbumann.com"}],"homepage":"https://github.com/getAlby/mcp#readme","bugs":{"url":"https://github.com/getAlby/mcp/issues"},"bin":{"mcp":"build/index.js"},"dist":{"shasum":"9d705d830e8a360bcf48a28916aa2877db70b9f1","tarball":"https://registry.npmjs.org/@getalby/mcp/-/mcp-1.1.0.tgz","fileCount":21,"integrity":"sha512-pLs5XkZwsJKVgAJmkdIwOSnOrHA9DxpJr3glN8ARQyZIbHnEGxplSW3MRMjL2OSzaQYxqD6d4DyH3b2wWV8XjA==","signatures":[{"sig":"MEQCIBWwMk8hy5rQqTc6E+AmDr2AMMEYow0mwpSgmGjz3LQeAiBjaRczD7z1CSt/JcI2AP41RcA3C+yRcjT/ZzUGjQmGXQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43067},"main":"build/index.js","type":"module","gitHead":"9478c3ce486bd1ba84ae6954803d35a13f0c0543","scripts":{"build":"tsc && chmod 755 build/index.js","start":"node build/index.js","inspect":"npx @modelcontextprotocol/inspector node build/index.js","prepack":"yarn build","start:http":"MODE=HTTP node build/index.js"},"_npmUser":{"name":"rolznz","actor":{"name":"rolznz","type":"user","email":"roland.bewick@gmail.com"},"email":"roland.bewick@gmail.com"},"repository":{"url":"git+https://github.com/getAlby/mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for controlling a Lightning wallet using Nostr Wallet Connect","directories":{},"_nodeVersion":"20.19.2","dependencies":{"dotenv":"^16.4.7","express":"^5.1.0","typescript":"^5.3.3","@types/node":"^20.11.5","@getalby/sdk":"^5.1.0","websocket-polyfill":"0.0.3","@getalby/lightning-tools":"^5.2.0","@modelcontextprotocol/sdk":"^1.13.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/express":"^5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp_1.1.0_1750664741823_0.16903003336105393","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@getalby/mcp","version":"1.1.1","keywords":["lightning","nostr","nwc","wallet","mcp","model-context-protocol","ai"],"author":{"name":"Alby contributors"},"license":"MIT","_id":"@getalby/mcp@1.1.1","maintainers":[{"name":"rolznz","email":"roland.bewick@gmail.com"},{"name":"im-adithya","email":"imadithyavardhan@gmail.com"},{"name":"reneaaron","email":"rene@twentyuno.net"},{"name":"bumi","email":"hello@michaelbumann.com"}],"homepage":"https://github.com/getAlby/mcp#readme","bugs":{"url":"https://github.com/getAlby/mcp/issues"},"bin":{"mcp":"build/index.js"},"dist":{"shasum":"c7adb5bccb9654cbe53db4d9257b8e4b2e180120","tarball":"https://registry.npmjs.org/@getalby/mcp/-/mcp-1.1.1.tgz","fileCount":21,"integrity":"sha512-Eiwv6aKA69UrvLhiBoFbQNlg14x4Cp3d9Oy0kg7e1lk9JK9znHORHdaj+anBxi1QaOEGNML6kSQ3gSKhYUqC4g==","signatures":[{"sig":"MEUCIDqSs7fSMoI4roSAhr8cl8j5AkIkW7dVzdmUrWhe+56CAiEAroMsrgTwFK7uQoIcGlNt8MRM8Gj6rjQBeTuwX5QBIbc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48585},"main":"build/index.js","type":"module","gitHead":"851ca386e2d4339cd18e8d48121d54a602ebdf17","scripts":{"build":"tsc && chmod 755 build/index.js","start":"node build/index.js","inspect":"npx @modelcontextprotocol/inspector node build/index.js","prepack":"yarn build","start:http":"MODE=HTTP node build/index.js"},"_npmUser":{"name":"rolznz","email":"roland.bewick@gmail.com"},"repository":{"url":"git+https://github.com/getAlby/mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for controlling a Lightning wallet using Nostr Wallet Connect","directories":{},"_nodeVersion":"20.19.3","dependencies":{"dotenv":"^16.4.7","express":"^5.1.0","typescript":"^5.3.3","@types/node":"^20.11.5","@getalby/sdk":"^5.1.1","websocket-polyfill":"0.0.3","@getalby/lightning-tools":"^5.2.0","@modelcontextprotocol/sdk":"^1.13.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/express":"^5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/mcp_1.1.1_1752660653214_0.5718539922697354","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"_id":"@getalby/mcp@1.1.2","bin":{"mcp":"build/index.js"},"bugs":{"url":"https://github.com/getAlby/mcp/issues"},"dist":{"shasum":"ad246b72e60d77d318efcf59d3877d30baa14b95","tarball":"https://registry.npmjs.org/@getalby/mcp/-/mcp-1.1.2.tgz","fileCount":22,"integrity":"sha512-xdXHVi4EjW2y7whjDkxvjC+ApQA7ApJV3391aG9lImQujOLkd9yTKmtt6S5FKo6/CgmkL6q/ihOirQR6pPUcbg==","signatures":[{"sig":"MEQCICwsOADJDLozgo/waCvRwo7Q4qd9FM2holcMSCdq2nlSAiB4qvGbW8mymKodZUULs1VdsDj8TelWk+JsaXZnIdjc1Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDK1so9RqlNpCAGLo2z5n38pR4axA/JpjqgOghRuhPDzgIhALCkIPqQK32K3EZ1ut2WbTXuLIQYLOUdVzF+dlxcvrsV"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@getalby%2fmcp@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":56215},"main":"build/index.js","name":"@getalby/mcp","type":"module","author":{"name":"Alby contributors"},"gitHead":"d88aeebfae7ddff08149ade810e04729a6303290","license":"MIT","scripts":{"build":"tsc && chmod 755 build/index.js","start":"node build/index.js","inspect":"npx @modelcontextprotocol/inspector node build/index.js","prepack":"yarn build","start:http":"MODE=HTTP node build/index.js"},"version":"1.1.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"f6c3b7f3-921d-4a7b-908b-d66f3710b1fb"}},"homepage":"https://github.com/getAlby/mcp#readme","keywords":["lightning","nostr","nwc","wallet","mcp","model-context-protocol","ai"],"repository":{"url":"git+https://github.com/getAlby/mcp.git","type":"git"},"_npmVersion":"11.19.0","description":"MCP server for controlling a Lightning wallet using Nostr Wallet Connect","directories":{},"maintainers":[{"name":"rolznz","email":"roland.bewick@gmail.com"},{"name":"im-adithya","email":"imadithyavardhan@gmail.com"},{"name":"reneaaron","email":"rene@twentyuno.net"},{"name":"bumi","email":"hello@michaelbumann.com"}],"_nodeVersion":"24.21.0","dependencies":{"dotenv":"^16.4.7","express":"^5.1.0","ipaddr.js":"^1.9.1","typescript":"^5.3.3","@types/node":"^20.11.5","@getalby/sdk":"^5.1.1","websocket-polyfill":"0.0.3","@getalby/lightning-tools":"^5.2.0","@modelcontextprotocol/sdk":"^1.13.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/express":"^5.0.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_1.1.2_1790936487238_0.9841811005231724"}}},"time":{"created":"2025-06-17T11:58:09.511Z","modified":"2026-10-02T10:21:28.340Z","1.0.0":"2025-06-17T11:58:09.791Z","1.1.0":"2025-06-23T07:45:42.017Z","1.1.1":"2025-07-16T10:10:53.483Z","1.1.2":"2026-10-02T10:21:27.332Z"},"bugs":{"url":"https://github.com/getAlby/mcp/issues"},"author":{"name":"Alby contributors"},"license":"MIT","homepage":"https://github.com/getAlby/mcp#readme","keywords":["lightning","nostr","nwc","wallet","mcp","model-context-protocol","ai"],"repository":{"url":"git+https://github.com/getAlby/mcp.git","type":"git"},"description":"MCP server for controlling a Lightning wallet using Nostr Wallet Connect","maintainers":[{"name":"rolznz","email":"roland.bewick@gmail.com"},{"name":"im-adithya","email":"imadithyavardhan@gmail.com"},{"name":"reneaaron","email":"rene@twentyuno.net"},{"name":"bumi","email":"hello@michaelbumann.com"}],"readme":"# Alby Bitcoin Payments MCP Server\n\n**NEW:** also checkout [Alby CLI](https://github.com/getAlby/cli) for agents that don't support MCP.\n\nConnect a bitcoin lightning wallet to your LLM using Nostr Wallet Connect ([NWC](https://nwc.dev)).\n\nThis MCP server uses the [official MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)\n\nThis MCP server has knowledge of [NWC](https://nwc.dev/), [LNURL](https://github.com/lnurl/luds) and [L402](https://docs.lightning.engineering/the-lightning-network/l402) using [Alby SDK](https://github.com/getAlby/js-sdk) and [Alby Lightning Tools](https://github.com/getAlby/js-lightning-tools).\n\nTake a look at **[Awesome AI Bitcoin](https://github.com/getAlby/awesome-ai-bitcoin)** for places where you can use the Alby MCP.\n\n<a href=\"https://glama.ai/mcp/servers/@getAlby/mcp\">\n  <img width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/@getAlby/mcp/badge\" />\n</a>\n\n## Quick Start\n\n> In case you get stuck, see troubleshooting section below.\n\n### Use the Alby-Hosted MCP Server\n\nIf your agent supports remote MCP servers - SSE (e.g. N8N) or HTTP Streamable transports, you can connect to Alby's MCP server.\n\n- SSE: `https://mcp.getalby.com/sse`\n- HTTP Streamable: `https://mcp.getalby.com/mcp`\n\n#### Authentication\n\nBoth require providing an NWC connection secret as authentication, either as `Bearer` authentication (preferred) or via the `nwc` query parameter.\n\n##### Bearer Auth\n\nExample: `Authorization: Bearer nostr+walletconnect://...`\n\n> If your agent UI supports bearer auth, just paste the connection secret into the bearer auth field.\n\n##### Query Parameter\n\nIf your agent doesn't support bearer auth, you can pass the NWC connection secret as a query parameter.\n\nExample: `https://mcp.getalby.com/sse?nwc=ENCODED_CONNECTION_SECRET` or `https://mcp.getalby.com/mcp?nwc=ENCODED_CONNECTION_SECRET`\n\n_To get ENCODED_CONNECTION_SECRET, open browser devtools (right click -> inspect) and enter this in the console, with your own NWC connection secret set:_\n\n```js\nencodeURIComponent(\"nostr+walletconnect://...\");\n```\n\nIn case there is a message asking for confirmation for pasting, follow the instructions, and then enter the above command again.\n\nOnce the command has run, copy the output and replace ENCODED_CONNECTION_SECRET. It will look like this: `nostr%2Bwalletconnect%3A%2F%2F...`\n\n### Add to Claude Web or Claude Desktop\n\n#### Use the remote Alby MCP server\n\nCurrently, at least a Claude Pro subscription is required to be able to connect to remote MCP servers.\n\n1. Go to Settings -> Connectors\n2. Click on \"Add custom connector\"\n3. Call it `alby`\n4. What is the endpoint URI: `https://mcp.getalby.com/mcp?nwc=ENCODED_NWC_URL` (see above for instructions)\n\n#### Client-side\n\nAdd this to your claude_desktop_config.json:\n\n```json\n{\n  \"mcpServers\": {\n    \"nwc\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@getalby/mcp\"],\n      \"env\": {\n        \"NWC_CONNECTION_STRING\": \"YOUR NWC CONNECTION STRING HERE\"\n      }\n    }\n  }\n}\n```\n\n### Add to Goose Desktop\n\n1. Open Goose Desktop\n2. Go To Settings -> Advanced Settings\n3. Click on \"Add custom Extension\"\n4. Call it `alby`, and change the type to `HTTP Streamable`\n5. What is the SSE endpoint URI: `https://mcp.getalby.com/mcp`\n6. Timeout: 30\n7. Description: no\n8. environment variables: no\n\n### Add to Goose CLI\n\n#### Use the Alby MCP server\n\n1. Type `goose configure`\n2. Add extension -> Remote Extension (HTTP Streamable)\n3. Call it `alby`\n4. What is the HTTP Streamable endpoint URI: `https://mcp.getalby.com/mcp`\n5. Timeout: 30\n6. Description: no\n7. environment variables: no\n8. add custom headers: yes\n9. header name: `Authorization`\n10. header value: `Bearer nostr+walletconnect://...` (replace with your connection secret)\n\n#### Client-side\n\n1. Type `goose configure`\n2. Add extension -> Command Line Extension\n3. Call it `alby`\n4. What command should be run: `npx -y @getalby/mcp`\n5. Timeout: 30\n6. Description: no\n7. environment variables: yes\n8. environment variable name: `NWC_CONNECTION_STRING`\n9. environment variable value: `nostr+walletconnect://...` (your NWC connection secret here)\n\n### Add to Cline\n\n> Copy the below and paste it into a cline prompt. It should prompt you to update the connection string.\n\n```json\nAdd the following to my MCP servers list:\n\n\"nwc\": {\n  \"command\": \"npx\",\n  \"args\": [\"-y\", \"@getalby/mcp\"],\n  \"env\": {\n    \"NWC_CONNECTION_STRING\": \"nostr+walletconnect://...\"\n  },\n  \"disabled\": false,\n  \"autoApprove\": []\n}\n```\n\n### Add to Claude Code\n\n#### Use the Alby MCP server\n\n```bash\nclaude mcp add --transport http alby https://mcp.getalby.com/mcp --header \"Authorization: Bearer nostr+walletconnect://...\"\n```\n\n### Add to N8N via SSE\n\nYou can use the native N8N MCP Client tool connected to an AI agent. Enter your SSE endpoint, set authentication to \"Bearer\" and paste your NWC connection secret.\n\nTested with OpenRouter + anthropic/claude-3.7-sonnet\n\nSee the [N8N workflow](examples/n8n-sse) for a simple example\n\n### Add to N8N via STDIO (Community Node)\n\nCurrently this MCP server only works via command line (STDIO).\n\nYou can install the [n8n-nodes-mcp](https://github.com/nerding-io/n8n-nodes-mcp) community node and run n8n with tools enabled e.g.\n\n```bash\nN8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true npx n8n\n```\n\nCreate a blank workflow and add an AI agent node. Configure your LLM model and add a new tool \"MCP Client\" (which will have a cube next to it showing it's a community node).\n\nConfigure the MCP Client by adding a credential with Command Line (STDIO) selected.\n\ncommand: `npx`\narguments: `-y @getalby/mcp`\nenvironments `NWC_CONNECTION_STRING=nostr+walletconnect://your_key_here` (create the whole line in a text editor and paste it in, since the password field cannot be switched to plaintext)\n\nSee the [N8N paid chat workflow](examples/n8n-paid-chat-stdio) for a full example\n\n### Add to Windsurf\n\n#### Use the remote Alby MCP server\n\n1. Download and open your Windsurf Editor\n2. Click on \"Windsurf - Settings\" in the toolbar at the bottom -> \"Advanced Settings\" -> \"Cascade\" -> Plugins (MCP Servers): Click on \"Manage plugins\" -> \"View raw config\" -> you'll see your \"mcp_config.json\"\n3. Paste this to your mcp_config.json:\n\n```json\n{\n  \"mcpServers\": {\n    \"alby\": {\n      \"serverUrl\": \"https://mcp.getalby.com/sse?nwc=ENCODED_NWC_URL\"\n    }\n  }\n}\n```\n\n4. Replace \"ENCODED_NWC_URL\" as descripted above. Click \"Save\" and restart the Windsurf editor.\n\n## Modes\n\n### STDIO\n\nBy default NWC MCP Server runs locally in `STDIO` mode.\n\n### HTTP\n\nYou can set the following environment variable: `MODE=HTTP` which will enable Streamable HTTP (`http://localhost:3000/mcp`) and SSE (`http://localhost:3000/sse` Note: SSE is deprecated).\n\nHTTP requires bearer authorization, where the token is a wallet's NWC connection secret. See the authentication section further above in the README.\n\n#### Request validation\n\nThe HTTP endpoints only accept requests whose `Host` header is allowlisted. Requests from browsers (carrying an `Origin` header) are refused; MCP clients that aren't browsers don't send one. `fetch_l402` only fetches `http(s)` URLs whose hostname resolves to globally-routable addresses — loopback, link-local and private ranges are refused. This is a best-effort check: the hostname is resolved again when fetching, so a DNS server that changes its answer between the two lookups can bypass it. Configure via environment variables:\n\n| Variable | Default | Purpose |\n| --- | --- | --- |\n| `ALLOWED_HOSTS` | `localhost`, `127.0.0.1`, `[::1]` | `Host` header values to accept (comma-separated). When set, it **replaces** the defaults, so include `localhost` if you still want it. Set this to your public hostname when deploying (e.g. `mcp.getalby.com`). |\n| `BIND_HOST` | `127.0.0.1` | Address the HTTP listener binds to. The default keeps it off the network; set `::` (or `0.0.0.0`) when deploying, or when running in Docker and connecting from the host. |\n\n`fetch_l402` does not follow redirects; a URL that redirects returns an error.\n\n## From Source\n\n### Prerequisites\n\n- Node.js 20+\n- Yarn\n- A connection string from a lightning wallet that supports NWC\n\n### Installation\n\n```bash\nyarn install\n```\n\n### Building\n\n```bash\nyarn build\n```\n\n### Add your NWC connection\n\nCopy `.env.example` to `.env` and update your connection string\n\n### Inspect the tools (use/test without an LLM)\n\n`yarn inspect`\n\n### Supported Tools\n\nSee the [tools directory](./src/tools)\n\n## Troubleshooting\n\n### Model Usage\n\nMake sure you use a decent model (e.g. Claude Sonnet 3.7) otherwise the MCP server will not work.\n\n### Failure to connect to wallet, secret missing\n\nMake sure you copied the entire NWC connection secret, without spaces\n\n### Contact Alby Support\n\nVisit [support.getalby.com](https://support.getalby.com) and we're happy to help you get the MCP server working.\n","readmeFilename":"README.md"}