Skip to main content
Glama

MCP-Repo2LLM

MCP-レポ2LLM

概要

mcp-repo2llm は、コードリポジトリを LLM 対応形式に変換する MCP サーバーです。コードリポジトリを LLM 対応形式に変換する強力なツールであり、従来のコードベースと最新の AI 言語モデル間のギャップを埋めます。このリポジトリは、リポジトリを LLM 対応形式に変換するためのコア機能を提供するRepoToTextForLLMsをベースにしています。

モチベーション

AIと大規模言語モデル(LLM)がソフトウェア開発においてますます重要になるにつれ、コードベースをこれらのモデルに効果的に伝達する必要性が高まっています。従来のコードリポジトリはLLM処理に最適化されていないため、AIツールを用いてコード分析や生成を行う際に、最適な結果が得られない可能性があります。

問題解決

このプロジェクトは、いくつかの重要な課題に取り組んでいます。

  • LLM で大規模なコードベースを処理することの難しさ
  • AIモデルにコードを入力する際のコンテキストと構造の損失
  • リポジトリのメタデータとドキュメントの非効率的な処理
  • 異なるプログラミング言語間でのフォーマットの一貫性がない

主な特徴

  • スマートリポジトリスキャン: 構造の整合性を維持しながらコードベース全体をインテリジェントに処理します
  • コンテキストの保持: 重要なコンテキスト情報とコードファイル間の関係を維持します。
  • 多言語サポート: 言語固有の最適化により、さまざまなプログラミング言語に対応します。
  • メタデータの強化: LLM の理解を向上させるために、関連するメタデータでコードを強化します。
  • 効率的な処理: 最小限のリソース使用で大規模なリポジトリを処理するように最適化されています

インストール

uv で mcp-repo2llm をインストールするには:

"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: Githubトークン GITLAB_TOKEN: GitLabトークン

ツール

get_gitlab_repo

  • GitLabリポジトリブランチからコードをテキストとして処理して返す
  • 入力:
    • repo_url (文字列): GitLabのリポジトリURL
    • ブランチ(文字列):ブランチ名。デフォルトはマスター
  • 戻り値(文字列): リポジトリからプロジェクトのすべての情報と指示をテキストとして返します

githubリポジトリを取得する

  • Githubリポジトリブランチからコードをテキストとして処理して返す
  • 入力:
    • repo_url (文字列): githubのリポジトリURL
    • ブランチ(文字列):ブランチ名。デフォルトはマスター
  • 戻り値(文字列): リポジトリからプロジェクトのすべての情報と指示をテキストとして返します

get_local_repo

  • GitLabリポジトリブランチからコードをテキストとして処理して返す
  • 入力:
    • repo_url (文字列): リポジトリパス
  • 戻り値(文字列): リポジトリからプロジェクトのすべての情報と指示をテキストとして返します
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

GitHub、GitLab、またはローカル ディレクトリのコード リポジトリを LLM 対応形式に変換し、コンテキストと構造を維持して AI 処理を向上させる MCP サーバー。

  1. 概要
    1. モチベーション
      1. 問題解決
        1. 主な特徴
          1. インストール
            1. ツール
              1. get\_gitlab\_repo
              2. githubリポジトリを取得する
              3. get\_local\_repo

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              Repomix MCP Server enables AI models to efficiently analyze codebases by packaging local or remote repositories into optimized single files, with intelligent compression via Tree-sitter to significantly reduce token usage while preserving code structure and essential signatures.
              Last updated -
              15,359
              17,066
              TypeScript
              MIT License
              • Linux
              • Apple
            • -
              security
              F
              license
              -
              quality
              An MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.
              Last updated -
              TypeScript
            • -
              security
              -
              license
              -
              quality
              An MCP server that automatically generates documentation, test plans, and code reviews for code repositories by analyzing directory structures and code files using AI models via OpenRouter API.
              Last updated -
              3
              TypeScript
              Creative Commons Zero v1.0 Universal
            • -
              security
              -
              license
              -
              quality
              An MCP server that allows Claude and other MCP-compatible LLMs to interact with the GitHub API, supporting features like creating issues, getting repository information, listing issues, and searching repositories.
              Last updated -
              TypeScript

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/crisschan/mcp-repo2llm'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server