能力标签
GitHub到MCP工具
🔌
MCP工具

GitHub到MCP工具

基于 TypeScript · 让 AI 助手直接操作你的系统与工具
英文名:github-to-mcp
⭐ 31 Stars 🍴 4 Forks 💻 TypeScript 📄 Apache-2.0 🏷 AI 7.5分
7.5AI 综合评分
mcpaiautomation
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,GitHub到MCP工具 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。

📚 深度解析

GitHub到MCP工具 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 GitHub到MCP工具,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。GitHub到MCP工具 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 GitHub到MCP工具 评为 AI 评分 7.5 分,属于同类工具中的优质选择。

📋 工具概览

GitHub到MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 31
开发语言
TypeScript
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
Apache-2.0
AI 综合评分
7.5 分
工具类型
MCP工具
Forks
4

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

GitHub到MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/nirholas/github-to-mcp

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "github-mcp--": {
      "command": "npx",
      "args": ["-y", "github-to-mcp"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 GitHub到MCP工具 执行以下任务...
Claude: [自动调用 GitHub到MCP工具 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "github_mcp__": {
      "command": "npx",
      "args": ["-y", "github-to-mcp"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 87/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

<p align="center"> <img src="apps/web/public/logo.svg" alt="GitHub to MCP" width="120" height="120" /> </p>

GitHub to MCP

<p align="center"> <strong>Convert any GitHub repository into an MCP server in seconds</strong> </p>

<p align="center"> Give Claude, ChatGPT, Cursor, Windsurf, Cline, and any AI assistant instant access to any codebase. </p>

<p align="center"> <a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License" /></a> <a href="https://www.npmjs.com/package/@nirholas/github-to-mcp"><img src="https://img.shields.io/npm/v/@nirholas/github-to-mcp.svg" alt="npm version" /></a> <a href="https://github.com/nirholas/github-to-mcp/stargazers"><img src="https://img.shields.io/github/stars/nirholas/github-to-mcp.svg?style=social" alt="GitHub Stars" /></a> </p>

<p align="center"> <a href="https://github-to-mcp-web-lp642k3kpa-uc.a.run.app">🌐 Web App</a> • <a href="#-quick-start">🚀 Quick Start</a> • <a href="#-features">✨ Features</a> • <a href="https://github-to-mcp-docs-lp642k3kpa-uc.a.run.app">📖 Docs</a> </p>

---

📖 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     │
│  3. Generate Server   →  TypeScript or Python MCP server    │
│  4. Bundle Output     →  Complete package with dependencies │
└─────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────┐
│              Ready-to-use MCP Server + Config               │
└─────────────────────────────────────────────────────────────┘

---

🏗️ Architecture Overview

The system follows a pipeline architecture:

Input (GitHub URL)
       │
       ▼
┌──────────────────┐
│  GitHub Client   │  Fetches repository metadata, files, and README
└──────────────────┘
       │
       ▼
┌──────────────────┐
│   Classifier     │  Determines repository type and structure
└──────────────────┘
       │
       ▼
┌──────────────────┐
│   Extractors     │  Multiple extractors run in parallel:
│  ├─ OpenAPI      │  • Parse API specifications
│  ├─ GraphQL      │  • Parse GraphQL schemas
│  ├─ README       │  • Extract examples from documentation
│  ├─ Code         │  • Analyze source code
│  └─ MCP          │  • Detect existing MCP tools
└──────────────────┘
       │
       ▼
┌──────────────────┐
│  Deduplicator    │  Removes duplicate tools, merges similar ones
└──────────────────┘
       │
       ▼
┌──────────────────┐
│   Validator      │  Validates tool schemas, adds confidence scores
└──────────────────┘
       │
       ▼
┌──────────────────┐
│   Generator      │  Produces output code in target language
└──────────────────┘
       │
       ▼
Output (MCP Server Code + Configuration)

Each extractor produces a list of ExtractedTool objects with a standardized schema. The deduplicator and validator ensure consistency before the generator produces the final output.

---

✨ Features

Prerequisites

RequirementVersion
Node.js22.x or later
pnpm10.x or later
Git2.x or later

Install dependencies

pnpm install

📥 Installation

Local Setup

```bash

Build all packages

pnpm build

Building

```bash

Build all packages

pnpm build

Build specific package

pnpm --filter @nirholas/github-to-mcp build pnpm --filter @github-to-mcp/openapi-parser build pnpm --filter web build ```

🚀 Quick Start

📖 Usage

Basic usage

node packages/core/dist/cli.mjs https://github.com/owner/repo

Use Cases & Applications Keywords

trading bot, DeFi agent, yield optimizer, data oracle, price feed, analytics agent, research agent, coding agent, development agent, automation agent, task agent, workflow agent, portfolio management, asset management, supply chain, service agent, API service, chatbot, AI assistant, virtual assistant, personal agent, enterprise agent, B2B agent, agent-as-a-service, AaaS, SaaS agent, AI SaaS, delegated agent, proxy agent, helper agent, worker agent, coordinator agent, orchestrator agent, validator agent, auditor agent, insurance agent, scoring agent, ranking agent

⚙️ Configuration

🔐 Environment Variables

VariableDescriptionRequired
GITHUB_TOKENGitHub personal access token for API accessNo (but recommended)
GITHUB_API_URLCustom GitHub API URL for EnterpriseNo

GitHub Token

Without a token, GitHub API requests are limited to 60 per hour. With a token, the limit increases to 5,000 per hour. For private repositories, a token with appropriate access is required.

Create a token at: https://github.com/settings/tokens

Required scopes: - repo (for private repositories) - public_repo (for public repositories only)

🎛️ Generator Options

When using the programmatic API, you can configure:

const generator = new GithubToMcpGenerator({
  // Authentication
  githubToken: process.env.GITHUB_TOKEN,
  
  // Extraction sources to enable
  sources: ['openapi', 'readme', 'code', 'graphql', 'grpc', 'mcp'],
  
  // Output configuration
  outputLanguage: 'typescript', // or 'python', 'go'
  
  // Tool filtering
  includeUniversalTools: true,
  maxTools: 100,
  
  // Repository options
  branch: 'main', // specific branch to analyze
});

---

Configuration Files

Each generated server includes:

FileDescription
claude_desktop_config.jsonClaude Desktop configuration snippet
cursor_config.jsonCursor editor configuration
package.json or requirements.txtDependencies
Dockerfile (optional)Container deployment

---

💻 CLI (One Command)

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

Using the Web Interface

The web application is deployed at github-to-mcp.vercel.app. Use the browser-based interface without any local installation.

---

🌐 Web Interface

The web interface provides the simplest way to convert repositories:

  1. Navigate to the web application
  2. Enter a GitHub repository URL (e.g., https://github.com/owner/repo)
  3. Optionally configure extraction options
  4. Click "Generate" to analyze the repository
  5. Review the generated tools and code
  6. Download the MCP server package or copy the configuration

The web interface also provides an interactive playground where you can test generated tools before downloading.

💻 Command Line Interface

After building the project locally, you can use the CLI:

```bash

📦 Programmatic API

Import the generator in your own TypeScript or JavaScript code:

import { GithubToMcpGenerator } from '@nirholas/github-to-mcp';

const generator = new GithubToMcpGenerator({
  githubToken: process.env.GITHUB_TOKEN,
  sources: ['openapi', 'readme', 'code'],
  outputLanguage: 'typescript'
});

const result = await generator.generate('https://github.com/owner/repo');

console.log(`Repository: ${result.name}`);
console.log(`Classification: ${result.classification.type}`);
console.log(`Generated ${result.tools.length} tools`);

// Access the generated code
console.log(result.code);

// Save to disk
await result.save('./output-directory');

<details> <summary><strong>📋 Generator Options Interface</strong></summary>

interface GithubToMcpOptions {
  // GitHub personal access token for API authentication
  githubToken?: string;
  
  // Which sources to extract tools from
  // Default: ['openapi', 'readme', 'code', 'graphql', 'mcp']
  sources?: Array<'openapi' | 'readme' | 'code' | 'graphql' | 'grpc' | 'mcp'>;
  
  // Output language for generated server
  // Default: 'typescript'
  outputLanguage?: 'typescript' | 'python' | 'go';
  
  // Include universal tools (read_file, list_files, etc.)
  // Default: true
  includeUniversalTools?: boolean;
  
  // Maximum number of tools to generate
  // Default: 100
  maxTools?: number;
  
  // Specific branch to analyze
  // Default: repository's default branch
  branch?: string;
}

</details>

---

API Specifications

FormatFile PatternsVersion Support
**OpenAPI**openapi.json, openapi.yaml, swagger.json, swagger.yaml, api.json, api.yaml2.0, 3.0.x, 3.1.x
**GraphQL**schema.graphql, *.gql, schema.jsonJune 2018 spec
**gRPC***.protoproto3
**AsyncAPI**asyncapi.json, asyncapi.yaml2.x

Endpoints & Integration Keywords

endpoint, agent endpoint, service endpoint, API endpoint, MCP endpoint, A2A endpoint, web endpoint, HTTPS endpoint, HTTP endpoint, DID, decentralized identifier, ENS, Ethereum Name Service, ENS name, agent.eth, vitalik.eth, email endpoint, OASF, Open Agent Specification Format, endpoint verification, domain verification, endpoint ownership, .well-known, well-known, agent-registration.json, endpoint domain, endpoint URL, endpoint URI, base64 data URI, on-chain metadata, off-chain metadata, metadata storage, JSON metadata, agent JSON, registration JSON

SDK & Developer Tools Keywords

SDK, Agent0 SDK, Agent0, ChaosChain SDK, ChaosChain, Lucid Agents, Daydreams AI, create-8004-agent, npm, TypeScript SDK, Python SDK, JavaScript, Solidity, smart contract, ABI, contract ABI, deployed contracts, contract addresses, Hardhat, development tools, developer tools, dev tools, API, REST API, GraphQL, subgraph, The Graph, indexer, blockchain explorer, Etherscan, contract verification, open source, MIT license, CC0, public domain, GitHub, repository, code repository, documentation, docs, best practices, reference implementation

💻 VS Code with Continue

If using the Continue extension for VS Code:

{
  "models": [...],
  "mcpServers": {
    "my-repo": {
      "command": "node",
      "args": ["/path/to/server.mjs"]
    }
  }
}

Competitor & Alternative Keywords

agent framework, agent platform, AI platform, centralized agents, closed agents, proprietary agents, gatekeeper, intermediary, platform lock-in, vendor lock-in, data silos, walled garden, open alternative, decentralized alternative, permissionless alternative, trustless alternative

🔧 Troubleshooting

<details> <summary><strong>❌ "Rate limit exceeded" errors</strong></summary>

Provide a GitHub token:

export GITHUB_TOKEN=ghp_xxxxxxxxxxxx

</details>

<details> <summary><strong>❌ "Repository not found" errors</strong></summary>

  • Verify the URL is correct
  • For private repositories, ensure your token has repo scope
  • Check that the repository exists and is accessible

</details>

<details> <summary><strong>❌ "No tools extracted" results</strong></summary>

  • Verify the repository contains API definitions or documented endpoints
  • Try enabling all extraction sources: --sources openapi,readme,code,graphql,mcp
  • Check that specification files follow standard naming conventions

</details>

<details> <summary><strong>❌ Generated server fails to start</strong></summary>

  • Ensure Node.js 22+ is installed
  • Run npm install in the generated directory
  • Check for TypeScript compilation errors with npx tsc --noEmit

</details>

<details> <summary><strong>❌ Claude Desktop does not show the server</strong></summary>

  • Verify the path in claude_desktop_config.json is absolute
  • Restart Claude Desktop after configuration changes
  • Check Claude Desktop logs for connection errors

</details>

---

🇨🇳 中文文档镜像 AI 翻译 2026-07-09
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

GitHub to MCP 是一个强大的转换工具,能够将任何 GitHub 仓库在数秒内转换为标准的 MCP server。它旨在打破代码库与 AI 助手之间的隔阂,让 Claude、ChatGPT、Cursor、Windsurf 和 Cline 等 AI 工具能够直接、程序化地访问、读取并交互任何 GitHub 代码库,无需再手动复制粘贴代码片段或描述 API。

⚡ 功能介绍

该工具支持通过多种方式提取仓库信息,包括 OpenAPI、README、源��码、GraphQL、gRPC 以及 MCP 协议。它能自动生成标准化的工具集,使 AI 助手具备读取文件、搜索代码和列出目录的能力,实现对代码库的深度理解与智能交互。

📋 环境依赖

在使用本项目之前,请确保您的开发环境已安装以下依赖:Node.js 版本需在 22.x 或更高;包管理工具 pnpm 版本需在 10.x 或更高;此外,系统中还需安装 Git 2.x 或更高版本以确保正常运行。

🛠 安装步骤(Docker/pip/源码)

您可以选择通过源码进行本地安装。首先,通过 `pnpm install` 安装所有必要的依赖项,随后运行 `pnpm build` 构建所有相关的 packages,即可完成本地开发环境的搭建。

🚀 使用教程

项目提供了极简的使用方式。对于快速测试,您可以使用 CLI 工具直接运行命令:`node packages/core/dist/cli.mjs <仓库URL>`。此外,您也可以通过 Web 界面进行操作,只需输入 GitHub 仓库地址并点击 Generate 即可完成转换。

⚙️ 配置说明(含 MCP / env)

可以通过环境变量进行配置。建议设置 `GITHUB_TOKEN` 以避免 GitHub API 每小时 60 次的频率限制。对于企业级用户,可配置 `GITHUB_API_URL`。若通过程序化 API 调用,还可以在 `GithubToMcpGenerator` 中自定义提取源(如 'openapi', 'code' 等)及输出语言(如 'typescript', 'python', 'go')。

🔌 API 说明

开发者可以通过 npx 直接运行 CLI 命令,例如 `npx @nirholas/github-to-mcp <仓库URL>`。同时,项目提供了一个 Web 界面(github-to-mcp.vercel.app),用户无需本地安装,直接在浏览器中输入仓库 URL 并配置提取选项即可生成工具。

❓ FAQ 摘要

针对常见问题,如果遇到 "Rate limit exceeded" 错误,请通过 `export GITHUB_TOKEN=your_token` 配置 GitHub 令牌以提升 API 调用频率。如果遇到 "Repository not found" 错误,请检查 URL 是否正确,并确保对于私有仓库已配置相应的访问权限。

🎯 aiskill88 AI 点评 A 级 2026-07-06

该工具提供了一种自动化GitHub仓库到MCP服务器的转换方式,提高了开发效率和工具利用率,但需要注意的是,工具的准确性和稳定性需要进一步优化。

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台

⚡ 核心功能

  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +Apache-2.0 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • 依赖 Claude 客户端,非 Claude 用户无法使用
  • MCP 协议仍在持续演进,接口可能变更
  • 需要一定的配置步骤
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

❓ 常见问题 FAQ

请参考工具文档中的配置指南。
💡 AI Skill Hub 点评

AI Skill Hub 点评:GitHub到MCP工具 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ Apache-2.0 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 GitHub到MCP工具
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 github-to-mcp
原始描述 开源MCP工具:Convert GitHub repositories to MCP servers automatically. Extract tools from Ope。⭐31 · TypeScript
Topics mcpaiautomation
GitHub https://github.com/nirholas/github-to-mcp
License Apache-2.0
语言 TypeScript
🔗 原始来源
🐙 GitHub 仓库  https://github.com/nirholas/github-to-mcp 🌐 官方网站  https://github-to-mcp.vercel.app

收录时间:2026-07-06 · 更新时间:2026-07-06 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。