Get the FREE Ultimate OpenClaw Setup Guide →

mcp-git-ingest

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio adhikasp-mcp-git-ingest uvx --from git+https://github.com/adhikasp/mcp-git-ingest mcp-git-ingest

How to use

The MCP Git Ingest server provides two primary tools for exploring a GitHub repository: github_directory_structure and github_read_important_files. The former returns a tree-like representation of a repository’s directory layout (excluding the .git directory) to help you quickly understand the project structure. The latter fetches and returns the contents of specific files from a repository, enabling you to inspect important source files, documentation, or configuration without cloning the whole repo locally. This makes it easy to programmatically analyze a project’s layout and key files from within an MCP workflow.

To use the server, configure it in your MCP client (using the uvx-based deployment shown in the configuration example) and call the available tools with the target repository URL and, for github_read_important_files, a list of relative file paths you want to retrieve. The server handles cloning, temporary storage, and cleanup, returning structured results that you can feed into further MCP reasoning or prompts.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • git installed
  • Access to install Python packages (pip)
  • MCP runtime environment (uvx) available in your environment

Step 1: Install uvx (Python-based MCP runner) if you don’t have it yet

pip install uvx  # or follow your environment's preferred installation method for uvx

Step 2: Run the MCP server configuration (example based on the README)

# This step assumes you’re using uvx to install/run the MCP from the GitHub source
# If you’re using a registry URL, adapt accordingly
uvx --from git+https://github.com/adhikasp/mcp-git-ingest mcp-git-ingest

Step 3: Verify the server is accessible

# Depending on your setup, you may need to start the service and ensure it's listening on a port or socket
# Example (pseudo): uvx run mcp-git-ingest --port 8080

Step 4: Configure your MCP client with the provided mcp_config example and begin making requests to the two tools:

  • github_directory_structure(repo_url: String) -> String
  • github_read_important_files(repo_url: String, file_paths: List[String]) -> Dict[String, String]

Note: The server uses deterministic temporary directories and cleans up after processing, so you can run multiple analyses without manual cleanup.

Additional notes

Tips and considerations:

  • The server clones repositories temporarily; for large repos or many requests, be mindful of rate limits and storage cleanup.
  • For github_read_important_files, ensure the file_paths are relative to the repository root (e.g., src/main.py or README.md).
  • If a requested file is not found, the tool returns an error message for that file, while continuing to process others.
  • The directory tree uses Unicode box-drawing characters to present a readable structure; large repos may produce lengthy outputs.
  • No environment variables are required for the default configuration; you can add env variables if you customize paths or logging in your deployment.
  • If you need to run this in a container, ensure your container has Python 3.8+ and git installed, and map necessary volumes for persistent storage if desired.

Related MCP Servers

Sponsor this space

Reach thousands of developers