NostrSAFE
A Nostr MCP server that allows to interact with Nostr, enabling posting notes, and more.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A Model Context Protocol (MCP) server that enables AI models to interact with Nostr, allowing them to post notes and interact with the freedom of speech protocol.
Censorship resistance matters, even for LLMs.
[](https://smithery.ai/server/@AbdelStark/nostr-mcp) [](https://www.typescriptlang.org/) [](https://github.com/modelcontextprotocol/typescript-sdk) [](https://nostr.com/)
BTW, you should join Nostr now!
🚀 Features
- 📝 Post notes to Nostr network
- 🔌 Connect to multiple relays
- 🤖 MCP-compliant API for AI integration
- 💸 Send Lightning zaps to Nostr users (WIP)
- 📡 Server-Sent Events (SSE) support for real-time communication
👷♂️ TODOs
- [ ] Add support for multiple simultaneous connections
- [ ] Implement stdin transport mode (configurable via environment variable)
📋 Prerequisites
- Node.js 18+
🛠️ Installation
Installing via Smithery
To install Nostr MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @AbdelStark/nostr-mcp --client claude
Manual Installation
- Clone the repository:
git clone https://github.com/AbdelStark/nostr-mcp cd nostr-mcp
- Install dependencies:
npm install
- Create a
.envfile:
💡 You can copy the .env.example file and modify it as needed.# Log level (debug, info, warn, error) LOG_LEVEL=debug # Node environment (development, production) NODE_ENV=development # List of Nostr relays to connect to NOSTR_RELAYS=wss://relay.damus.io,wss
a551dd8b7391OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add nostr-mcp --env NOSTR_NSEC_KEY=${NOSTR_NSEC_KEY} -- npx -y [email protected]{
"mcpServers": {
"nostr-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"NOSTR_NSEC_KEY": "${NOSTR_NSEC_KEY}"
}
}
}
}Exposed tools (2)
0 read · 2 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
post_note | write | Post a new note to Nostr |
send_zap | write | Send a Lightning zap to a Nostr user |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (3)
.eslintrc.cjs
.lintstagedrc.json
@nostr-dev-kit/ndk, cors, dotenv, express, husky, pino, pino-pretty, tsx
Gates applied: no_behavioural_pass.
a551dd8b7391full audit observations/trust-audit/mcp-server/abdelstark__nostr.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | a551dd8b7391 | SAFE | B | 89 | first audit |
Questions
What is the Nostr MCP server?
A Nostr MCP server that allows to interact with Nostr, enabling posting notes, and more.
What tools does Nostr expose?
2 in total: 0 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Nostr safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Nostr need?
It reads NOSTR_NSEC_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Nostr run?
It speaks sse and stdio, so it runs as a local process your client starts. It is published on npm as nostr-mcp at 0.0.15.
How current is this page?
The grade is for one exact copy of the source (a551dd8b7391), read on 2026-10-08. The repository is watched and re-audited when it changes.