mcp-github-agent
mcp-agent
一个多服务 MCP(Model Context Protocol)服务器,为 AI 代理提供跨 9 个平台的 34 个工具——GitHub、Jira、Azure DevOps、Slack、PagerDuty、Linear、Notion、HuggingFace 和 OpenWeather。
无需在标签页和仪表盘之间来回切换,你只需用自然语言与 AI 助手对话,它就会直接查询或操作这些系统。
适用于 Claude、GPT-4o、Azure OpenAI 以及任何兼容 MCP 的客户端。
什么是 MCP?
Model Context Protocol(模型上下文协议) 是 Anthropic 提出的开放标准,让 AI 模型能够以结构化、安全的方式与外部工具和 API 通信。AI 保持在对话中,但可以触达真实系统来获取数据或执行操作——自主决定调用哪些工具以及调用顺序。
→ 工作原理详解
Related MCP server: GitBridge
服务与工具
GitHub
工具 | 类型 | 功能 |
| 读取 | 个人简介、所在地、关注者数量及公开仓库数 |
| 读取 | 按活跃度、星标数或日期排序的公开仓库 |
| 读取 | 星标数、fork 数、未关闭 issue、主题、许可证、最后推送时间 |
| 读取 | 未关闭或已关闭的 issue |
| 读取 | 未关闭或已合并的拉取请求 |
| 读取 | 仓库中任意文件的内容 |
| 读取 | 按提交次数排名的顶级贡献者 |
| 读取 | 最新版本与更新日志 |
| 读取 | 按语言和周期(每日/每周/每月)查看趋势仓库 |
| 读取 | 按关键词、主题或语言搜索 |
| 写入 | 创建新 issue(需要 |
Jira
工具 | 类型 | 功能 |
| 读取 | 使用 JQL 搜索 issue |
| 读取 | 按 key 查看 issue 的完整详情 |
| 读取 | 按状态筛选的项目 issue |
| 写入 | 创建 Task、Bug、Story 或 Epic |
Azure DevOps
工具 | 类型 | 功能 |
| 读取 | 列出项目中的 CI/CD 流水线 |
| 读取 | 查看流水线的最近运行记录 |
| 读取 | 按关键词搜索工作项 |
| 写入 | 创建 Task、Bug、User Story 或 Epic |
Slack
工具 | 类型 | 功能 |
| 读取 | 列出工作区中的公开频道 |
| 读取 | 读取频道中的最近消息 |
| 写入 | 向频道或用户发送消息 |
PagerDuty
工具 | 类型 | 功能 |
| 读取 | 按状态列出事件 |
| 读取 | 列出已配置的服务 |
| 写入 | 触发新事件 |
Linear
工具 | 类型 | 功能 |
| 读取 | 列出工作区中的团队 |
| 读取 | 按状态筛选的团队 issue |
| 写入 | 在团队中创建 issue |
Notion
工具 | 类型 | 功能 |
| 读取 | 按关键词搜索页面和数据库 |
| 读取 | 获取页面内容 |
| 写入 | 在父页面下创建新页面 |
HuggingFace
工具 | 类型 | 功能 |
| 读取 | 按关键词和任务搜索模型 |
| 读取 | 模型详细信息(下载量、点赞数、标签) |
| 读取 | 按关键词搜索数据集 |
OpenWeather
工具 | 类型 | 功能 |
| 读取 | 城市当前天气 |
| 读取 | 城市多日天气预报 |
示例用例
跨服务推理
"检查本周是否有与 Azure DevOps 流水线失败相关的未关闭 Jira bug,然后创建一个 GitHub issue 进行汇总。"
代理会自主依次调用 jira_search_issues → ado_get_pipeline_runs → create_issue。
事件响应
"支付服务上有一个活跃的 PagerDuty 事件。找到合并到该仓库的最新 PR,并通知 #incidents Slack 频道。"
代理会调用 pagerduty_get_incidents → get_pull_requests → slack_send_message。
AI 研究
"在 HuggingFace 上找到下载量最高的文本生成模型,然后在 GitHub 上搜索使用该热门模型的项目。"
代理会调用 hf_search_models → search_repos。
开发者入职
"这个仓库的前 5 位贡献者是谁?获取他们的 GitHub 个人资料,并创建一个 Notion 页面来汇总团队信息。"
代理会调用 get_repo_contributors → get_user_profile (×5) → notion_create_page。
→ 更多用例
安装
1. 克隆并安装
git clone https://github.com/Abdessamad-Y/mcp-github-agent.git
cd mcp-github-agent
pip install -r requirements.txt2. 配置你的服务
cp .env.example .env
# Add tokens only for the services you want to use
# Unused services are safely ignored3. 连接到你的 AI 客户端
→ 参见 docs/integrations.md 获取设置指南:
Claude Desktop — 原生 MCP,无需编写代码
Claude API — 带代理循环的 Python 脚本
OpenAI (GPT-4o) — 通过
openai-agentsSDKAzure OpenAI — 通过 OpenAI SDK + Azure 端点
Cursor / VS Code Copilot
运行演示
GITHUB_TOKEN=your_token python demo.py运行 4 个真实场景,并输出格式化的终端结果。无需 AI API 密钥。
运行示例
# With Claude API
GITHUB_TOKEN=your_token ANTHROPIC_API_KEY=your_key python examples/with_claude.py
# With OpenAI
GITHUB_TOKEN=your_token OPENAI_API_KEY=your_key python examples/with_openai.py
# With Azure OpenAI
GITHUB_TOKEN=your_token \
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com \
AZURE_OPENAI_KEY=your_key \
AZURE_OPENAI_DEPLOYMENT=gpt-4o \
python examples/with_azure_openai.py项目结构
mcp-github-agent/
├── server.py # Entry point — registers all tools
├── mcp_instance.py # Shared FastMCP instance
├── tools/
│ ├── github.py # 11 GitHub tools
│ ├── jira.py # 4 Jira tools
│ ├── azure_devops.py # 4 Azure DevOps tools
│ ├── slack.py # 3 Slack tools
│ ├── pagerduty.py # 3 PagerDuty tools
│ ├── linear.py # 3 Linear tools
│ ├── notion.py # 3 Notion tools
│ ├── huggingface.py # 3 HuggingFace tools
│ └── weather.py # 2 OpenWeather tools
├── examples/
│ ├── with_claude.py
│ ├── with_openai.py
│ └── with_azure_openai.py
├── docs/
│ ├── how-it-works.md
│ ├── use-cases.md
│ └── integrations.md
├── demo.py
├── requirements.txt
└── .env.example技术栈
语言 | Python 3.10+ |
MCP SDK |
|
HTTP 客户端 |
|
终端输出 |
|
文档
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to access and analyze GitHub profile data, providing insights on repositories, commit history, coding patterns, and generating portfolio summaries for developers and recruiters.82MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze GitHub repositories, including fetching repository details, searching, and retrieving README content.4522ISC
- FlicenseNot gradedqualityBmaintenanceEnables users to interact with GitHub via natural language requests, executing API calls and returning structured responses.
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to perform GitHub operations such as creating repositories, issues, pull requests, and more through natural language.
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Abdessamad-Y/mcp-github-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server