{"_id":"@diegoaly_/nostr-mcp","name":"@diegoaly_/nostr-mcp","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@diegoaly_/nostr-mcp","version":"0.2.0","description":"A safe, read-only Model Context Protocol server for Nostr","type":"module","bin":{"nostr-mcp":"dist/index.js"},"engines":{"node":">=20.19.0"},"scripts":{"build":"tsc -p tsconfig.build.json","check":"npm run typecheck && npm run test && npm run build && npm run test:stdio && npm run test:package","prepack":"npm run build","prepublishOnly":"npm run check","test":"vitest run","test:package":"node test/package-smoke.mjs","test:stdio":"node test/stdio-smoke.mjs","test:watch":"vitest","typecheck":"tsc -p tsconfig.json --noEmit"},"keywords":["mcp","model-context-protocol","nostr","relay"],"author":{"name":"Diego Yegros","url":"https://github.com/DiegoYegros"},"repository":{"type":"git","url":"git+https://github.com/DiegoYegros/nostr-mcp.git"},"bugs":{"url":"https://github.com/DiegoYegros/nostr-mcp/issues"},"homepage":"https://github.com/DiegoYegros/nostr-mcp#readme","publishConfig":{"access":"public"},"license":"MIT","dependencies":{"@modelcontextprotocol/server":"2.0.0","nostr-tools":"2.24.2","ws":"8.21.3","zod":"4.4.3"},"devDependencies":{"@modelcontextprotocol/client":"2.0.0","@types/node":"24.10.1","@types/ws":"8.18.1","typescript":"5.9.3","vitest":"4.1.11"},"gitHead":"7d0ad75be9b0d6cacb76e753494728981d2958f0","_id":"@diegoaly_/nostr-mcp@0.2.0","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-RB4EYhjZ68gF56JuSi69WwTloLt6mkEdtwcM+bwBGJW94EPwbrlgV+ndeGXGG07bwCPnbXaUS0Zt/0yt0tcVRw==","shasum":"b27551b41cdf757ce842fc5c00101af613493cb7","tarball":"https://registry.npmjs.org/@diegoaly_/nostr-mcp/-/nostr-mcp-0.2.0.tgz","fileCount":117,"unpackedSize":334276,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD/sEVFZkTVaKg+nBY3dpE2DIxIKTH6Fsq4xoDIgMG1iQIhAJFLgWrfC7z3cwzxTKAe2vFs+QALfT0A/Yyhm1btqnnb"}]},"_npmUser":{"name":"diegoaly_","email":"diegoyegrosa@gmail.com"},"directories":{},"maintainers":[{"name":"diegoaly_","email":"diegoyegrosa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nostr-mcp_0.2.0_1787296580295_0.6161329950264749"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-21T07:16:20.112Z","0.2.0":"2026-08-21T07:16:20.438Z","modified":"2026-08-21T07:16:20.700Z"},"maintainers":[{"name":"diegoaly_","email":"diegoyegrosa@gmail.com"}],"description":"A safe, read-only Model Context Protocol server for Nostr","homepage":"https://github.com/DiegoYegros/nostr-mcp#readme","keywords":["mcp","model-context-protocol","nostr","relay"],"repository":{"type":"git","url":"git+https://github.com/DiegoYegros/nostr-mcp.git"},"author":{"name":"Diego Yegros","url":"https://github.com/DiegoYegros"},"bugs":{"url":"https://github.com/DiegoYegros/nostr-mcp/issues"},"license":"MIT","readme":"# nostr-mcp\n\nA Model Context Protocol server for Nostr. Agents can read verified public data and act on Nostr: post notes and replies, react, repost, publish articles, manage drafts, send encrypted direct messages, upload media, and send Lightning zaps. Private keys stay out of the conversation because signing happens inside the server process.\n\nReads report relay provenance. Invalid signatures are discarded, duplicate events are merged, and partial relay failures show up in results instead of being hidden.\n\n## Quick start\n\n```bash\n# Register with Codex (or point any MCP host at the stdio command below)\nnpx -y @diegoaly_/nostr-mcp@latest install\n\n# Create an encrypted identity (NIP-49 key file, passphrase prompted)\nnpx -y @diegoaly_/nostr-mcp@latest key generate\n```\n\n```jsonc\n// Any MCP host. Signing activates when NOSTR_KEY_PASSPHRASE is present.\n{\n  \"mcpServers\": {\n    \"nostr\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@diegoaly_/nostr-mcp@latest\"],\n      \"env\": { \"NOSTR_KEY_PASSPHRASE\": \"{your-passphrase}\" }\n    }\n  }\n}\n```\n\nWith no identity configured the server runs read-only, and every write tool explains how to enable itself when called. If you would rather not hold keys locally at all, use a NIP-46 bunker: set `NOSTR_BUNKER_URI=bunker://...` from [Amber](https://github.com/greenart7c3/Amber) on Android, and the key never touches this machine.\n\n## What it can do\n\n**Read & discover.** Resolve any identifier (`npub`, `note`, `nevent`, `naddr`, NIP-05 handles), fetch profiles and events with relay provenance, reconstruct full threads, run full-text search over NIP-50 relays, look up NIP-65 relay lists, inspect NIP-11 relay documents.\n\n**Publish.** Notes with automatic reply threading, reactions, reposts, deletes that check ownership first, profile editing that preserves unknown fields, and long-form markdown articles where republishing a slug edits the article.\n\n**Drafts, DMs, media, money.** Encrypted local drafts. Sealed-sender private messages over NIP-17. Blossom media uploads that return ready-made imeta tags. Lightning zaps through Nostr Wallet Connect, capped by a server-side spend limit.\n\nThe complete tool reference lives in [`docs/tools.md`](docs/tools.md), and the protocol coverage matrix in [`docs/nips.md`](docs/nips.md).\n\n## Identity options\n\n| Option | Setup | Key location |\n| --- | --- | --- |\n| Encrypted key file *(recommended)* | `key generate` + `NOSTR_KEY_PASSPHRASE` | This machine, NIP-49-encrypted |\n| Remote signer / Amber (NIP-46) | `NOSTR_BUNKER_URI=bunker://...` | Off-machine; signer approves each request |\n| Raw env var *(automation only)* | `NOSTR_NSEC=nsec1...` | Process environment |\n\nZaps additionally need a wallet URI (`NOSTR_WALLET_NWC`, from Alby/Primal/Coinos). Per-zap spending is capped by `NOSTR_MAX_ZAP_MSAT` regardless of what an agent tries.\n\nFull details in [`docs/configuration.md`](docs/configuration.md).\n\n## Documentation\n\n| Doc | Contents |\n| --- | --- |\n| [`docs/tools.md`](docs/tools.md) | All 27 tools: inputs, outputs, capability gating |\n| [`docs/nips.md`](docs/nips.md) | Supported NIPs: implemented, internal, excluded |\n| [`docs/configuration.md`](docs/configuration.md) | Every environment variable, identity setup, wallet setup |\n| [`docs/architecture.md`](docs/architecture.md) | Layer structure, key interfaces, read/publish pipelines, secret handling |\n| [`docs/development.md`](docs/development.md) | Dev workflow, testing principles, releasing |\n| [`SECURITY.md`](SECURITY.md) | Trust boundaries and vulnerability reporting |\n\n## Requirements\n\n- Node.js 20.19 or newer\n- An MCP host that supports stdio servers\n\n## Development\n\n```bash\nnpm run check\n```\n\nType checking, 172 offline tests, build, a real-stdio smoke test, and npm package validation. See [`docs/development.md`](docs/development.md).\n\n## Security model\n\n- Signing happens inside the server process; keys never appear in tool inputs, outputs, or logs\n- NIP-49 encrypted keys at rest; NIP-46 bunker mode keeps keys off the machine entirely\n- Server-enforced zap spend cap; destructive tools are annotated and gated behind explicit configuration\n- Signature verification before events reach the agent; strict relay URL validation against SSRF\n- Bounded relay counts, result sizes, and timeouts; per-relay errors reported, never swallowed\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-7f1d8c6d1f2be3e96d14e4bce2d76d7c"}