crisschan_mcp_repo2llm

crisschan_mcp_repo2llm

by crisschan
Transforms code repositories into LLM-friendly formats for efficient AI processing.

Repository-to-LLM Transformer MCP Server

Overview

The Repository-to-LLM Transformer MCP Server is a powerful tool designed to transform code repositories into LLM-friendly formats. It bridges the gap between traditional codebases and modern AI language models, enabling more effective communication of codebases to AI tools. This project 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 structure 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 structure from the repository as text

get_local_repo

  • Process and return the code from a local Git repository as text
  • Input:
  • repo_url (string): The repository path
  • Returns (string): The project all information and structure from the repository as text

About

No description, website, or topics provided.

Resources

License

Activity

Stars

Watchers

Forks

Releases

No releases published.

Packages

No packages published.

Languages

Features & Capabilities

Categories
mcp_server model_context_protocol python ai llm code_transformation repository_processing api_integration

Implementation Details

Stats

0 Views
2 GitHub Stars

Repository Info

crisschan Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300