MCP Git Ingest logo

MCP Git Ingest

by adhikasp

Reads Git repository structures and selected files through two MCP tools for codebase exploration and analysis.

Install MCP Git Ingest

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "adhikasp-mcp-git-ingest": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/adhikasp/mcp-git-ingest",
        "mcp-git-ingest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 2 tools correctly ().

Overview

adhikasp/mcp-git-ingest is an MCP server for inspecting GitHub repositories by cloning them and exposing their directory structure and selected file contents. Its two tools generate a repository tree and read requested files, allowing an LLM to examine a codebase without manually browsing it. Reach for it when an agent needs focused repository-level analysis, such as understanding project layout or reviewing implementation files. It runs as a Python command through `uvx` and accepts HTTPS, SSH, and scp-style Git URLs.

Use cases

  • Inspect a repository's directory layout
  • Read selected source and configuration files
  • Analyze how an unfamiliar codebase is organized
  • Review implementation details from a remote Git repository

Key features

  • Generate a repository directory tree
  • Read selected files from cloned repositories
  • Support HTTPS, SSH, and scp-style Git URLs
  • Reject path traversal and repository-escaping symlinks
  • Limit individual file reads by size
  • Restrict access to approved Git hosts

Tools2

What MCP Git Ingest lets your agent do. Expand a tool for its parameters.

Verified live~162 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

29/29 checks healthy over the last 97d

What it can do

From the 2 tools this server returned when we ran it.

Read-only tools · 2
Network at startup2 connections
Files written at startup17

Observed 2026-11-14 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · mcp-git-ingest (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars315Stargazers on the source repository.
Last commit4d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed2Callable tools this server registers over MCP.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Git Ingest works

What adhikasp/mcp-git-ingest does

adhikasp/mcp-git-ingest lets MCP clients explore Git repositories through an agent. It is designed around two operations:

  • github_directory_structure returns a tree-like view of a repository while excluding the .git directory.
  • github_read_important_files accepts a repository URL and a list of file paths, then returns the contents of those files.

The tools are useful for questions that require both orientation and source inspection. An agent can first request the directory layout, identify relevant files, and then retrieve only those files for analysis. The repository is cloned for each operation and removed after processing.

Although the example usage targets GitHub URLs, the server accepts HTTPS, SSH, and scp-style repository URLs. Host restrictions can be added when deployments should limit which Git hosts may be accessed.

How it works

The server uses FastMCP to expose its operations through MCP and GitPython for repository cloning and Git operations. A repository URL is converted into a deterministic temporary directory name, allowing the implementation to recognize an existing clone before cloning again. Directory traversal produces a sorted visual tree using Unicode box-drawing characters.

File reads return a mapping between each requested path and its contents. Clone, traversal, and file-reading failures are handled with error messages, while cleanup runs after processing so temporary repositories do not accumulate.

The directory operation does not follow symbolic links while building the tree. File reads resolve symbolic links and verify that the resulting path remains inside the cloned repository. Absolute paths, parent-directory segments, .git access, and links that escape the repository are rejected. Individual files are limited to 512 KiB by default.

Setup and configuration

A stdio MCP client can launch the server with uvx:

config.json
{
  "mcpServers": {
    "mcp-git-ingest": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/adhikasp/mcp-git-ingest",
        "mcp-git-ingest"
      ]
    }
  }
}

The executable entry point is mcp-git-ingest. The implementation uses Python 3.8 or newer and depends on FastMCP and GitPython through the project configuration.

Two environment variables adjust safeguards and access policy:

  • MCP_GIT_INGEST_MAX_FILE_BYTES changes the per-file read limit.
  • MCP_GIT_INGEST_ALLOWED_HOSTS restricts repository hosts, such as github.com,gitlab.com.

Repository URLs must use https://, ssh://, or scp-style syntax such as user@host:path. Local paths and file:// or ext:: URLs are refused. Because cloned URLs may contain credentials, .git is kept inaccessible to file reads.

Tools and capabilities

github_directory_structure clones a repository and returns its nested file and directory layout. It skips .git and avoids descending into symbolic links.

github_read_important_files reads caller-selected files from a cloned repository and returns their contents in a path-to-content mapping. The path checks prevent access outside the clone, and the size limit helps constrain individual responses.

Together, these tools support a two-step workflow: discover the project structure, then retrieve implementation files, configuration, or documentation relevant to a specific question.

Limitations and notes

The server operates on cloned repositories rather than a live working tree. File reads are caller-directed, so the client or agent must identify the paths it wants after inspecting the structure. Large individual files are capped unless the size limit is changed through configuration. Access control can be narrowed by setting an allowed-host list, but the supported repository URL forms remain limited to HTTPS, SSH, and scp-style Git URLs.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Git Ingest

adhikasp/mcp-git-ingest is an MCP server that connects AI agents to remote Git repositories, especially GitHub repositories, through tools for viewing directory structures and reading selected files. It clones a repository, returns a tree with github_directory_structure, and retrieves requested file contents with github_read_important_files.

Install it through an MCP client's stdio configuration using `uvx` and the repository's Git URL. Set the command to `uvx`, pass `--from git+https://github.com/adhikasp/mcp-git-ingest`, and use `mcp-git-ingest` as the executable argument.

It provides `github_directory_structure` and `github_read_important_files`. The first returns a repository tree, while the second reads a supplied list of file paths and returns their contents.

It supports `https://`, `ssh://`, and scp-style Git URLs such as `user@host:path`. Local paths, `file://` URLs, and `ext::` URLs are rejected.

Set `MCP_GIT_INGEST_ALLOWED_HOSTS` to a comma-separated host list to restrict repository access, and set `MCP_GIT_INGEST_MAX_FILE_BYTES` to change the default 512 KiB per-file limit.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Git Ingest AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/adhikasp-mcp-git-ingest?style=directory)](https://allmcps.com/mcp/adhikasp-mcp-git-ingest)
HTML Embed
<a href="https://allmcps.com/mcp/adhikasp-mcp-git-ingest"><img src="https://allmcps.com/api/badge/adhikasp-mcp-git-ingest?style=directory" alt="MCP Git Ingest on AllMCPs" /></a>