Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP Overview

Bobbin implements a Model Context Protocol (MCP) server that exposes code search and analysis capabilities to AI coding assistants. When connected, an AI agent can search your codebase semantically, find coupled files, resolve symbol references, and assemble task-focused context — all without leaving the conversation.

How It Works

AI Agent (Claude Code, Cursor, etc.)
    │
    ├── MCP Protocol (JSON-RPC over stdio)
    │
    ▼
Bobbin MCP Server
    │
    ├── Tools:    search, grep, context, related, find_refs, ...
    ├── Resources: bobbin://index/stats
    ├── Prompts:   explore_codebase
    │
    ▼
Local Storage (LanceDB + SQLite)

The MCP server runs as a subprocess of the AI client. It communicates via stdin/stdout using the MCP JSON-RPC protocol. All processing happens locally — no data is sent to external services.

Starting the Server

bobbin serve              # MCP server on stdio (default)
bobbin serve --server     # HTTP REST API
bobbin serve --server --mcp  # Both HTTP and MCP simultaneously

In normal use, you don’t start the server manually. Your AI client launches it automatically based on its MCP configuration.

Capabilities

The bobbin MCP server advertises three capability types:

Tools

Nine tools for code search and analysis:

ToolDescription
searchSemantic/hybrid/keyword code search
grepKeyword and regex pattern matching
contextTask-aware context assembly with coupling expansion
relatedFind temporally coupled files
find_refsFind symbol definitions and usages
list_symbolsList all symbols defined in a file
read_chunkRead a specific code section by file and line range
hotspotsFind high-churn, high-complexity files
primeGet an LLM-friendly project overview with live stats

See Tools Reference for complete parameter documentation.

Resources

URIDescription
bobbin://index/statsIndex statistics (file count, chunk count, languages)

Prompts

NameDescription
explore_codebaseGuided exploration prompt with suggested queries for a focus area

The explore_codebase prompt accepts an optional focus parameter: architecture, entry_points, dependencies, tests, or any custom query.

Protocol Version

Bobbin implements MCP protocol version 2024-11-05 using the rmcp Rust library.

Next Steps