GitHub Tools MCP Server
GitHub Tools MCP Server
一个真正的 Model Context Protocol 服务器,它暴露基于 GitHub REST API 的只读工具——一分钟内即可安装到 Claude Desktop 或 Claude Code 中使用——另外还有一个独立的 Web 演示,通过普通的聊天界面演练同一套工具逻辑。
在线演示: https://mcp-demo-phi.vercel.app/demo
状态:这是什么、不是什么
可正常运行且已部署。 全部 5 个工具都对照真实 GitHub 数据验证过;3 个测试套件共 42 项自动化检查全部通过;完整应用也已确认在真实的生产 URL 上运行。开发路上每个决策与 bug 的如实记录,见 DESIGN_LOG.md。
Web 演示并不是 MCP 传输通道。 它只是一个普通的 FastAPI 应用,直接以 Python 调用同一个 tools.py 文件里的函数,并不使用 MCP 协议。这是一个值得澄清的区别——至于这里为什么没有实现真正的远程 MCP 传输,参见 DESIGN_LOG.md 第 3 节。
Related MCP server: GitHub MCP Connector
架构
┌─────────────────────┐
│ tools.py │ <- 5 pure functions, no
│ (GitHub REST calls │ MCP-specific code
│ via github_client) │
└──────────┬───────────┘
│
┌────────────────┴────────────────┐
│ │
┌─────────▼─────────┐ ┌───────────▼──────────┐
│ server.py │ │ api/index.py │
│ MCPServer, stdio │ │ FastAPI, POST /chat │
│ transport │ │ real Claude tool- │
│ -> Claude Desktop/ │ │ calling loop over │
│ Claude Code │ │ the same tools │
└─────────────────────┘ └────────────────────────┘
THE MCP SERVER A PLAIN HTTP DEMO OF
(the real deliverable) THE SAME TOOL LOGIC安装
cp .env.example .env # GITHUB_TOKEN (both halves), ANTHROPIC_API_KEY (web demo only)
pip install -r requirements.txt在本地运行 MCP 服务器
python3 server.py添加到 Claude Desktop:编辑 %APPDATA%\Claude\claude_desktop_config.json(Windows)或 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS),把 claude_desktop_config.example.json 的内容合并进去(填入你自己的真实 GITHUB_TOKEN 和 server.py 的绝对路径),然后重启 Claude Desktop。添加到 Claude Code:运行 claude mcp add,或按同样的方式编辑你项目中的 .mcp.json。
手动交互式开发工作流:SDK 自带一个 inspector,可以在没有完整客户端的情况下手动探查服务器——npx @modelcontextprotocol/inspector python3 server.py。
在本地运行 Web 演示
export $(cat .env | xargs)
uvicorn api.index:app --reload --port 8020设计日志
每一个不显而易见的决策,以及基于实际安装的包验证过(而不是凭可能已过时的文档猜测出来)的 SDK API 表面,都记录在 DESIGN_LOG.md 中。
This server cannot be deployed
Maintenance
Related MCP Connectors
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Search verified Claude Code plugins and skills; fetch portable SKILL.md sources. Read-only.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceConnects Claude Desktop to GitHub repositories, enabling users to perform git operations and GitHub API interactions through natural conversation.538 npm-
- FlicenseNot gradedqualityDmaintenanceEnables browsing GitHub profile, repositories, issues, and pull requests directly in Claude conversation through OAuth authentication.-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to analyze GitHub repositories with tools for health scoring, contributor analysis, issue tracking, code search, and more.MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to query GitHub repositories in plain English, fetching recent activity, release notes, issue triage, and health summaries via the GitHub API.-