Gitingest MCP服务器
识别到的语言类型为英语。 翻译结果:Gitingest MCP服务器
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"gitingestmcp": {
"args": [
"run",
"--directory",
"/home/\u003cuser\u003e/workspace/gitingest-mcp",
"gitingestmcp"
],
"command": "uv"
}
}
}
该服务需要配置环境变量:PUBMED_API_KEY、PUBMED_EMAIL
可用工具 (1 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
ingest_git
This function analyzes a source (URL or local path), clones the corresponding repository (if applicable),and processes its files according to the specified query parameters.It can return a summary, a tree-like structure of the files, or the content of the files.
该工具无需必填参数,直接调用即可
服务介绍
Gitingest MCP 服务器
这是一个实现了模型上下文协议(MCP)的服务器,可以与 gitingest 集成,将任何 Git 仓库转换为其代码库的简单文本摘要。
特性
- 通过模型上下文协议轻松与 AI 助手集成
- Git 仓库分析和导入功能
- 支持按文件大小、模式和分支过滤文件
- 返回全面的仓库信息,包括摘要、文件结构和内容
使用方法
配置选项
在您的 AI 助手设置中添加以下配置以启用 gitingest-mcp 作为 MCP 服务器:
PyPI 安装
json
{
"mcpServers": {
"gitingestmcp": {
"command": "uvx",
"args": ["gitingestmcp@latest"]
}
}
}
GitHub 安装
json
{
"mcpServers": {
"gitingestmcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/narumiruna/gitingest-mcp",
"gitingestmcp"
]
}
}
}
本地安装
json
{
"mcpServers": {
"gitingestmcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/home//workspace/gitingest-mcp",
"gitingestmcp"
]
}
}
}
API
该服务器提供以下工具:
ingest_git
分析一个 Git 仓库并以结构化格式返回其内容。
参数:
source: Git 仓库的 URL 或本地目录路径max_file_size(可选): 允许的最大文件大小(字节,默认:10MB)include_patterns(可选): 指定要包含的文件的模式或模式集(例如,"*.md, src/")exclude_patterns(可选): 指定要排除的文件的模式或模式集branch(可选): 要克隆和分析的分支(默认:"main")
返回值:
一个字符串,包含:
- 仓库摘要
- 文件的树状结构
- 仓库文件的内容
资源
- gitingest 网站: https://gitingest.com/
- gitingest 仓库: https://github.com/cyclotruc/gitingest
许可证
请参阅 LICENSE 文件获取详细信息。