PromptBranch — Claude Code MCP server: what it does, how to install
Local-first prompt versioning and library for developers. Lets coding agents query templates, log test runs, and submit revisions without altering active instructions.
claude mcp add promptbranch -- npx -y @promptbranch/mcpWhat PromptBranch does
This MCP server links your coding agent to a local SQLite database at library.db. The same file serves the desktop application and the CLI tool. Through exposed tools, the agent looks up prompt entries by ID or title, pulls instruction text, and records evaluation logs.
Integration enforces a strict boundary: agents can only propose edits. Calling suggest_variation writes an unlisted candidate version into a pending queue instead of modifying current content. Humans must inspect and approve these suggestions inside the desktop interface before they take effect.
All prompt data stays on your local filesystem. You can redirect storage to an alternate file by configuring PROMPTBRANCH_DB. Launching the server requires Node.js along with npx.
What it helps with
- retrieve prompt templates by title or partial search query
- log model evaluation outcomes and notes directly to the local catalog
- draft prompt variations without overwriting working versions
- keep complete prompt history on the local machine
Example prompts for the agent
- Search PromptBranch for our security audit prompt and display the text.
- Log a test run for the security-audit prompt with outcome score 4.
- Suggest a variation for the code review prompt with focused constraints.
How to install PromptBranch
Platform CLI
claude mcp add promptbranch -- npx -y @promptbranch/mcpPlatform CLI
codex mcp add promptbranch -- npx -y @promptbranch/mcpConfig file
{
"mcpServers": {
"promptbranch": {
"command": "npx",
"args": [
"-y",
"@promptbranch/mcp"
]
}
}
}Config file
{
"servers": {
"promptbranch": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@promptbranch/mcp"
]
}
}
}Platform CLI
gemini mcp add promptbranch npx -y @promptbranch/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about PromptBranch
How do I install PromptBranch in Claude Code?
Run claude mcp add promptbranch -- npx -y @promptbranch/mcp in your terminal. You need Node.js with npx available in your environment.
What does the PromptBranch MCP server do?
It exposes tools for searching, reading, and testing prompts from your local library. Agents can log execution metrics and propose edits as pending drafts.
Can an AI agent overwrite existing prompts through this server?
No. When an agent suggests an edit, PromptBranch creates a pending variation that stays hidden until you approve it in the desktop client.