Git Repository Browser
About
Enables Git repository exploration and analysis through a Node.js server that executes commands for cloning repositories, browsing directories, reading files, comparing branches, and searching code patterns with structured JSON responses.
Details
- Author
- bsreeram08
- Repository
- bsreeram08/git-commands-mcp
- Downloads
- 816
- License
- MIT License
- Categories
- Developer Tools, Other, Design, File Management, AI, Search, Frontend, Infrastructure
- Tags
- #web
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Git Repository BrowserCommand (node, npx, python, etc.)npxArguments-
Argument 1
-y -
Argument 2
@highlight/mcp-server
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"git repository browser": {
"env": {},
"args": [
"-y",
"@highlight/mcp-server"
],
"command": "npx"
}
}
}
Linux
{
"env": [],
"args": [
"-y",
"@highlight/mcp-server"
],
"command": "npx"
}
Macos
{
"env": [],
"args": [
"-y",
"@highlight/mcp-server"
],
"command": "npx"
}
Windows
{
"env": [],
"args": [
"/c",
"npx",
"-y",
"@highlight/mcp-server"
],
"command": "cmd"
}
A Node.js implementation of a Git repository browser using the Model Context Protocol (MCP).
git clone https://github.com/bsreeram08/git-commands-mcp.git cd git-commands-mcp npm install
Add this to your MCP settings configuration file:
{ "mcpServers": { "git-commands-mcp": { "command": "git-commands-mcp" } } }
{ "mcpServers": { "git-commands-mcp": { "command": "node", "args": ["/path/to/git-commands-mcp/src/index.js"] } } }
The server provides the following tools:
- git_directory_structure: Returns a tree-like representation of a repository's directory structure
- Input: Repository URL
- Output: ASCII tree representation of the repository structure
- Input: Repository URL and list of file paths
- Output: Dictionary mapping file paths to their contents
- Input: Repository URL, search pattern, optional file patterns, case sensitivity, and context lines
- Output: JSON with search results including matching lines and context
- git_branch_diff: Compare two branches and show files changed between them
- Input: Repository URL, source branch, target branch, and optional show_patch flag
- Output: JSON with commit count and diff summary
- git_commit_history: Get commit history for a branch with optional filtering
- Input: Repository URL, branch name, max count, author filter, since date, until date, and message grep
- Output: JSON with commit details
- Input: Repository URL, branch name, max count, include_diff flag, author filter, since date, until date, and message grep
- Output: JSON with detailed commit information
- Input: Local repository path
- Output: JSON with status information and diffs
git-commands-mcp/ ├── src/ │ ├── index.js # Entry point │ ├── server.js # Main server implementation │ ├── handlers/ # Tool handlers │ │ └── index.js # Tool implementation functions │ └── utils/ # Utility functions │ └── git.js # Git-related helper functions ├── package.json └── readme.md
- 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
- Modular code structure for better maintainability
- Node.js 14.x or higher
- Git installed on the system
The server runs on stdio, making it compatible with MCP clients.
This project uses GitHub Actions for continuous integration and deployment:
The repository is configured with a GitHub Actions workflow that automatically publishes the package to npm when changes are pushed to the master branch.
To enable automatic publishing, you need to add an npm Automation token as a GitHub secret (this works even with accounts that have 2FA enabled):
- Generate an npm Automation token:
- Log in to your npm account onnpmjs.com
- Go to your profile settings
- Select "Access Tokens"
- Click "Generate New Token"
- Select "Automation" token type
- Set the appropriate permissions (needs "Read and write" for packages)
- Copy the generated token
- Go to your GitHub repository
- Navigate to "Settings" > "Secrets and variables" > "Actions"
- Click "New repository secret"
- Name:NPM_AUTOMATION_TOKEN
- Value: Paste your npm Automation token
- Click "Add secret"
Once configured, any push to the master branch will trigger the workflow to publish the package to npm.
MIT License - see theLICENSEfile for details.
- GitHub Repository
- NPM Package
- Report Issues
Creates commit messages from staged files in a local git repository.
An MCP server for interacting with the AtomGit API for version control and code hosting.
A portable MCP server for performing various GitHub operations on any repository.
Manage Forgejo repositories and execute commands through an MCP-compatible chat interface.
Integrates with the Gerrit code review system to review code changes and details.
Make git commits on behalf of AI to track AI contributions in your codebase.
Performs deep, file-level forensics on Git repositories to analyze file histories, changes, and patterns.
Interact with the GitHub API for file operations, repository management, and search.
Manage GitHub repositories using a personal access token via CLI or environment variables.
Allows AI assistants to interact with the GitHub API for repository management, code collaboration, and other development tasks.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





