GitPilot MCP

GitPilot MCP

An autonomous agent that automates GitHub contributions end-to-end, from issue analysis and code changes to pull requests, conflict resolution, and review updates.

Category
访问服务器

README

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 Feedback

The 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 uv

Step 2: Clone the Repository

git clone https://github.com/<your-username>/GitPilot-MCP.git
cd GitPilot-MCP

Step 3: Initialize the Project (uv)

Initialize the project environment:

uv init

Step 4: Install Dependencies

Add all required dependencies:

uv add fastmcp gitpython pygithub python-dotenv numpy faiss-cpu ollama

Step 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_repo
  • clone_repo
  • create_branch
  • sync_with_upstream
  • index_repo
  • get_repo_context
  • apply_patch
  • run_tests
  • retry_fix_with_tests
  • commit_and_push
  • create_pull_request
  • check_for_conflicts
  • update_pr_after_feedback

Each tool is single-responsibility and composable.


🧪 Testing Workflow

  1. Apply generated patch
  2. Run tests (pytest -q by default)
  3. Retry fixes automatically if tests fail
  4. 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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选