- Home
- MCP servers
- Repo2llm
Repo2llm
- python
11
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"crisschan-mcp-repo2llm": {
"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"
}
}
}
}You can run MCP-Repo2LLM to transform code repositories into formats that are easy for language models to analyze and process. It intelligently scans repositories, preserves context, supports multiple languages, enriches metadata, and is optimized for large codebases. You then interact with this MCP server from your MCP client to generate LLM-friendly representations of your projects.
How to use
Start by launching the MCP server using the runtime command below. You will provide your tokens so the server can access private GitHub or GitLab repositories if needed. Once the server is running, you can request repository transformations from your MCP client. The client will send a request to the server to convert a repository into an LLM-friendly format, leveraging smart scanning, context preservation, and metadata enrichment to improve AI understanding.
How to install
Prerequisites you need before installation: a Unix-like environment, and the runtime tool that executes MCP servers (UV). Ensure you have a valid GitHub token and a GitLab token if you plan to process private repositories.
Run the following steps to install and start the MCP server locally.
Step 1: Install the runtime (UV) if you do not have it installed already. You can obtain UV from the official runtime distribution and install it according to its instructions.
Step 2: Run the MCP server using the provided command. This starts the server in the current environment and makes it available to your MCP client.
"mcp-repo2llm-server": {
"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"
}
}
Additional sections
Environment variables shown in the installation snippet are required when you want to access private repositories. Provide your actual tokens in place of the placeholders.
Notes on usage and capabilities: the server focuses on transforming repositories into structured, LLM-friendly formats, enriching file metadata, and preserving the relationships between files and directories. It supports multiple programming languages and is optimized to handle large codebases efficiently.
Available tools
get_gitlab_repo
Process and return the code from a GitLab repository branch as text. Input: repo_url (string), branch (string). Returns: the project information and structure as text.
get_github_repo
Process and return the code from a GitHub repository branch as text. Input: repo_url (string), branch (string). Returns: the project information and structure as text.
get_local_repo
Process and return the code from a local repository path as text. Input: repo_url (string). Returns: the project information and structure as text.