briefd — Claude Code MCP server: team context on a token budget
Compiles your team's git-backed knowledge into compact context bundles and serves them to a coding agent over MCP. Useful once CLAUDE.md has grown and eats tokens every turn.
Open on GitHubWhat briefd does
briefd is a context compiler you host yourself. The knowledge sits as Markdown in a git repository: terminology, business rules, architecture decisions, conventions. briefd indexes it and answers one question from your agent — what do I need for this task — with a compiled, deduplicated bundle that stays inside the token limit you set.
Retrieval is hybrid. SQLite FTS5 handles full-text search with BM25, a pure-Go encoder computes multilingual embeddings, and reciprocal rank fusion merges the two result sets. Nothing external is required: no Postgres, no vector store, no ONNX runtime, no CGO. The index is a throwaway cache rebuilt from a clone. Agents cannot write to it — propose_update opens a branch or pull request for review, and what briefd serves changes only after a human merges.
You can try it without your own repository: briefd demo serves the built-in sample knowledge base on http://127.0.0.1:7788. The first run pulls down an embedding model of roughly 470 MB, so on a slow or offline connection it will sit there for a while; briefd demo --embeddings none skips that download. Building from source needs Go 1.26 or newer.
What it helps with
- pull task-specific context without pasting the whole
CLAUDE.mdinto the prompt - keep team knowledge in git and review changes like code
- find the right doc section by meaning instead of filename
- fit the answer into a token limit instead of truncating blindly
- propose a knowledge edit as a branch or pull request
Example prompts for the agent
- Compile the context for adding a payment endpoint to the orders service
- What do our conventions and glossary say I need for rewriting the auth module?
- Propose an update to the retry section and open a branch for review
How to install briefd
Install
The MCP registry has no launch command for it: see the repository README
Step 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 briefd
How do I install briefd in Claude Code?
Start the server first: briefd demo serves the built-in knowledge base on http://127.0.0.1:7788. Then connect it to your agent with claude mcp add --transport http briefd http://127.0.0.1:7788/mcp.
What does briefd do?
It indexes your team's Markdown knowledge from a git repository and returns a compiled context bundle within a token limit you choose. Retrieval combines BM25 over SQLite FTS5 with multilingual embeddings.
How is briefd different from agent memory tools?
Memory records what an agent saw in its own sessions, automatically and per user. briefd serves what the team decided: people write the text, every change gets reviewed, and stale sections show up on the dashboard.