sb-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
sb-mcp
An MCP server for SilverBullet. It exposes a space's pages to any MCP client over stdio or Streamable HTTP, talking to SilverBullet's HTTP API (/.fs, /.ping, /.config, /.search).
Runs on Node 24+ (and Bun). No runtime dependencies — the published tarball is a single bundled file, so npx starts instantly.
npx sb-mcp --url https://notes.example.com --token "$SB_AUTH_TOKEN"Configuration
Variable | Required | Default | Notes |
| yes | — | Space root, e.g. |
| yes | — | Must match the server's |
| no |
| Per-request timeout. |
| no | — | Set to |
| no | space root | Folder that all access is confined to, e.g. |
| no |
|
|
| no |
| HTTP bind address. |
| no |
| HTTP port. |
| with | — | Required by the HTTP transport; clients send it as |
The token is read from the environment and used by this process only; it is never exposed as a tool argument or sent to the model.
Every setting also has a flag — --url, --token, --timeout, --read-only, --prefix, --http, --host, --port, --http-token — and flags win when both are set. Run npx sb-mcp --help for the list.
Related MCP server: mcp-server-silverbullet
Connect
Claude Code:
claude mcp add silverbullet \
-e SB_URL=https://notes.example.com \
-e SB_AUTH_TOKEN=... \
-- npx -y sb-mcpAny client that takes a JSON config:
{
"mcpServers": {
"silverbullet": {
"command": "npx",
"args": ["-y", "sb-mcp"],
"env": {
"SB_URL": "https://notes.example.com",
"SB_AUTH_TOKEN": "..."
}
}
}
}HTTP transport
npx sb-mcp --http --port 3001 --http-token "$MCP_HTTP_TOKEN"
# MCP endpoint: http://127.0.0.1:3001/mcp
# health check: http://127.0.0.1:3001/healthStateless Streamable HTTP — a fresh server instance per request, no session state to expire. The endpoint requires Authorization: Bearer $MCP_HTTP_TOKEN on every request; there is no unauthenticated mode, because these tools can write to your space. Keep the default 127.0.0.1 bind unless something in front of it terminates TLS and authenticates.
{
"mcpServers": {
"silverbullet": {
"type": "http",
"url": "http://127.0.0.1:3001/mcp",
"headers": { "Authorization": "Bearer ..." }
}
}
}Tools
Tool | What it does |
| Verifies URL + token and reports space name, index page, read-only flag, revision mode. |
| Lists pages with size and mtime; filter by prefix, sort by name or recency. |
| Reads markdown with its ETag; optional line range. |
| Word, phrase or semantic search via the server's backend. |
| Full replace; |
| Appends (creates if missing), retrying on concurrent edits. |
| Exact-snippet replacement; refuses ambiguous matches unless |
| Deletes exactly one page, optionally guarded by |
sb_write_page, sb_append_to_page, sb_replace_in_page and sb_delete_page are not registered when SB_READ_ONLY=1.
Root prefix
By default the server sees the whole space, including SilverBullet's own CONFIG, SETTINGS and Library/* pages. Set SB_PREFIX (or --prefix) to confine it to one folder:
npx sb-mcp --prefix notesThe trailing slash is optional — notes, notes/ and /notes/ all resolve to the same root; it is normalized once, so every tool sees notes/.
With that root, sb_read_page { page: "Projects/Alpha" } reads notes/Projects/Alpha.md, sb_list_pages returns only names under notes/ (already stripped of the prefix), and search results outside it are dropped. Anything that would resolve outside the root — ../, a leading /, a path that escapes the folder — is rejected, so the tools cannot reach the rest of the space.
Behavior notes
Search scope follows the space:
scopedefaults to all pages, so meta pages appear unless you narrow it withscope: "pages"or set a root prefix.Page names omit the
.mdextension:Projects/Alpha.[[Projects/Alpha]],Projects/Alpha#Statusand a leading/are accepted and normalized.Conflicts, not clobbers. Reads return an ETag; writes pass it as
If-Match. A concurrent edit surfaces as412and is reported as "the page changed since it was read" instead of overwriting it.sb_append_to_pagere-reads and retries.Attribution. Writes send
X-Source: externalso the space records them correctly.Search needs a search backend on the server. Without one the tool returns a clear message rather than failing silently.
Not exposed:
/.shell(arbitrary server-side command execution),/.proxy(SSRF surface) and revisions.
Development
bun install
bun run build # bundles src/main.ts -> dist/main.js for Node
bun run check # tsc --noEmit
node dist/main.js --helpTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Notes, files, GitHub, and Drive through one MCP connection.
Notes, files, GitHub, and Drive through one MCP connection.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes a SilverBullet note space to Claude via MCP, with OAuth 2.1, collision-safe writes, and structured errors.1MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that connects a SilverBullet space over its HTTP filesystem API, exposing a scoped prefix of notes to AI agents with read/write/delete capabilities.MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to read and search pages in a remote SilverBullet space and create or append to notes under a configurable prefix via SilverBullet's HTTP API.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceGives MCP-capable agents read and write access to a SilverBullet space, letting them list, read, create, overwrite, append to, delete, and substring-search markdown pages. It forwards tool calls to SilverBullet's built-in /.fs HTTP API over either stdio or token-gated streamable HTTP, with no changes needed inside SilverBullet itself.37 npmMIT