nirholas/github-to-mcp
把任意 GitHub 仓库转成 MCP 服务器,让 AI 直接访问代码库
解决什么问题
没有它,只能手动向 AI 描述 API 或粘贴代码片段,AI 无法结构化地浏览仓库。
- 自动识别仓库类型并提取工具
- 生成 TypeScript 或 Python 服务
- 支持读文件、搜代码、调 API
适用客户端
- claude-desktop
- cursor
- vscode
- cline
- windsurf
- cli
安装命令
npx @nirholas/github-to-mcp https://github.com/stripe/stripe-node npx tsc --noEmit 一键配置
{
"mcpServers": {
"my-repo": {
"command": "node",
"args": [
"/absolute/path/to/generated/server.mjs"
],
"env": {
"GITHUB_TOKEN": "ghp_xxxx"
}
}
}
} {
"mcpServers": {
"github-to-mcp": {
"type": "http",
"url": "https://modelcontextprotocol.name/mcp/github-to-mcp"
}
}
} 安全标记
- 需要 API Key: 是
- 本地运行: 是
- 访问网络: 是
- 需要 root: 否
维护状态
| 最近提交 | 2026-12-06(0d) |
|---|---|
| Star | 35 |
| 待处理 issue | 0 |
| 协议 | — |
| 已归档 | 否 |
| 数据抓取于 | 2026-12-06 |
原文摘录
以下为仓库 README 原文,未做改写,用于核对上面的摘要。
Convert any GitHub repository into an MCP server in seconds