
自动将GitHub仓库转换为MCP服务器。从OpenAPI、GraphQL和REST API中提取Claude Desktop、Cursor、Windsurf、Cline和VS Code的工具。
概览
只需几秒钟即可将任何GitHub仓库转换为MCP服务器 让Claude、ChatGPT、Cursor、Windsurf、Cline以及任何AI助手即时访问任何代码库。 🌐 网页应用 • 🚀 快速入门 • ✨ 功能 • 📖 文档 GitHub 到 MCP 弥合了代码仓库与 AI 助手之间的鸿沟。该工具无需手动描述 API 或将代码片段复制到聊天窗口,而是生成一个标准化界面,使 AI 系统能够程序化地探索、阅读并与任何 GitHub 仓库交互。 生成的MCP服务器为AI助手提供了工具,用于读取文件、搜索代码、列出目录结构以及调用仓库中发现的API端点。这使得AI助手能够在无需手动上下文管理的情况下,获得深入且结构化的代码库访问。 这是由Anthropic开发的开放标准,定义了AI助手如何与外部工具和数据源通信。
概述(AI 翻译)
GitHub 到 MCP
只需几秒钟即可将任何GitHub仓库转换为MCP服务器
让Claude、ChatGPT、Cursor、Windsurf、Cline以及任何AI助手即时访问任何代码库。
🌐 网页应用 • 🚀 快速入门 • ✨ 特色 • 📖 文档
📋 目录
- 引言
- 什么是MCP
- 快速入门
- 特色
- 安装
- 使用情况
- 工作原理
- 生成工具
- 配置
- 与AI助手集成
- 互动游乐场
- 项目结构
- 发展
- 架构概述
- 支持的输入格式
- 输出格式
- 局限性
- 故障排除
- 贡献
- 许可证
📖 引言
GitHub 到 MCP 弥合了代码仓库与 AI 助手之间的鸿沟。该工具无需手动描述 API 或将代码片段复制到聊天窗口,而是生成一个标准化界面,使 AI 系统能够程序化地探索、阅读并与任何 GitHub 仓库交互。
生成的MCP服务器提供了工具,AI助手可以调用以读取文件、搜索代码、列出目录结构以及调用仓库中发现的API端点。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
GitHub to MCP
Convert any GitHub repository into an MCP server in seconds
Give Claude, ChatGPT, Cursor, Windsurf, Cline, and any AI assistant instant access to any codebase.
🌐 Web App • 🚀 Quick Start • ✨ Features • 📖 Docs
📋 Table of Contents
- Introduction
- What is MCP
- Quick Start
- Features
- Installation
- Usage
- How It Works
- Generated Tools
- Configuration
- Integrating with AI Assistants
- Interactive Playground
- Project Structure
- Development
- Architecture Overview
- Supported Input Formats
- Output Formats
- Limitations
- Troubleshooting
- Contributing
- License
📖 Introduction
GitHub to MCP bridges the gap between code repositories and AI assistants. Instead of manually describing APIs or copying code snippets into chat windows, this tool generates a standardized interface that allows AI systems to programmatically explore, read, and interact with any GitHub repository.
The generated MCP servers provide tools that AI assistants can invoke to read files, search code, list directory structures, and call API endpoints discovered within the repository. This enables AI assistants to have deep, structured access to codebases without requiring manual context management.
┌─────────────────────────────────────────────────────────────┐
│ GitHub Repository │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ 1. Fetch & Classify → Detect repo type (API/CLI/Lib) │
│ 2. Extract Tools → OpenAPI, GraphQL, Code, README │
安装
npx @nirholas/github-to-mcp https://github.com/stripe/stripe-node配置
{
"mcpServers": {
"my-repo": {
"command": "node",
"args": ["/absolute/path/to/generated/server.mjs"],
"env": {
"GITHUB_TOKEN": "ghp_xxxx"
}
}
}
}