github-repo-mcp-server
Enables AI assistants to query GitHub repositories, issues, pull requests, CI status, and discover trending repos via natural language. Provides MCP tools, resources, and prompts for GitHub data access.
README
github-repo-mcp-server
An MCP (Model Context Protocol) server that lets an AI assistant query GitHub on your behalf — your own repos, issues, PRs, and CI status, plus discovery of trending repos by topic across public GitHub.
See SPEC.md for the full design and development plan.
Status
✅ All planned milestones complete.
- [x] M0 — Project scaffold: TypeScript + MCP SDK, minimal
pingtool over stdio - [x] M1 — GitHub client + config (Octokit auth, repo allowlist)
- [x] M2 — Tier 1 read-only personal-repo tools (12 tools)
- [x] M3 —
search_trending_reposdiscovery tool - [x] M4 — MCP resources (README, issue/PR content)
- [x] M5 — MCP prompts (reusable templates)
- [x] M6 — Tests, rate-limit hardening, docs
Tier 2 write tools (create issue, comment, etc.) were scoped out of v1 intentionally — see SPEC.md §11. This is a read-only server.
Requirements
- Node.js 18+ (developed against Node 20; see
.nvmrc)
Configuration
- Copy
.env.exampleto.envand setGITHUB_TOKENto a fine-grained personal access token with read-onlyContents,Issues,Pull requests, andActionspermissions, scoped to the repos you want this server to access. - List those repos (as
"owner/repo"strings) inconfig.json— this is the allowlist personal-scope tools are restricted to.search_trending_reposis exempt, since it queries public GitHub data rather than a specific repo. get_notificationsadditionally needs the token's Notifications account permission (separate section from repository permissions on the token creation page) — every other tool works without it.
Tools
Personal scope (allowlist-gated): get_repo, list_repos, list_branches,
list_commits, get_file_contents, list_issues, get_issue,
list_pull_requests, get_pull_request, search_code, get_workflow_runs,
get_notifications.
Global discovery (not allowlist-gated, searches public GitHub data):
search_trending_repos — finds trending repos for a topic, ranked by star
velocity among recently-created repos. A documented proxy for
github.com/trending, which has no official API.
Resources
| URI template | Content |
|---|---|
repo://{owner}/{repo}/readme |
The repo's README, as markdown |
repo://{owner}/{repo}/issues/{number} |
Issue title, body, and comments |
repo://{owner}/{repo}/pulls/{number} |
PR title, description, diff stats |
Prompts
| Name | What it does |
|---|---|
summarize_prs_for_review |
Finds open PRs and summarizes which need attention |
weekly_repo_digest |
Commits, issues, PRs, and CI status from the last week |
whats_trending |
Trending public repos for a GitHub topic |
Getting started
npm install
npm run dev # run the server directly via tsx
npm run build # compile to dist/
npm start # run the compiled server
The server communicates over stdio, following the MCP protocol — it's meant to be launched by an MCP-compatible host (e.g. Claude Code), not run standalone in a terminal.
Testing
npm test # typecheck (src + test) then run the full vitest suite
npm run typecheck
The suite (32 tests) runs through the real MCP protocol layer — an
McpServer and Client connected over an in-memory transport — with
@octokit/rest mocked, so it exercises actual schema validation and request
routing without making live API calls. Every tool, resource, and prompt was
also manually verified against a real repo during development; see individual
commit messages for what was and wasn't exercised against real data.
Notable things found during development
A few real issues surfaced by testing against live data instead of just mocks, worth knowing if you extend this:
- GitHub's code search doesn't index unstarred forks.
search_codereturned 0 results withincomplete_results: trueagainst a fresh fork - confirmed via a rawcurlcall that this is GitHub's own indexing limitation, not a bug (forks are only code-search-indexed once they have more stars than their parent repo). get_notificationsneeds a separate token permission. It uses a GitHub account-level permission (Notifications), not a repository permission like every other tool - discovered via a live 403, now surfaced as a specific error message instead of the generic one.- Composed Octokit plugin types aren't portable. Wrapping the client
with
@octokit/plugin-throttlingbroke.d.tsemission (TS2883). Fixed by droppingdeclaration: truefromtsconfig.json, since this is a runnable server, not a library other packages import.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。