Skip to main content

MCP-Repo2LLM

Overview

mcp-repo2llm is a MCP server that transforms code repositories into LLM-friendly formats. A powerful tool that transforms code repositories into LLM-friendly formats, bridging the gap between traditional code bases and modern AI language models. This repo is based on RepoToTextForLLMs, which provides core functionality for converting repositories into LLM-readable formats.

Motivation

As AI and Large Language Models (LLMs) become increasingly important in software development, there's a growing need to effectively communicate our codebases to these models. Traditional code repositories aren't optimized for LLM processing, which can lead to suboptimal results when using AI tools for code analysis and generation.

Problem Solved

This project addresses several critical challenges:

  • Difficulty in processing large codebases with LLMs
  • Loss of context and structure when feeding code to AI models
  • Inefficient handling of repository metadata and documentation
  • Inconsistent formatting across different programming languages

Key Features

  • Smart Repository Scanning: Intelligently 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

Installation

To install mcp-repo2llm by uv:

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

GITHUB_TOKEN: your github token GITLAB_TOKEN: your gitlab token

Tools

get_gitlab_repo

  • Process and return the code from a GitLab repository branch as text
  • Input:
    • repo_url (string): the repository URL from gitlab
    • branch (string): The branch name,default is master
  • Returns(string): The project all information and struction from the repository as text

get_github_repo

  • Process and return the code from a Github repository branch as text
  • Input:
    • repo_url (string): the repository URL from github
    • branch (string): The branch name,default is master
  • Returns(string): The project all information and struction from the repository as text

get_local_repo

  • Process and return the code from a GitLab repository branch as text
  • Input:
    • repo_url (string): the repository path
  • Returns(string): The project all information and struction from the repository as text

Metadata

Release files for iflow-mcp_crisschan-mcp-repo2llm-server 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_crisschan-mcp-repo2llm-server 0.1.1
File Size Uploaded
iflow_mcp_crisschan_mcp_repo2llm_server-0.1.1.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_crisschan-mcp-repo2llm-server 0.1.1
File Interpreter ABI Platform
iflow_mcp_crisschan_mcp_repo2llm_server-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.4 kB

Release files / iflow_mcp_crisschan_mcp_repo2llm_server-0.1.1.tar.gz

Download URL iflow_mcp_crisschan_mcp_repo2llm_server-0.1.1.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4e4ee1c60208fbf49fa004e3de3f5539a5386bc3496064dc15522c2e2e6a1486
BLAKE2b-256 checksum
How to use checksums
89c5cff6a831f5b421ef3b5fd28564a6eef83a7d012074ec690a7577351c2aab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_crisschan_mcp_repo2llm_server-0.1.1-py3-none-any.whl

Download URL iflow_mcp_crisschan_mcp_repo2llm_server-0.1.1-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eaf7296f02a56cf5a872e32cf4cd68736d7b30ebefcd902744539d299916fb82
BLAKE2b-256 checksum
How to use checksums
2a8a2b23eacf1a0ffb5a01be4728e58aa36cb2e9799b984d86049b6a66227a66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page