Skip to main content
Glama

FastMCP GitHub Automation Server

GIT-Pilot

GIT-Pilot 是一款功能强大的 GitHub 自动化和管理工具,为 GitHub 操作提供了全面的 API 封装。它通过基于 FastMCP 的服务器简化了 GitHub 交互,让您能够轻松管理仓库、拉取请求、问题等。

🌟 功能

🔐 身份验证和安全

  • 使用 Fernet 加密来保护令牌管理
  • 令牌过期和自动清理
  • 速率限制处理和自动重试
  • 可配置的身份验证超时

📦 仓库管理

  • 创建和管理存储库
  • 处理分支和提交
  • 文件操作(创建、更新、删除)
  • 存储库搜索和过滤
  • 提交比较和历史记录

🔄 拉取请求操作

  • 创建和管理拉取请求
  • 合并策略(合并、压缩、变基)
  • 状态检查验证
  • 冲突检测与处理
  • 公关支持草案

📝 问题管理

  • 创建和更新问题
  • 标签管理
  • 受让人处理
  • 评论管理
  • 问题搜索和过滤

🛠 技术特点

  • 线程安全操作
  • 资源管理
  • 全面的错误处理
  • 详细日志记录
  • 类型安全
  • 配置管理
  • FastMCP 服务器集成

🚀 入门

先决条件

  • Python 3.12 或更高版本
  • GitHub 帐户
  • GitHub 个人访问令牌
  • FastMCP CLI(可选)

安装

  1. 克隆存储库:
git clone https://github.com/yourusername/GIT-Pilot.git cd GIT-Pilot
  1. 安装 uv(如果尚未安装):
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 创建并激活虚拟环境:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
  1. 使用 uv 安装包:
uv pip install -e .
  1. 设置环境变量:在项目根目录中创建一个.env文件:
GITHUB_TOKEN=your_github_token_here

基本用法

设置 Claude 桌面集成
  1. 启动 GIT-Pilot 服务器:
uv run main.py
  1. 下载并安装Claude Desktop
  2. 配置Claude桌面:
    • 打开 Claude 桌面
    • 转到File > Settings > Developer > Edit Config
    • 添加以下配置:
{ "mcpServers": { "GIT-Pilot": { "command": "uv", "args": [ "--directory", "path\\to\\repo", "run", "main.py" ] } } }
  1. 重启Claude桌面
  2. 在聊天窗口中查找锤子图标 - 这表示 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 错误
  • 速率限制
  • 无效输入
  • 资源冲突
  • 网络问题
  • 令牌验证
  • 文件操作

📈 日志记录

详细记录:

  • 时间戳
  • 日志级别
  • 函数名称
  • 行号
  • 错误详细信息
  • 堆栈跟踪
  • 速率限制信息
  • 代币操作

🤝 贡献

欢迎投稿!请按以下步骤操作:

  1. 分叉存储库
  2. 创建功能分支
  3. 提交你的更改
  4. 推送到分支
  5. 创建拉取请求

📝 许可证

该项目根据 GNU 通用公共许可证 v3.0 获得许可 - 有关详细信息,请参阅LICENSE文件。

🙏 致谢


由 GIT-Pilot 团队倾情打造

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

通过基于 FastMCP 的服务器为 GitHub 操作提供全面的 API 包装器,通过安全身份验证简化存储库管理、拉取请求、问题和其他 GitHub 交互。

  1. 🌟 功能
    1. 🔐 身份验证和安全
    2. 📦 仓库管理
    3. 🔄 拉取请求操作
    4. 📝 问题管理
    5. 🛠 技术特点
  2. 🚀 入门
    1. 先决条件
    2. 安装
    3. 基本用法
    4. API 示例
  3. 🔧 配置
    1. 🛡 安全
      1. 🔄 速率限制
        1. 🧪 错误处理
          1. 📈 日志记录
            1. 🤝 贡献
              1. 📝 许可证
                1. 🙏 致谢

                  Related MCP Servers

                  • A
                    security
                    F
                    license
                    A
                    quality
                    MCP Server for the GitHub API, providing features for file operations, repository management, and advanced search, with automatic branch creation and comprehensive error handling.
                    Last updated -
                    18
                    4
                    3
                    TypeScript
                    • Linux
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Provides tools for interacting with GitHub's API through the MCP protocol, allowing users to create repositories, push content, and retrieve user information.
                    Last updated -
                    JavaScript
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A MCP server that provides access to GitHub trending repositories and developers data through a simple API interface.
                    Last updated -
                    2
                    1
                    Python
                    MIT License
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    An MCP server that wraps around the GitHub CLI tool, allowing AI assistants to interact with GitHub repositories through commands for pull requests, issues, and repository operations.
                    Last updated -
                    123
                    TypeScript
                    MIT License
                    • Linux
                    • Apple

                  View all related MCP servers

                  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/SiddheshDongare/GIT-Pilot'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server