drio
Open app

Mcp Repo2llm Server

Source

Catalog onlyCatalog onlySTDIO

Overview

MCP-Repo2LLM is a server that transforms code repositories into formats that are friendly for Large Language Models (LLMs), facilitating better communication between traditional code bases and modern AI tools.

To use MCP-Repo2LLM, install it using the provided command, ensuring you have your GitHub and GitLab tokens set up. Then, you can process code repositories from GitHub or GitLab to convert them into LLM-readable formats.

  • Smart Repository Scanning: Processes entire codebases while maintaining structural integrity. - Context Preservation: Maintains important contextual information and relationships between code files. - Multi-language Support: Handles various programming languages with language-specific optimizations. - Metadata Enhancement: Enriches code with relevant metadata for better LLM understanding. - Efficient Processing: Optimized for handling large repositories with minimal resource usage.
  1. Transforming large codebases for AI analysis and generation.
  2. Enhancing code documentation for better understanding by AI models.
  3. Facilitating code reviews and analysis using LLMs.

Add to your AI client

Use these steps to connect Mcp Repo2llm Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-repo2llm-server-crisschan": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/mcp-repo2llm",
        "mcp",
        "run",
        "/mcp-repo2llm/mcp-repo2llm-server.py"
      ],
      "env": {
        "GITHUB_TOKEN": "your-github-token",
        "GITLAB_TOKEN": "your-gitlab-token"
      }
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-repo2llm-server-crisschan": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/mcp-repo2llm",
        "mcp",
        "run",
        "/mcp-repo2llm/mcp-repo2llm-server.py"
      ],
      "env": {
        "GITHUB_TOKEN": "your-github-token",
        "GITLAB_TOKEN": "your-gitlab-token"
      }
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-repo2llm-server-crisschan": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/mcp-repo2llm",
        "mcp",
        "run",
        "/mcp-repo2llm/mcp-repo2llm-server.py"
      ],
      "env": {
        "GITHUB_TOKEN": "your-github-token",
        "GITLAB_TOKEN": "your-gitlab-token"
      }
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-repo2llm-server-crisschan": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/mcp-repo2llm",
        "mcp",
        "run",
        "/mcp-repo2llm/mcp-repo2llm-server.py"
      ],
      "env": {
        "GITHUB_TOKEN": "your-github-token",
        "GITLAB_TOKEN": "your-gitlab-token"
      }
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-repo2llm-server-crisschan": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/mcp-repo2llm",
        "mcp",
        "run",
        "/mcp-repo2llm/mcp-repo2llm-server.py"
      ],
      "env": {
        "GITHUB_TOKEN": "your-github-token",
        "GITLAB_TOKEN": "your-gitlab-token"
      }
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-repo2llm-server-crisschan": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/mcp-repo2llm",
        "mcp",
        "run",
        "/mcp-repo2llm/mcp-repo2llm-server.py"
      ],
      "env": {
        "GITHUB_TOKEN": "your-github-token",
        "GITLAB_TOKEN": "your-gitlab-token"
      }
    }
  }
}

FAQ

What is the purpose of MCP-Repo2LLM?

It transforms code repositories into formats that LLMs can understand, improving the interaction between AI and code.

Is there support for multiple programming languages?

Yes, MCP-Repo2LLM supports various programming languages with specific optimizations.

How do I install MCP-Repo2LLM?

You can install it using the command provided in the documentation, ensuring to set your GitHub and GitLab tokens.