Skip to main content

Simple MCP server for fetching the remote git repository content as a structured text file

Project description

MCP Git Explorer

A tool for exploring Git repositories through Claude using the Model Context Protocol (MCP).

Features

  • Clone and analyze Git repositories
  • Generate a structured text representation of repository contents
  • 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:

  1. Explore Git repositories without needing to manually download and upload files
  2. Access the full contents of repositories, with automatic token counting
  3. Navigate through repository structure and file contents

Available Tools

  • get_codebase(repo_url: str, use_token: bool = True) -> str: Clone and analyze a Git repository
  • check_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

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_git_explorer-0.1.0.tar.gz (34.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_git_explorer-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_git_explorer-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_git_explorer-0.1.0.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_git_explorer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67ab5efd4a1171c97e93a0f5b0c074f96d8ce4b80c7f5b4254a17d074c56a1c2
MD5 59c98a8f28fddb934b52a2c516ca471e
BLAKE2b-256 ca2bfea53e64d4f12ae4ecdf68e06d4ab1d6536ff278e5d8893f2c642e77341b

See more details on using hashes here.

File details

Details for the file mcp_git_explorer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_git_explorer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4a1134192fcc7f5baad7099545bae52a4b0446e257a6ba8a61ffe382cb9ebcb
MD5 0faedcdc5b59b4c197de8f5b76499265
BLAKE2b-256 7d039d12da40f711dabf735c39dd5026853e8c90c2abac2b35b9c8f34234bd8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page