
SilverBullet
io.github.wicahmav1.0.0更新於 Oct 4, 2026
List, read, write, append, delete and search markdown pages in a SilverBullet space.
概覽
讓助理透過六個筆記工具讀取和寫入 SilverBullet 空間中的 Markdown 頁面。
- 功能
- 這是一個小型橋接服務,把 MCP 工具呼叫轉送到 SilverBullet 內建的 /.fs HTTP API。它提供六個工具:list_pages、read_note、write_note、append_note、delete_note 和 search_notes,其中搜尋為不分大小寫的子字串比對,回傳路徑、行號和文字。路徑相對於空間,僅限 .md,並拒絕目錄穿越片段。可透過 stdio 或 streamable HTTP 執行。
- 適用情境
- 當助理需要讀取、建立、附加、覆寫、刪除或搜尋現有 SilverBullet 空間中的筆記時使用,例如在聊天用戶端中起草或更新頁面。若只是自己瀏覽 SilverBullet,則無需安裝。
- 執行需求
- 需要本機執行環境:npm 套件(npx silverbullet-mcp)需要 Node.js,或直接使用 Python 3,因為 npm 包裝器只是啟動一個 Python 指令碼。需要一個可存取且暴露 /.fs API 的 SilverBullet 執行個體,透過 SB_URL 設定。HTTP 模式下必須提供 MCP_TOKEN bearer 權杖;SB_AUTH_TOKEN 為選用的上游驗證。需要能存取該執行個體的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 SilverBullet,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
silverbullet-mcp
A tiny MCP server that gives any MCP-capable agent read/write access to a SilverBullet space.
No dependencies — Python 3 stdlib only. It is a translator: it forwards MCP tool
calls to SilverBullet's built-in /.fs HTTP API, which already supports read,
write and delete. Nothing needs to be installed or patched inside SilverBullet.
It is small enough to read in one sitting, and it speaks both MCP transports that clients actually use: stdio (spawned by Claude Desktop, Cursor, and friends) and streamable HTTP (shared or remote access behind a reverse proxy).
Quick start
Run it as a server:
Or let a client spawn it — no clone required, since it ships on npm:
Tools
Paths are space-relative (Projects/Foo.md), restricted to .md, and ..
segments are rejected.
Transports
Both come from the same code and expose the same six tools. MCP_TOKEN only
matters in HTTP mode; the SB_* variables describe the upstream space in both.
Client setup
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or
%APPDATA%\Claude\claude_desktop_config.json (Windows):
Cursor
Same body, in .cursor/mcp.json for one project or ~/.cursor/mcp.json
globally.
Any client that speaks remote MCP
Local, with no reverse proxy in front:
Note for remote clients: url must be, or must proxy to, this bridge — not
SilverBullet itself. SilverBullet has no MCP endpoint of its own; that is what
this project adds.
Configuration
All configuration is environment variables, so the same code runs for anyone.
HTTP endpoints
POST /mcp— JSON-RPC 2.0. Bearer token required. A notification returns202.GET /health(alsoGET /mcp/health) —{"status":"ok"}, no auth, no internal details.
Protocol versions negotiated: 2024-11-05, 2025-03-26, 2025-06-18.
Maximum request body 4 MB. Batch arrays are accepted.
Auth
The bearer token is the gate. Fail closed: if MCP_TOKEN is set, every request
without a matching token is rejected. If it is unset the server still starts (for
local debugging) but logs a loud warning.
Do not expose this server to the internet without a token. Anyone who can
reach /mcp can read, overwrite and delete every page in the space.
SilverBullet's own auth
Setting SB_AUTH_TOKEN alone on recent SilverBullet builds (verified on the
2.10.0 Rust build) does not enable authentication — anonymous requests still
succeed. Per upstream docs the token is only an alternative bearer path; the
server actually enforces auth when SB_USER is configured. If in doubt, probe
your own instance with a deliberately wrong bearer token: if it still returns
200, auth is off.
Practical consequence: put the token gate at this bridge (or at your reverse proxy), not at SilverBullet.
Deployment
systemd user unit
Keep the env file mode 600.
Behind a reverse proxy
Works fine behind Cloudflare Tunnel, nginx, Caddy, etc. Two notes from real deployments, both learned the hard way:
- Route by path on an existing hostname if you are on a free TLS plan: some providers issue certificates for the apex and a single subdomain level only, so a two-level hostname may fail the TLS handshake. A path route on an already-covered host avoids that entirely.
- Machine clients cannot complete SSO. If your host sits behind an identity-aware
proxy (Cloudflare Access and similar), bypass the MCP path and let the bearer
token be the gate. This is the usual split: the SilverBullet UI and its
/.fsAPI stay behind SSO, while/mcpis public but token-gated.
Troubleshooting
Security notes
- Paths are restricted to
.mdand..traversal segments are rejected. write_noteoverwrites with no revision history.- Binds to loopback by default; the reverse proxy is the sole ingress.
search_notesreads every page on each call. There is no index.- The bridge stores nothing. It holds no state beyond the environment it was started with, so a restart is always safe.
Distribution
Published as an npm package and as an agent plugin from this same repository.
server.json is the official MCP Registry entry (schema 2025-12-11): the npm
package, run over stdio. It deliberately declares no remote endpoint — that is
each deployment's own URL, so add a remotes entry if you want yours listed.
The registry name is reverse-DNS and must match the publishing GitHub account:
replace OWNER in server.json ("name") and package.json ("mcpName") with
your GitHub login before publishing — the two must be identical.
Agent plugin manifests live at .zcode-plugin/plugin.json (ZCode) and
.claude-plugin/plugin.json + .claude-plugin/marketplace.json (Claude Code and
the skills.sh layout). The plugin ships the MCP server plus
skills/silverbullet-mcp/, and reads the bearer token from the client's user
config as mcp_token, so no secret is stored in the repository.
License
MIT
來源:README.md,提交 3fdfc9c
工具
0版本歷史
1- v1.0.0最新Oct 4, 2026

