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 "Install 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 Browsershow 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.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_url | Yes | The URL of the Git repository |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions cloning and returning a tree structure but fails to detail critical aspects like whether it performs a full clone (which could be resource-intensive), how it handles errors (e.g., invalid URLs), authentication needs, rate limits, or the format of the returned tree. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that efficiently conveys the core functionality without unnecessary words. It is front-loaded with the main action and outcome, making it easy to grasp quickly, and there is no wasted information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the returned tree format looks like, potential side effects of cloning, error handling, or performance considerations. Given the complexity of Git operations and the lack of structured data, more detail is needed to adequately inform an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with 'repo_url' clearly documented. The description adds minimal value beyond the schema by implying the URL is used for cloning, but it doesn't provide additional context such as supported URL formats (e.g., HTTPS vs. SSH) or examples. Given the high schema coverage, a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Clone a Git repository') and the outcome ('return its directory structure in a tree format'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from the sibling tool 'git_read_important_files', which might have overlapping functionality, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'git_read_important_files' or other Git-related operations. It lacks context on prerequisites, such as needing network access or Git installed, and doesn't specify any exclusions or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions reading file contents but doesn't specify important behaviors like error handling (e.g., what happens if files don't exist), authentication requirements, rate limits, or output format. This leaves significant gaps for a tool that interacts with external repositories.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that efficiently conveys the core functionality without unnecessary words. It's front-loaded with the essential action and resource, making it easy for an agent to parse quickly. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of interacting with git repositories (external systems, potential errors, authentication), the description is incomplete. With no annotations and no output schema, it fails to address critical aspects like return values, error conditions, or security requirements, leaving the agent under-informed for safe and effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema already documents both parameters thoroughly. The description adds no additional semantic context beyond what's in the schema (e.g., it doesn't clarify path conventions or URL formats), resulting in the baseline score of 3 for adequate but non-enhancing parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Read the contents') and resource ('specified files in a given git repository'), making the purpose immediately understandable. It doesn't differentiate from the sibling tool 'git_directory_structure', which appears to serve a different purpose (listing structure vs reading file contents), so it earns a 4 rather than a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives or any contextual prerequisites. It simply states what the tool does without indicating scenarios where it's appropriate or inappropriate, leaving the agent to infer usage from the tool name and parameters alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.0.0- Added
git_directory_structure - Added
git_read_important_files
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.
Create, deploy, and operate MCP servers directly from your GitHub repositories.
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.27352MIT
- AlicenseNot gradedqualityCmaintenanceA secure, git-aware MCP server for working with local repositories, enabling file management, shell commands, and full git operations within allowed directories.871GPL 3.0
- FlicenseAqualityCmaintenanceA local-only MCP server for understanding Git repositories, offering repository summary, recent changes, file hotspots, and hygiene checks without network access.4-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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