Docs menu

Tools

MCP server

brico mcp will expose the Vault to AI assistants over the Model Context Protocol.

Planned

Why an MCP server

An AI coding assistant that doesn’t know what your team has already built will write it again. Indexing the whole repository is the usual fix, but it is slow and expensive and still misses code in other repositories. brico mcp gives the assistant a librarian instead of the whole library. Before writing anything, it asks the Vault what already exists and gets a small, precise answer, typically a few hundred tokens.

It speaks the Model Context Protocol, so it works with Claude, Cursor, IDE agents, internal copilots and any other MCP client.

Planned tools

ToolReturns
search_pieces(query, kind?)Bricks that match the meaning of the query, not just its words. kind narrows the results.
get_piece(name, level)One brick at the level of detail the caller asks for: card, surface, summary or full source.
plan_reuse(task)For a task description: which bricks to reuse, and what is genuinely new.
get_relations(name, kind?)What a brick depends on, and what depends on it.

Detail levels for get_piece

LevelContainsUse it to
cardName, version, one-line description, tagsDecide whether it is relevant
surfaceExported types and functions, required env vars, portsWrite code that calls it
summaryWhat it does and how, in proseExplain it or judge fit
sourceThe filesRead or adapt the implementation

An assistant normally starts with plan_reuse or search_pieces, reads cards and surfaces, and asks for source only when it needs it. That keeps answers small.

An example exchange

trace
DEV    → "add jwt auth to the billing service"
TOOL   → plan_reuse("jwt auth, nest")                 · 38 tokens
VAULT  → auth@0.2.0 · card + surface                  · 244 tokens
TOOL   → "reuse auth@0.2.0; new: billing webhooks"

Planned setup

The server will run locally over stdio against the same Vault the CLI uses:

MCP client config (planned)
{
  "mcpServers": {
    "brico": {
      "command": "brico",
      "args": ["mcp"]
    }
  }
}

Add "--vault", "/path/to/team-vault" to args to point it at a different Vault.

Offline by design

The search index will live next to the Vault and rebuild from it, so the git directory stays the source of truth. Generating embeddings is the only step that touches a network, and it can always be skipped. Keyword search keeps working without it.

What to use today

Until the server ships, an assistant that can run shell commands gets most of the way with the CLI:

bash
brico search jwt          # find candidates
brico list                # everything in the Vault

You can also put a short note in your assistant’s project instructions, such as “before building a new module, run brico search for it”. Follow progress on Status and roadmap.