MCP-Repo2LLM
by crisschan
MCP-Repo2LLM transforms code repositories into LLM-friendly formats, bridging the gap between traditional code bases and modern AI language models. It's based on RepoToTextForLLMs and provides core functionality for converting repositories into LLM-readable formats.
Last updated: N/A
What is MCP-Repo2LLM?
MCP-Repo2LLM is a MCP server that transforms code repositories into formats suitable for Large Language Models (LLMs). It addresses the challenges of processing large codebases, maintaining context, and handling repository metadata for AI-driven code analysis and generation.
How to use MCP-Repo2LLM?
To install mcp-repo2llm, use the provided uv command with necessary arguments and environment variables for GITHUB_TOKEN and GITLAB_TOKEN. The server provides tools like get_gitlab_repo, get_github_repo, and get_local_repo to process code from GitLab, GitHub, and local repositories respectively. Each tool takes repository URLs and branch names as input and returns the project information as text.
Key features of MCP-Repo2LLM
Smart Repository Scanning
Context Preservation
Multi-language Support
Metadata Enhancement
Efficient Processing
Use cases of MCP-Repo2LLM
Improving code analysis with LLMs
Enhancing code generation using AI models
Facilitating AI-driven documentation generation
Streamlining the integration of LLMs into software development workflows
FAQ from MCP-Repo2LLM
What problem does MCP-Repo2LLM solve?
What problem does MCP-Repo2LLM solve?
It addresses the difficulty in processing large codebases with LLMs, loss of context, inefficient handling of metadata, and inconsistent formatting.
What are the input requirements for get_github_repo?
What are the input requirements for get_github_repo?
It requires the repository URL and the branch name (defaults to master).
What is the core functionality based on?
What is the core functionality based on?
It is based on RepoToTextForLLMs.
What is the purpose of the GITHUB_TOKEN and GITLAB_TOKEN environment variables?
What is the purpose of the GITHUB_TOKEN and GITLAB_TOKEN environment variables?
These tokens are used for authentication when accessing private repositories on GitHub and GitLab, respectively.
Can MCP-Repo2LLM handle local repositories?
Can MCP-Repo2LLM handle local repositories?
Yes, using the get_local_repo tool, you can process code from a local repository path.