adhikasp/mcp-git-ingest
A Model Context Protocol (MCP) server that helps read GitHub repository structure and important files.
313 ★44 forksPythonUpdated 1y ago
What you need to know
MCP server that clones a GitHub repository and exposes directory-structure and file-reading tools so AI agents can understand repo structure (inspired by gitingest.com). Built on fastmcp + gitpython; Python 3.8+.
Install
{ mcpServers: { "mcp-git-ingest": { "command": "uvx", "args": ["--from", "git+https://github.com/adhikasp/mcp-git-ingest", "mcp-git-ingest"] } } }Usage
- •Call github_directory_structure with a repo_url to get a box-drawing directory tree
- •Call github_read_important_files with repo_url + file_paths[] to read key files
- •Example: 'llm read https://github.com/... and determine how the code technically works'
Key features
- ✓Two tools: github_directory_structure (recursive tree, skips .git, sorted) and github_read_important_files (dict of file path → contents)
- ✓Deterministic temporary directory per repo URL hash with reuse of already-cloned repos; cleanup in finally blocks
- ✓Descriptive error messages for clone/read failures
Best for
Quickly giving an AI agent the structure and important files of a GitHub repo for code understanding tasks.
Caveats
- ⚠Clones repositories to temp directories, so network access + git are required per call
- ⚠Minimal toolset (2 tools) — no code search, diffs, or issue access
Reviewed 2026-08-07
Topics
gitllmmcpmodel-context-protocol
- Stars
- 313★
- Forks
- 44
- Language
- Python
- License
- MIT
- Created
- 2024-12-15
- Last push
- 2025-01-26