MCP Git Repo Browser
MCP Git Repo 浏览器 (Node.js)
使用模型上下文协议 (MCP) 的 Git 存储库浏览器的 Node.js 实现。
配置
将其添加到您的 MCP 设置配置文件中:
{
"mcpServers": {
"mcp-git-repo-browser": {
"command": "node",
"args": ["/path/to/mcp-git-repo-browser/src/index.js"]
}
}
}Related MCP server: Git Repo Browser MCP
特征
该服务器提供两个主要工具:
git_directory_structure:返回存储库目录结构的树状表示输入:存储库 URL
输出:存储库结构的 ASCII 树表示
git_read_important_files:读取并返回存储库中指定文件的内容输入:存储库 URL 和文件路径列表
输出:将文件路径映射到其内容的字典
实现细节
使用 Node.js 原生模块(crypto、path、os)实现核心功能
利用 fs-extra 增强文件操作
使用 simple-git 进行 Git 存储库操作
实现干净的错误处理和资源清理
根据存储库 URL 哈希创建确定性临时目录
尽可能重复使用克隆的存储库以提高效率
要求
Node.js 14.x 或更高版本
系统上安装的 Git
安装
git clone <repository-url>
cd mcp-git-repo-browser
npm install用法
启动服务器:
node src/index.js服务器在 stdio 上运行,使其与 MCP 客户端兼容。
执照
MIT 许可证 - 有关详细信息,请参阅LICENSE文件。
Available Tools
2 toolsgit_directory_structureC
Clone a Git repository and return its directory structure in a tree format.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_url | Yes | The URL of the Git repository |
git_read_important_filesC
Read the contents of specified files in a given git repository.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_url | Yes | The URL of the Git repository | |
| file_paths | Yes | List of file paths to read (relative to repository root) |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.0.0- Added
git_directory_structure - Added
git_read_important_files
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one clones a repository and returns its directory structure, while the other reads the contents of specified files. There is no overlap or ambiguity between these operations, making it easy for an agent to select the correct tool.
Both tools follow a consistent 'git_verb_adjective_noun' pattern (git_directory_structure and git_read_important_files). This naming convention is predictable and readable throughout the set, with no deviations or mixed styles.
With only 2 tools, the server feels thin for a 'Git Repo Browser' purpose. While the tools cover cloning and reading files, there are obvious gaps in typical repository operations (e.g., listing branches, checking commit history, or searching code), making the scope underdeveloped.
The tool surface is severely incomplete for browsing Git repositories. It lacks basic operations like listing repositories, viewing commits, checking branches, or searching within files. Agents will encounter dead ends when trying to perform common repository exploration tasks beyond the two provided tools.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
MCP server for siGit (sigit.si): browse repos, search code, manage PRs/issues, web search.
Repository knowledge graph MCP server for codebase understanding and debugging.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- FlicenseAqualityDmaintenanceMCP server for managing Git operations on local repositories, allowing users to list repositories, get and create tags, list commits, push tags, and refresh repositories through a standardized interface.63-
- AlicenseBqualityDmaintenanceA Node.js implementation that enables browsing Git repositories through the Model Context Protocol, providing features like displaying directory structures, reading files, searching code, comparing branches, and viewing commit history.2741 npm2MIT
- AlicenseNot gradedqualityDmaintenanceA secure, git-aware MCP server for working with local repositories, enabling file management, shell commands, and full git operations within allowed directories.130 npm1GPL 3.0
- AlicenseAqualityDmaintenanceA local-only MCP server for understanding Git repositories, offering repository summary, recent changes, file hotspots, and hygiene checks without network access.493 npmMIT