Agents reach rkb through tools: a Claude Code plugin with an MCP server, and a pi/omp extension
Context#
With only the skill installed, pi with a Codex model searched the web instead of rkb, and Claude called rkb through Bash without --toon. A skill loads only when the model picks it; a tool is in the tool list at every step. Claude Code adds model-visible tools only through MCP servers, and plugins cannot set permissions.
Decision#
Offer four tools (rkb_search, rkb_show, rkb_add, rkb_note), defined once in rkb and run by rkb tool <name>. Claude Code gets them from rkb mcp inside the rkb plugin, which rkb install claude writes as a local marketplace and installs with claude plugin; the rkb confirm ask rule and the tool allow rules stay in settings.json. pi and omp get them from the extension, a TypeScript package in extensions/rkb/ whose one source file is embedded in the binary. rkb mcp is hand-written blocking JSON-RPC.
Why#
Tools work whether or not the model loads the skill. One runner keeps the harnesses in step. The Rust MCP crates (rmcp, rust-mcp-sdk, brontes) all need Tokio, which rkb avoids, and the server needs only a few methods. Embedding the extension keeps it in step with the binary.
Rejected options#
- A single
rkbtool that takes any command: harder for the model to use, and it would let an agent runrkb confirmaround the harness gate. - Loose files in
~/.claude(hooks insettings.json, command files,claude mcp add): no version and no single uninstall. - Publishing the extension to npm: a second thing to version beside the binary.