codebase-mcp
Model Context Protocol implementation for retrieving codebases using RepoMix
Documentation
Codebase MCP
A Model Context Protocol (MCP) server implementation that provides tools to retrieve and analyze entire codebases using RepoMix.
This MCP allows AI Agents like Cursor's Composer Agent to automatically read and understand entire codebases at once, making it easier for developers to work with large codebases and for AI assistants to have comprehensive context of a project.
Features
- ๐ Codebase Retrieval: Retrieve the entire codebase as a single text output in different formats (XML, Markdown, Plain)
- ๐ Remote Repository Support: Process remote GitHub repositories directly
- ๐พ File Saving: Save the processed codebase to a file
- ๐ง Customizable Options: Control how the codebase is processed with various options (comments, line numbers, file summaries, etc.)
Installation
From NPM (Recommended)
# Install the package globally
npm install -g codebase-mcp
# Install RepoMix (required dependency)
codebase-mcp installFrom GitHub
# Clone the repository
git clone https://github.com/DeDeveloper23/codebase-mcp.git
# Navigate to the project directory
cd codebase-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Install globally
npm install -g .
# Install RepoMix (required dependency)
codebase-mcp installIntegration with Cursor
To use this MCP with Cursor's Composer Agent:
1. Open Cursor IDE
2. Click the Composer icon in the sidebar
3. Click the "MCP Servers" button at the top
4. Click "Add new MCP server"
5. Fill in the details:
6. Click "Add" to save
Once added, the MCP will provide three powerful tools to the Composer Agent:
Available Tools
1. getCodebase
2. getRemoteCodebase
3. saveCodebase
Example Usage in Cursor
Here are some example prompts you can use with the Composer Agent:
"Analyze my current project and explain its main components."
"Can you look at the tensorflow/tensorflow repository and explain how their testing framework works?"
"Save an analysis of my project to 'codebase-analysis.md' in markdown format."The Composer Agent will automatically use the appropriate tool based on your request.
Usage Outside Cursor
Starting the MCP Server
codebase-mcp startThis will start the MCP server in stdio mode, which can be used by any MCP-compatible clients.
License
MIT
Frequently asked questions
What is codebase-mcp?
codebase-mcp is Model Context Protocol implementation for retrieving codebases using RepoMix
How do I install codebase-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is codebase-mcp open source?
Yes โ it is hosted on GitHub at https://github.com/dedeveloper23/codebase-mcp and has 60 stars.
Related MCP tools
๐ Cherry Studio is a desktop client that supports for multiple LLM providers. Built for the Model Context Protocol to enhance AI capabilities.
Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini...
FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, ...
Composio equips your AI agents & LLMs with 100+ high-quality integrations via function calling for the Model Context Protocol. Enhance AI assistants with powerf
๐ฆ Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Lan...
AI Agents & MCPs & AI Workflow Automation โข (~400 MCP servers for AI agents) โข AI Automation / AI Agent with MCPs โข AI Workflows & AI Agents โข MCPs for AI Ag...
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP