home / mcp / mcp git ingest mcp server

MCP Git Ingest MCP Server

A Model Context Protocol (MCP) server that helps read GitHub repository structure and important files.

Installation
Add the following to your MCP client configuration file.

Configuration

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

You can run a lightweight MCP server that reads GitHub repositories to reveal their directory structure and read important files. It helps you quickly understand how a project is organized and what key files contain, without manually walking the repo.

How to use

With an MCP client, you can access two core capabilities of this server: (1) generate a visual tree of a repository’s directory structure, and (2) fetch the contents of specified files from a repository. Use these tools to explore a project locally, verify file locations, and review important files such as documentation, setup, and source code explanations. When you request a repository, you can specify which files to read, and the server will return the contents or an error if a path is missing.

How to install

Prerequisites: ensure you have Python 3.8+ and a working Python environment, plus an MCP runtime you can invoke.

Install the required Python packages used by the MCP server:

pip install fastmcp gitpython

Additional sections

Configuration for MCP runtime is provided by the server’s startup configuration. The server is started as an MCP stdio process with a command and arguments that point to the MCP project and specify how it should run.

Start the server using the following command, which needles the from-source URL and the local MCP project name as shown in the configuration.

uvx --from git+https://github.com/adhikasp/mcp-git-ingest mcp-git-ingest

Notes on usage and tools

The server exposes two tools: one to produce a directory tree for a repository and another to read the contents of specific files. Use these tools to quickly inspect a repo’s structure and to pull out key files for review. If an operation fails, the server will return a descriptive error message and clean up any temporary resources.

Available tools

github_directory_structure

Returns a tree-like representation of a repository’s directory structure, skipping the .git directory and sorting entries for readability.

github_read_important_files

Reads and returns the contents of specified files from a repository, producing a map from file paths to their contents and handling read errors gracefully.