{"_id":"@getalby/mcp","_rev":"3-1c0deb0f4506d9838bfb4967ea3c6b8f","name":"@getalby/mcp","dist-tags":{"latest":"1.1.1"},"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","description":"MCP server for controlling a Lightning wallet using Nostr Wallet Connect","repository":{"type":"git","url":"git+https://github.com/getAlby/mcp.git"},"version":"1.1.1","type":"module","main":"build/index.js","bin":{"mcp":"build/index.js"},"scripts":{"prepack":"yarn build","build":"tsc && chmod 755 build/index.js","start":"node build/index.js","start:http":"MODE=HTTP node build/index.js","inspect":"npx @modelcontextprotocol/inspector node build/index.js"},"keywords":["lightning","nostr","nwc","wallet","mcp","model-context-protocol","ai"],"author":{"name":"Alby contributors"},"license":"MIT","dependencies":{"@getalby/lightning-tools":"^5.2.0","@getalby/sdk":"^5.1.1","@modelcontextprotocol/sdk":"^1.13.0","@types/node":"^20.11.5","dotenv":"^16.4.7","express":"^5.1.0","typescript":"^5.3.3","websocket-polyfill":"0.0.3"},"devDependencies":{"@types/express":"^5.0.2"},"_id":"@getalby/mcp@1.1.1","gitHead":"851ca386e2d4339cd18e8d48121d54a602ebdf17","bugs":{"url":"https://github.com/getAlby/mcp/issues"},"homepage":"https://github.com/getAlby/mcp#readme","_nodeVersion":"20.19.3","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Eiwv6aKA69UrvLhiBoFbQNlg14x4Cp3d9Oy0kg7e1lk9JK9znHORHdaj+anBxi1QaOEGNML6kSQ3gSKhYUqC4g==","shasum":"c7adb5bccb9654cbe53db4d9257b8e4b2e180120","tarball":"https://registry.npmjs.org/@getalby/mcp/-/mcp-1.1.1.tgz","fileCount":21,"unpackedSize":48585,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDqSs7fSMoI4roSAhr8cl8j5AkIkW7dVzdmUrWhe+56CAiEAroMsrgTwFK7uQoIcGlNt8MRM8Gj6rjQBeTuwX5QBIbc="}]},"_npmUser":{"name":"rolznz","email":"roland.bewick@gmail.com"},"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_1.1.1_1752660653214_0.5718539922697354"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-17T11:58:09.511Z","modified":"2025-07-16T10:10:53.757Z","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"},"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":{"type":"git","url":"git+https://github.com/getAlby/mcp.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\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\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 -> Integrations\n2. Click on \"Add Integration\"\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 `SSE`\n5. What is the SSE endpoint URI: `https://mcp.getalby.com/sse?nwc=ENCODED_NWC_URL` (see above for instructions)\n6. Timeout: 30\n7. Description: no\n8. environment variables: no\n\n### Add to Goose CLI\n\n#### Use the Alby MCP server (SSE)\n\n1. Type `goose configure`\n2. Add extension -> Remote Extension\n3. Call it `alby`\n4. What is the SSE endpoint URI: `https://mcp.getalby.com/sse?nwc=ENCODED_NWC_URL` (see above for instructions)\n5. Timeout: 30\n6. Description: no\n7. environment variables: no\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```json\n{\n    \"mcpServers\": {\n      \"alby\": {\n        \"serverUrl\": \"https://mcp.getalby.com/sse?nwc=ENCODED_NWC_URL\"\n      }\n    }\n  }\n```\n4. Replace \"ENCODED_NWC_URL\" as descripted above. Click \"Save\" and restart the Windsurf editor.\n\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## 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"}