MCP Git 仓库浏览器是一个基于 Node.js 实现的工具,借助 Model Context Protocol (MCP),可帮助用户轻松浏览 Git 仓库。
若要使用 MCP Git 仓库浏览器,你需要先完成配置和安装,再启动服务器。以下是具体步骤:
将以下内容添加到您的 MCP 设置配置文件中:
{
"mcpServers": {
"mcp-git-repo-browser": {
"command": "node",
"args": ["/path/to/mcp-git-repo-browser/src/index.js"]
}
}
}
git clone
cd mcp-git-repo-browser
npm install
node src/index.js
该服务器通过标准输入输出运行,使其与 MCP 客户端兼容。
该服务器提供两个主要工具:
git_directory_structure
:返回仓库目录结构的树状表示
git_read_important_files
:读取并返回指定文件的内容
本项目采用 MIT License,详见 LICENSE 文件获取详细信息。