MCP Catalogs
首页

github-to-mcp

by nirholas·28·综合分 45

将 GitHub 仓库转换为 MCP 服务器,从 OpenAPI、GraphQL 和 REST API 中提取工具。

developer-toolsai-llmgithub
4
Forks
0
活跃 Issue
本月
最近提交
2 天前
收录于

概述

GitHub to MCP 通过自动生成 MCP 服务器,架起了代码仓库与 AI 助手之间的桥梁。它分析 GitHub 仓库,检测 API 和代码模式,然后创建 TypeScript 或 Python MCP 服务器,使 AI 助手能够与代码库交互。该工具支持多种输入格式,包括 OpenAPI/Swagger 规范、GraphQL 模式和各种编程语言。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:使 AI 助手能够以编程方式探索和交互代码库
:从现有 API 文档自动生成 MCP 服务器
:将 AI 助手与专有或内部代码仓库集成
:什么类型的仓库可以转换为 MCP 服务器?
:能否处理私有的 GitHub 仓库?

什么时候选它

当您需要快速从现有代码仓库创建 MCP 服务器,特别是处理 OpenAPI、GraphQL 或 REST API,并希望最大限度地减少手动工具定义时,选择此工具。

什么时候不要选它

如果您需要具有复杂业务逻辑的高度定制化工具,而这些逻辑无法从仓库元数据和 API 规范中推断,则应避免使用此工具。

此 server 暴露的工具

从 README 抽取出 4 个工具
  • get_readme

    Retrieve the repository's README content

  • list_fileslist_files(path?: string)

    List files and directories at a given path

  • read_fileread_file(path: string)

    Read the contents of a specific file

  • search_codesearch_code(query: string, path?: string)

    Search for patterns across the repository

可对比工具

repo-to-mcpapi-to-mcpopenapi-to-mcpcustom-mcp-server-generator

安装

Web 界面(最简单)

访问 [github-to-mcp.vercel.app](https://github-to-mcp.vercel.app) — 粘贴任何 GitHub URL,点击生成,下载您的 MCP 服务器。

CLI(一键命令)

npx @nirholas/github-to-mcp https://github.com/stripe/stripe-node

Claude Desktop 配置

添加到 claude_desktop_config.json:

{
  "mcpServers": {
    "github-repo": {
      "command": "npx",
      "args": ["@nirholas/github-to-mcp", "https://github.com/your/repo"],
      "env": {}
    }
  }
}

FAQ

什么类型的仓库可以转换为 MCP 服务器?
该工具支持 API 仓库(OpenAPI/Swagger、GraphQL)、CLI 工具、库以及 TypeScript、Python、Go、Java、Kotlin、Rust、Ruby 和 C# 中的代码仓库。
能否处理私有的 GitHub 仓库?
是的,您可以提供 GitHub 令牌作为环境变量来访问私有仓库并提高速率限制。

github-to-mcp 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。