Skip to main content
Glama

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"] } } }

特征

该服务器提供两个主要工具:

  1. git_directory_structure :返回存储库目录结构的树状表示
    • 输入:存储库 URL
    • 输出:存储库结构的 ASCII 树表示
  2. 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文件。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

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

一个 Node.js 服务器,允许通过 MCP 浏览 Git 存储库,提供查看目录结构和从存储库读取重要文件的工具。

  1. 配置
    1. 特征
      1. 实现细节
        1. 要求
          1. 安装
            1. 用法
              1. 执照

                Related MCP Servers

                • A
                  security
                  F
                  license
                  A
                  quality
                  MCP Server for the GitHub API, providing features for file operations, repository management, and advanced search, with automatic branch creation and comprehensive error handling.
                  Last updated -
                  18
                  4
                  3
                  TypeScript
                  • Linux
                  • Apple
                • A
                  security
                  F
                  license
                  A
                  quality
                  MCP 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.
                  Last updated -
                  6
                  Python
                • A
                  security
                  A
                  license
                  A
                  quality
                  An MCP server for gitingest. It allows MCP clients like Claude Desktop, Cursor, Cline etc to quickly extract information about Github repositories including repository summaries, project directory structure, file contents, etc
                  Last updated -
                  3
                  8
                  Python
                  MIT License
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A 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.
                  Last updated -
                  10
                  JavaScript
                  MIT License

                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/razorback16/mcp-git-repo-browser'

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