MCP Git Explorer
Simple MCP server for fetching the remote git repository content as a structured text file
jmiedzinski
README
MCP Git Explorer
Simple MCP (Model Context Protocol) server for fetching the remote git repository content as a structured text file.
Features
- Clone and analyze Git repositories
- Generate a structured text representation of repository contents
- Quickly estimate codebase size and token count without retrieving all content
- Support for public repositories and private GitLab repositories with token authentication
- Tokenization counting using OpenAI's tiktoken library
- Respect for .gitignore and .repomixignore patterns
- Skip binary files and empty text files
- Integration with Claude's Model Context Protocol
Installation
From PyPI
pip install mcp-git-explorer
Using uv
uv pip install mcp-git-explorer
Direct execution with uvx (without installation)
uvx mcp-git-explorer
Usage
As a command-line tool
# Basic usage
mcp-git-explorer
# Using SSE transport
mcp-git-explorer --transport sse
# Providing GitLab token
mcp-git-explorer --gitlab-token YOUR_TOKEN
Environment Variables
GIT_EXPLORER_GITLAB_TOKEN
: Your GitLab personal access token for accessing private repositories
In Claude
MCP Git Explorer provides Claude with the ability to:
- Explore Git repositories without needing to manually download and upload files
- Access the full contents of repositories, with automatic token counting
- Navigate through repository structure and file contents
- Quickly assess repository size before deciding whether to retrieve full content
When to use which tool
- Use
estimate_codebase
when you want to quickly check the size and structure of a repository before analyzing its contents. This is especially useful for large repositories where you need to check if retrieving the full content is feasible within token limits. - Use
get_codebase
when you need to analyze the actual code and content of the files in the repository.
Available Tools
get_codebase(repo_url: str, use_token: bool = True) -> str
: Clone and analyze a Git repository, returning full file contentsestimate_codebase(repo_url: str, use_token: bool = True) -> str
: Quick analysis providing repository statistics including file count, structure, and token estimationcheck_gitlab_token_status() -> str
: Check if a GitLab token is configured
Development
Setup
# Clone the repository
git clone https://github.com/jmiedzinski/mcp-git-explorer.git
cd mcp-git-explorer
# Install development dependencies
uv pip install -e ".[dev]"
Running locally
# Run directly
python -m mcp_git_explorer.cli
# Run via MCP CLI
mcp dev mcp_git_explorer/cli.py
# Run via uvx
uvx mcp-git-explorer
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.