FastMCP GitHub Automation Server
GIT-Pilot
GIT-Pilot 是一款功能强大的 GitHub 自动化和管理工具,为 GitHub 操作提供了全面的 API 封装。它通过基于 FastMCP 的服务器简化了 GitHub 交互,让您能够轻松管理仓库、拉取请求、问题等。
🌟 功能
🔐 身份验证和安全
使用 Fernet 加密来保护令牌管理
令牌过期和自动清理
速率限制处理和自动重试
可配置的身份验证超时
📦 仓库管理
创建和管理存储库
处理分支和提交
文件操作(创建、更新、删除)
存储库搜索和过滤
提交比较和历史记录
🔄 拉取请求操作
创建和管理拉取请求
合并策略(合并、压缩、变基)
状态检查验证
冲突检测与处理
公关支持草案
📝 问题管理
创建和更新问题
标签管理
受让人处理
评论管理
问题搜索和过滤
🛠 技术特点
线程安全操作
资源管理
全面的错误处理
详细日志记录
类型安全
配置管理
FastMCP 服务器集成
Related MCP server: GitHub MCP Server
🚀 入门
先决条件
Python 3.12 或更高版本
GitHub 帐户
GitHub 个人访问令牌
FastMCP CLI(可选)
安装
克隆存储库:
git clone https://github.com/yourusername/GIT-Pilot.git
cd GIT-Pilot安装 uv(如果尚未安装):
curl -LsSf https://astral.sh/uv/install.sh | sh创建并激活虚拟环境:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate使用 uv 安装包:
uv pip install -e .设置环境变量:在项目根目录中创建一个
.env文件:
GITHUB_TOKEN=your_github_token_here基本用法
设置 Claude 桌面集成
启动 GIT-Pilot 服务器:
uv run main.py下载并安装Claude Desktop
配置Claude桌面:
打开 Claude 桌面
转到
File > Settings > Developer > Edit Config添加以下配置:
{
"mcpServers": {
"GIT-Pilot": {
"command": "uv",
"args": [
"--directory",
"path\\to\\repo",
"run",
"main.py"
]
}
}
}重启Claude桌面
在聊天窗口中查找锤子图标 - 这表示 MCP 服务器已准备好使用
API 示例
# Create a repository
await call_tool("create_repository",
name="my-repo",
description="My awesome repository",
private=True,
has_issues=True,
has_wiki=True,
has_projects=True,
auto_init=True
)
# Create a pull request
await call_tool("create_pull_request",
repo_path="owner/repo",
title="New feature",
head="feature-branch",
base="main",
body="Description of changes",
draft=False
)
# List commits with filtering
await call_tool("list_commits",
repo_path="owner/repo",
branch="main",
author="username",
since="2024-01-01",
until="2024-04-21",
max_results=30
)🔧 配置
可以通过Config类来配置服务:
@dataclass
class Config:
TOKEN_TTL_HOURS: int = 24
MAX_STORED_TOKENS: int = 1000
CLEANUP_INTERVAL_SECONDS: int = 3600
MAX_RETRIES: int = 3
RETRY_DELAY_SECONDS: int = 5
MAX_RESULTS_PER_PAGE: int = 100
ENCRYPTION_KEY: bytes = Fernet.generate_key()🛡 安全
使用 Fernet 对令牌进行静态加密
自动令牌过期和清理
通过重试实现速率限制保护
输入验证
全面的错误处理
安全令牌清理
🔄 速率限制
该服务包括内置速率限制处理:
达到速率限制时自动重试
可配置的重试次数
重试之间的延迟
速率限制状态日志记录
指数退避
🧪 错误处理
全面的错误处理:
身份验证失败
API 错误
速率限制
无效输入
资源冲突
网络问题
令牌验证
文件操作
📈 日志记录
详细记录:
时间戳
日志级别
函数名称
行号
错误详细信息
堆栈跟踪
速率限制信息
代币操作
🤝 贡献
欢迎投稿!请按以下步骤操作:
分叉存储库
创建功能分支
提交你的更改
推送到分支
创建拉取请求
📝 许可证
该项目根据 GNU 通用公共许可证 v3.0 获得许可 - 有关详细信息,请参阅LICENSE文件。
🙏 致谢
由 GIT-Pilot 团队倾情打造
This server cannot be deployed
Maintenance
Related MCP Connectors
GitHub MCP — wraps the GitHub public REST API (no auth required for public endpoints)
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Manage repositories, users, releases, and automate GitHub workflows
Create, deploy, and operate MCP servers directly from your GitHub repositories.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides tools for interacting with GitHub's API through the MCP protocol, allowing users to create repositories, push content, and retrieve user information.378 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables interaction with GitHub repositories through the GitHub API using fastMCP. Supports repository information retrieval and management with secure token-based authentication.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that wraps the GitHub CLI to provide comprehensive access to repository management, pull requests, issues, and workflows. It enables users to perform complex GitHub operations and interact with the GitHub API through a standardized interface.2 npm1ISC
- FlicenseNot gradedqualityDmaintenanceProvides access to GitHub v3 REST API functionality through STDIO mode with FastMCP, enabling users to interact with GitHub resources.-