MCP Git Repo Browser
Provides tools to browse Git repositories, including retrieving directory structures as ASCII trees and reading specified file contents from repositories accessed via URL.
Implements Git repository browsing functionality in Node.js, allowing for efficient cloning and exploration of repositories through a standardized interface.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Git Repo Browser show me the directory structure of https://github.com/example/project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Git Repo Browser (Node.js)
A Node.js implementation of a Git repository browser using the Model Context Protocol (MCP).
Configuration
Add this to your MCP settings configuration file:
{
"mcpServers": {
"mcp-git-repo-browser": {
"command": "node",
"args": ["/path/to/mcp-git-repo-browser/src/index.js"]
}
}
}Related MCP server: Git Repo Browser MCP
Features
The server provides two main tools:
git_directory_structure: Returns a tree-like representation of a repository's directory structureInput: Repository URL
Output: ASCII tree representation of the repository structure
git_read_important_files: Reads and returns the contents of specified files in a repositoryInput: Repository URL and list of file paths
Output: Dictionary mapping file paths to their contents
Implementation Details
Uses Node.js native modules (crypto, path, os) for core functionality
Leverages fs-extra for enhanced file operations
Uses simple-git for Git repository operations
Implements clean error handling and resource cleanup
Creates deterministic temporary directories based on repository URL hashes
Reuses cloned repositories when possible for efficiency
Requirements
Node.js 14.x or higher
Git installed on the system
Installation
git clone <repository-url>
cd mcp-git-repo-browser
npm installUsage
Start the server:
node src/index.jsThe server runs on stdio, making it compatible with MCP clients.
License
MIT License - see the LICENSE file for details.
Available Tools
2 toolsgit_directory_structureC
Clone a Git repository and return its directory structure in a tree format.
Inputs: repo_url (required).
git_read_important_filesC
Read the contents of specified files in a given git repository.
Inputs: repo_url (required), file_paths (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.2750 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.138 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.485 npmMIT