trackmcp
Back to directory
dedeveloper23

codebase-mcp

View on GitHub

Model Context Protocol implementation for retrieving codebases using RepoMix

60 stars TypeScriptAI & Machine Learning Updated Oct 17, 2025

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

bash
# Install the package globally
npm install -g codebase-mcp

# Install RepoMix (required dependency)
codebase-mcp install

From GitHub

bash
# 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 install

Integration 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:

          code
          "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

          bash
          codebase-mcp start

          This 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

          Run your own MCP server? See who uses it and what to fix.

          Measure it with TrackMCP