mcp-git-ingest
A Model Context Protocol (MCP) server that helps read GitHub repository structure and important files.
GitHub Stars
273
User Rating
Not Rated
Favorites
0
Views
25
Forks
38
Issues
10
Installation
Difficulty
IntermediateEstimated Time
10-20 minutes
Requirements
Python 3.8以上fastmcpの最新バージョン+1 more
Installation
Installation
Prerequisites
Python: 3.8 or higher
fastmcp: Latest version
gitpython: Latest version
Installation Steps
1. Clone Repository
bash
git clone https://github.com/adhikasp/mcp-git-ingest
cd mcp-git-ingest
2. Install Dependencies
bash
pip install fastmcp gitpython
3. Start Server
bash
python -m src.mcp_git_ingest.main
Troubleshooting
Common Issues
Issue: Server won't start Solution: Check Python version and dependencies. Issue: Repository not cloned correctly Solution: Verify Git settings and ensure necessary access rights.Configuration
Configuration
Basic Configuration
MCP Server Setup
Edit~/.config/mcp/mcp_config.json:
json
{
"mcpServers": {
"mcp-git-ingest": {
"command": "python",
"args": ["-m", "src.mcp_git_ingest.main"]
}
}
}
Environment Variables
Set the following environment variables as needed:bash
export MCP_SERVER_URL="http://localhost:5000"
Security Settings
Store API keys and sensitive information in environment variables
Set appropriate access permissions
Adjust logging levels and output debug information as needed
Examples
Examples
Basic Usage
Fetching Repository Structure
bash
$ llm read https://github.com/adhikasp/mcp-git-ingest
Reading Important Files
bash
$ llm read https://github.com/adhikasp/mcp-git-ingest and determine how the code technically works
Programmatic Usage
python
import requests
repo_url = 'https://github.com/adhikasp/mcp-git-ingest'
response = requests.post('http://localhost:5000/mcp/call', json={
'tool': 'github_directory_structure',
'parameters': {'repo_url': repo_url}
})
print(response.json())
Use Cases
For developers who want to visually understand the structure of GitHub repositories
Project teams needing to quickly retrieve the contents of specific files
Creating automation scripts to analyze important files in a repository
Understanding the structure of a repository during the initial setup of a new project