mcp-git-ingest
by adhikasp·★ 306·综合分 44
一个MCP服务器,用于读取GitHub仓库结构和重要文件。
githubdeveloper-toolsfile-system
41
Forks
10
活跃 Issue
16 个月前
最近提交
2 天前
收录于
概述
mcp-git-ingest服务器提供两个主要工具:github_directory_structure用于探索仓库层次结构,github_read_important_files用于提取特定文件的内容。它使用GitPython临时克隆仓库并生成带有Unicode字符的树状表示。该实现包含适当的错误处理、清理机制以防止临时文件累积,以及通过基于哈希的目录命名进行优化,可能重用已克隆的仓库。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
你:无需本地克隆即可分析GitHub仓库
你:在深入研究实现细节前理解代码库结构
你:从仓库中提取特定文件用于文档或分析目的
你:这个服务器是否会将整个仓库克隆到我的机器上?
你:如果我请求私有仓库中的文件会发生什么?
什么时候选它
当您需要快速分析GitHub仓库结构或在AI工作流中读取特定文件时,特别是对于公开仓库。
什么时候不要选它
当需要处理需要身份验证的私有仓库,或分析可能超过内存限制的大型二进制文件时。
此 server 暴露的工具
从 README 抽取出 2 个工具github_directory_structuregithub_directory_structure(repo_url: str) -> strReturns a tree-like representation of a repository's directory structure
github_read_important_filesgithub_read_important_files(repo_url: str, file_paths: List[str]) -> dict[str, str]Reads and returns the contents of specified files in a repository
可对比工具
github-mcpgitingestrepo-analyzer
安装
安装
- 使用uvx安装:
uvx --from git+https://github.com/adhikasp/mcp-git-ingest mcp-git-ingest- 在Claude Desktop中配置:
{
"mcpServers": {
"mcp-git-ingest": {
"command": "uvx",
"args": ["--from", "git+https://github.com/adhikasp/mcp-git-ingest", "mcp-git-ingest"]
}
}
}FAQ
- 这个服务器是否会将整个仓库克隆到我的机器上?
- 不会,它将仓库克隆到临时目录,并在处理后确保清理这些文件。
- 如果我请求私有仓库中的文件会发生什么?
- 除非您已为git操作正确配置了身份验证,否则服务器将无法克隆仓库。
mcp-git-ingest 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。