Allows retrieving and analyzing remote GitHub repositories directly, enabling AI agents to explore and understand public codebases outside the current workspace
Supports outputting codebase analysis in Markdown format for better readability and documentation purposes
Mentioned as an example repository that can be analyzed using the remote codebase feature to understand specific components like testing frameworks
Enables formatting codebase output as XML, providing structured representation of code for further processing or analysis
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)
From GitHub
Integration with Cursor
To use this MCP with Cursor's Composer Agent:
- Open Cursor IDE
- Click the Composer icon in the sidebar
- Click the "MCP Servers" button at the top
- Click "Add new MCP server"
- Fill in the details:
- Name:
Codebase MCP
(or any name you prefer) - Type:
command
- Command:
codebase-mcp start
- Name:
- Click "Add" to save
Once added, the MCP will provide three powerful tools to the Composer Agent:
Available Tools
- getCodebase
- Purpose: Analyzes your current workspace/project
- Use when: You want the AI to understand your entire codebase
- Example prompt: "Please analyze my codebase to understand its structure"
- getRemoteCodebase
- Purpose: Fetches and analyzes any public GitHub repository
- Use when: You want to explore or understand other projects
- Example prompt: "Can you analyze the repository at github.com/username/repo?"
- saveCodebase
- Purpose: Saves the codebase analysis to a file for later use
- Use when: You want to preserve the codebase snapshot or share it
- Example prompt: "Save an analysis of this codebase to review later"
Example Usage in Cursor
Here are some example prompts you can use with the Composer Agent:
The Composer Agent will automatically use the appropriate tool based on your request.
Usage Outside Cursor
Starting the MCP Server
This will start the MCP server in stdio mode, which can be used by any MCP-compatible clients.
License
MIT
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A Model Context Protocol server that enables AI agents to retrieve and understand entire codebases at once, providing tools to analyze local workspaces or remote GitHub repositories.
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI models to interact with GitHub's API, allowing for repository creation and management with descriptions, topics, and website URLs through natural language commands.Last updated -1JavaScript
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -161TypeScript
- AsecurityAlicenseAqualityA flexible Model Context Protocol server that makes documentation or codebases searchable by AI assistants, allowing users to chat with code or docs by simply pointing to a git repository or folder.Last updated -12248JavaScriptMIT License
CodeAlive MCPofficial
-securityAlicense-qualityA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.Last updated -48PythonMIT License