sb-mcp
SilverBullet MCP server, this repo uses jujutsu over git and imperative, kernel-style commits over Conventional Commits.
We also maintain the SilverBullet agent skill (SKILL.md). It and the MCP server are separate surfaces: do not make the skill reference the MCP server, and do not make MCP prose reference the skill. When changing prose in either surface, consider whether the underlying rule applies to both, and if so, update each independently.
Commands
mise run fmt ::: lint ::: build # all three in parallel, run after every edit
mise run check # fmt, lint, build, AND vet, vuln, and test
Landmines
print()is silently swallowed in the Runtime API. Always usereturnto send results back fromexecute_lua. No error, no warning — just empty output.- Space Lua is camelCase, not snake_case. All built-in functions (
space.readPage,space.writePage) use camelCase. Writingspace.read_pagewill fail. - Bearer auth and password auth coexist —
SB_TOKENsetsAuthorization: Bearer ..., whileSB_USER/SB_PASSlogs in viaPOST /.authand sends a sessionCookie. They use different headers, no override. For proxy auth (e.g. Exe.dev), use SB password authentication with Exe Bearer auth or SB Bearer auth with Exe HTTP Basic credentials embedded inSB_URL(https://user:pass@host). - Timeout clamping: Lua timeouts <1 are clamped to 1, >21600 clamped to 21600. No error raised; the value silently changes.
DisableLocalhostProtection: trueis set on the StreamableHTTP handler because nginx proxies with the external Host header. Removing it will cause 403s from the SDK's DNS rebinding protection.