buzz-mcp
A TypeScript MCP server for the CorePrt Nostr relay, enabling MCP-compatible clients to publish and read Nostr events. Currently a scaffold with planned tools for event publishing, fetching, searching, and subscribing.
README
@buzz/mcp
TypeScript Model Context Protocol (MCP) server for the CorePrt Nostr relay. Exposes 16 tools for talking to a CorePrt Nostr relay: identity, channels, messages, fetch & search, jobs, workflows, media, thread summaries, and WebSocket subscriptions. One operator identity per process, signed by
BUZZ_PRIVATE_KEY. Speaks NIP-98 HTTP and NIP-42 WebSocket auth — no daemon, no Rust, just a stdio binary.
Run it as a child of any MCP-aware client (Claude Desktop, Cursor, Zed,
ggcoder) and gain a Buzz workspace of tools. The full
operator-facing manual is at docs/quickstart.md;
this README is the 60-second pitch.
Status
All 6 planned PRs are shipped:
| PR | Branch | What it adds |
|---|---|---|
| #1 | feat/scaffold |
package, stdio transport, McpServer factory |
| #2 | feat/signer |
local nsec holder + NIP-98 signedFetch + BIP-340 |
| #3 | feat/first-tool |
buzz_post_message + typed event builders |
| #4 | feat/tools |
+11 more tools (identity, channels, fetch, jobs, media, summaries) |
| #5 | feat/subscribe |
+3 tools (buzz_subscribe, buzz_poll, buzz_unsubscribe) |
| #6 | feat/docs |
this PR — docs/quickstart.md, mcp-config.example.json, CHANGELOG.md |
Ready to tag: v0.1.0.
Tool list (16)
Tools are registered in alphabetical order (REGISTERED_TOOLS in
src/index.ts):
| Tool | Read/Write | One-line |
|---|---|---|
buzz_add_member |
write | Publish a kind:9000 NIP-29 add_member event. |
buzz_approve_workflow |
write | Publish kind:46030 (approve) or kind:46031 (reject) referencing a workflow. |
buzz_create_channel |
write | Publish a kind:9007 NIP-29 create_channel event. |
buzz_create_job |
write | Publish a kind:43001 KIND_JOB_REQUEST event. |
buzz_edit_message |
write | Publish a kind:40003 edit referencing an existing message. |
buzz_fetch_events |
read | POST a NIP-01 filter to /query; returns the raw event array. |
buzz_identity |
read | Relay NIP-11 info doc + the operator's derived pubkey/npub. |
buzz_list_channels |
read | kind:9007 NIP-29 channels visible to the operator. |
buzz_poll |
read | Drain buffered EVENT frames from a sub_id (FIFO). |
buzz_post_message |
write | Publish a kind:9 NIP-29 stream message; reply via NIP-10. |
buzz_post_thread_summary |
write | Publish a kind:39005 KIND_THREAD_SUMMARY event. |
buzz_react |
write | Publish a kind:7 NIP-25 reaction. |
buzz_search |
read | NIP-50 free-text search (falls back to client-side includes). |
buzz_subscribe |
side-effect | Open a ["REQ", sub_id, filter] against the shared WS. |
buzz_unsubscribe |
side-effect | Send ["CLOSE", sub_id] and drop it from the manager. |
buzz_upload_media |
write | PUT /media/upload (or /upload); base64 or CWD-scoped path; max 1 MiB. |
Grouped by category:
- Identity & Channels —
buzz_identity,buzz_list_channels,buzz_create_channel,buzz_add_member. - Messages —
buzz_post_message,buzz_edit_message,buzz_react. - Fetch & Search —
buzz_fetch_events,buzz_search. - Jobs & Workflows —
buzz_create_job,buzz_approve_workflow. - Media & Summaries —
buzz_upload_media,buzz_post_thread_summary. - Subscriptions —
buzz_subscribe,buzz_poll,buzz_unsubscribe.
Quickstart
# Recommended for production: npx, no install
npx @buzz/mcp
# From source
git clone https://github.com/0xtsotsi/buzz-mcp && cd buzz-mcp
npm install && npm run build
node dist/cli.js # or: npm link && buzz-mcp
Then drop one of the three variants from
docs/mcp-config.example.json into
~/.gg/mcp.json (Track A pinned path, Track B npx, or Track B with raw
${VAR} env). Set BUZZ_PRIVATE_KEY in
~/.config/coreprt/buzz-mcp.env (chmod 600). Verify with buzz_identity.
The 60-second walkthrough, troubleshooting, and full env table are at
docs/quickstart.md.
Package manager
This package is installed with npm, not pnpm. The lockfile committed
to this repo is package-lock.json. If your local environment only has
pnpm installed, get npm first (e.g. via corepack enable && corepack prepare npm@latest --activate, or via your Node installer of choice) and
then run npm install. Do not commit a pnpm-lock.yaml.
Requirements
- Node.js ≥ 22 (declared in
engines.node). - npm ≥ 10.
Build & run
npm run build # → dist/index.js, dist/cli.js + .d.ts files
npm run typecheck # tsc --noEmit on src/
npm run typecheck:test # tsc --noEmit on test/
npm start # node dist/cli.js
node dist/cli.js # explicit form
The process speaks MCP over stdio — point your MCP client at
buzz-mcp (or at node /path/to/repo/dist/cli.js) and the JSON-RPC
handshake runs automatically. The BUZZ_PRIVATE_KEY and BUZZ_RELAY_URL
env vars are read once at server boot; a missing BUZZ_PRIVATE_KEY
throws a clear error.
Test
npm test # vitest run — 93 tests across 13 files
The local block/buzz integration test is deferred — it spins up the
Rust relay via Docker Compose and needs tmux + psql on the operator's
Mac. A pure-JS happy-path suite (event building, signing, NIP-98 wrapping,
subscription FSM) covers the public tool surface in npm test.
Layout
.
├── src/
│ ├── index.ts # createServer() factory — wires all 16 tools
│ ├── cli.ts # stdio entry point — the `buzz-mcp` bin
│ ├── relay/ # signer + signedFetch (NIP-98) + subscription FSM
│ │ ├── client.ts
│ │ ├── event-builder.ts
│ │ ├── signer.ts
│ │ └── subscription.ts
│ ├── tools/ # one file per category
│ │ ├── identity.ts
│ │ ├── messages.ts
│ │ ├── fetch.ts
│ │ ├── jobs.ts
│ │ ├── media.ts
│ │ ├── summaries.ts
│ │ └── subscribe.ts
│ └── util/ # shared helpers
│ ├── relay-call.ts # timeout + ack parsing + error envelope
│ └── zod.ts
├── test/
│ ├── index.spec.ts # createServer() + MCP tools/list smoke
│ └── unit/ # 12 vitest specs covering each tool
├── docs/
│ ├── quickstart.md
│ └── mcp-config.example.json
├── package.json # name, version, deps, bin
├── tsconfig.json # ES2022 / NodeNext / strict
├── tsconfig.test.json
├── vitest.config.ts
├── CHANGELOG.md
├── NOTICE # Apache-2.0 attribution
└── LICENSE # Apache-2.0
The compiled output lives in dist/ and ships via the files field in
package.json.
License
Apache-2.0. See LICENSE and NOTICE.
The Nostr protocol is the work of the Nostr community; CorePrt is a separate project maintained at https://github.com/0xtsotsi/coreprt.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。