GitPilot MCP
Provides tools for automating GitHub contributions, including forking repositories, cloning, creating branches, syncing with upstream, generating patches, running tests, committing and pushing changes, creating and updating pull requests, handling merge conflicts, and updating PRs based on maintainer feedback.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitPilot MCPanalyze issue #42 and create a PR with a fix"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitPilot MCP
An autonomous MCP-powered agent that automates GitHub contributions end-to-end, from issue analysis and code changes to pull requests, conflict resolution, and review updates.
๐ Overview
GitPilot MCP is an Autonomous GitHub Contribution Agent built using the Model Context Protocol (MCP). It helps developers and contributors automate the full open-source workflow:
Forking repositories
Analyzing issues
Making code changes
Running tests
Creating pull requests
Syncing with upstream changes
Handling merge conflicts
Updating PRs based on maintainer feedback
The agent is designed to be minimal, safe, and extensible, without overengineering.
โจ Key Features
๐ Fork & clone GitHub repositories
๐ฟ Create and manage feature branches
๐ Sync fork with upstream when new PRs are merged
๐ง Semantic code understanding using RAG
โ๏ธ Generate minimal, clean git diffs
๐งช Run tests and retry fixes automatically
๐ฆ Commit & push changes
๐ Create pull requests programmatically
๐ ๏ธ Update existing PRs after review feedback
โ ๏ธ Detect merge conflicts before PR updates
๐ง Architecture (High Level)
Issue โ Code Context (RAG) โ Patch โ Tests โ Commit โ PR
โ
Sync / Review FeedbackThe system follows real-world open-source contribution practices.
๐ Project Structure
mcp-github/
โ
โโโ main.py # MCP server & tools
โโโ rag.py # RAG indexing and search
โโโ config.py # GitHub token & workspace
โโโ .rag/ # Vector store (local)
โโโ README.md๐งฉ Installation & Setup
Make sure you have the following installed:
Python 3.10+
Git
Claude Desktop (latest version)
Ollama (for embeddings)
Step 1: Install uv
uv is used for dependency management and isolated execution.
pip install uvStep 2: Clone the Repository
git clone https://github.com/<your-username>/GitPilot-MCP.git
cd GitPilot-MCPStep 3: Initialize the Project (uv)
Initialize the project environment:
uv initStep 4: Install Dependencies
Add all required dependencies:
uv add fastmcp gitpython pygithub python-dotenv numpy faiss-cpu ollamaStep 5: For MCP tools testing
uv run fastmcp dev main.pyโ๏ธ MCP Server Configuration
Use the following configuration to run the MCP server locally via uv + fastmcp in Claude-desktop:
paste this configuration in claudee-desktop-config file.
{
"mcpServers": {
"GitPilot-MCP": {
"command": "<PATH_TO_PYTHON>/Scripts/uv.exe",
"args": [
"run",
"--project",
"<PATH_TO_PROJECT_ROOT>",
"--directory",
"<PATH_TO_PROJECT_ROOT>",
"fastmcp",
"run",
"main.py"
],
"transport": "stdio"
}
}
}๐ Configuration
Create a config.py file:
GITHUB_TOKEN = "your_github_personal_access_token"
WORKSPACE = "./workspace"โ ๏ธ The token must have permissions to fork repositories and create pull requests.
๐ ๏ธ Available MCP Tools
Some important tools exposed by the agent:
fork_repoclone_repocreate_branchsync_with_upstreamindex_repoget_repo_contextapply_patchrun_testsretry_fix_with_testscommit_and_pushcreate_pull_requestcheck_for_conflictsupdate_pr_after_feedback
Each tool is single-responsibility and composable.
๐งช Testing Workflow
Apply generated patch
Run tests (
pytest -qby default)Retry fixes automatically if tests fail
Stop immediately once tests pass
๐ Handling Maintainer Feedback
When a maintainer requests changes:
Generate a new patch
Apply it to the same branch
Commit & push
The existing PR updates automatically. No new PRs are created.
๐งฉ Design Principles
โ Minimal diffs
โ Short, inline comments only when necessary
โ No hard refresh or destructive git actions
โ No silent failures
โ Extensible for future improvements
๐ง Limitations
Repository indexing may be limited on very large repos
Conflict resolution is assisted, not fully automatic
Designed for local / controlled environments (remote hardening can be added later)
๐ฎ Future Improvements
Scoped repository indexing
PR comment parsing
CI status polling
Refresh-token support
Remote multi-user MCP deployment
๐ License
MIT License (or as per your choice)
๐ Acknowledgements
Built using:
FastMCP
GitPython
PyGitHub
Ollama (for embeddings)
Qdrant / FAISS (vector search)
๐จโ๐ป Author
Divyanshu Giri
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Divyanshu-hash/GitPilot-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server