Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Repository to LLM Context

FreeNot checked

Transform code repositories into LLM-friendly formats.

GitHubEmbed

About

Transform code repositories into LLM-friendly formats.

README

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

from github.com/crisschan/mcp-repo2llm

Installing Repository to LLM Context

This server has no published package — it is built from source. Open the repository and follow its README.

▸ github.com/crisschan/mcp-repo2llm

FAQ

Is Repository to LLM Context MCP free?

Yes, Repository to LLM Context MCP is free — one-click install via Unyly at no cost.

Does Repository to LLM Context need an API key?

No, Repository to LLM Context runs without API keys or environment variables.

Is Repository to LLM Context hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Repository to LLM Context in Claude Desktop, Claude Code or Cursor?

Open Repository to LLM Context on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Repository to LLM Context with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All development MCPs