Roam Code
Local codebase intelligence CLI + MCP server for AI coding agents: SQLite code graph, 28 languages, 238 commands, 224 MCP tools, change-safety gates, audit evidence, zero API keys.
What is Roam Code?
Roam Code is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to local codebase intelligence cli + mcp server for ai coding agents: sqlite code graph, 28 languages, 238 commands, 224 mcp tools, change-safety gates, audit evidence, zero api keys.
Local codebase intelligence CLI + MCP server for AI coding agents: SQLite code graph, 28 languages, 238 commands, 224 MCP tools, change-safety gates, audit evidence, zero API keys.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Local codebase intelligence CLI + MCP server for AI coding a
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx roam-codeConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Roam Code
Roam Code is a local codebase intelligence CLI and MCP server that builds a SQLite symbol graph of your repository and exposes it through 243 MCP tools across 7 capability presets. It supports 28 programming languages and provides AI coding agents with accurate, graph-aware context retrieval, pre-change safety gates, dependency tracking, patch verification, and CI/CD integration with SARIF output — all without any external API keys or cloud services. Teams use it to give AI agents a structured understanding of their codebase rather than raw file dumps.
Prerequisites
- Python 3.10 or higher installed
- pip, pipx, or uv package manager
- A Git repository to index
- An MCP client such as Claude Code or Cursor
Install roam-code with MCP server support
Install the package with the mcp extra to include all MCP server dependencies. Using pipx or uv tool install keeps it isolated from your project environment.
pip install "roam-code[mcp]"
# Or with pipx (recommended for isolation)
pipx install roam-codeInitialise the codebase index
Run 'roam init' from your repository root. This creates a .roam/index.db SQLite file containing the symbol graph for your project. Initial indexing typically takes around 30 seconds.
cd /path/to/your/repo
roam initCheck codebase health
Run 'roam health' to get a 0-100 health score for your codebase. This is a useful baseline before connecting an AI agent.
roam healthWire roam into Claude Code (optional)
Use the hooks command to automatically add compile and verify steps to Claude Code's workflow, so the agent runs roam checks after each code change.
roam hooks claude --writeConfigure your MCP client
Add roam-code to your .mcp.json or claude_desktop_config.json. The 'roam mcp' command starts the MCP server process.
Roam Code Examples
Client configuration
Add roam-code to your MCP client using the .mcp.json format. Run this from the repository root so roam can find the .roam/index.db file.
{
"mcpServers": {
"roam-code": {
"command": "roam",
"args": ["mcp"]
}
}
}Prompts to try
Once roam-code is connected to your AI assistant, try these prompts to explore its capabilities.
- "Give me a full briefing on this codebase — what does it do and how is it structured?"
- "Show me the dependency context for the UserAuthService symbol."
- "Run a pre-change safety check before I modify the payment processing module."
- "Retrieve all code context relevant to implementing a new rate-limiting feature."
- "Critique my latest patch against the symbol graph and flag any issues."
- "What is the health score of this codebase and what are the main issues?"Troubleshooting Roam Code
roam init fails or .roam/index.db is not created
Make sure you are running 'roam init' from the root of a Git repository. Roam requires a .git directory to be present. Check Python version with 'python --version' — Python 3.10 or higher is required.
MCP client cannot launch the 'roam' command
Ensure the roam binary is on your PATH by running 'which roam'. If installed with pipx, run 'pipx ensurepath' to add the pipx bin directory to your PATH and restart your terminal.
MCP tools return stale results after code changes
Re-run 'roam init' to rebuild the symbol graph index after significant code changes. For incremental updates, run 'roam verify --diff-only' to check only the changed files.
Frequently Asked Questions about Roam Code
What is Roam Code?
Roam Code is a Model Context Protocol (MCP) server that local codebase intelligence cli + mcp server for ai coding agents: sqlite code graph, 28 languages, 238 commands, 224 mcp tools, change-safety gates, audit evidence, zero api keys. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Roam Code?
Follow the installation instructions on the Roam Code GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Roam Code?
Roam Code works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Roam Code free to use?
Yes, Roam Code is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
Roam Code Alternatives — Similar Developer Tools Servers
Looking for alternatives to Roam Code? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Roam Code in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Roam Code?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.