GitHub MCP服务器

GitHub MCP服务器是一个用于GitHub API集成和自动化的工作流工具,提供仓库管理、问题自动化、PR工作流等功能,适用于开发团队和自动化场景。

  • by D1M1TR10S
  • HTML
  • 混合部署
  • 更新于
在 GitHub 查看 d1m1tr10s/github-mcp-server-dojo

使用说明

GitHub MCP服务器Dojo🥋

一个用于实验的游乐场存储库 GitHub MCP服务器 -探索其强大的工具、测试工作流程,并发现创造性的自动化可能性。

关于

该存储库充当GitHub模型上下文协议(MCP)服务器的测试场和学习环境。GitHub MCP Server提供与GitHub API的无缝集成,通过AI工具实现高级自动化和交互功能。

架构概述

graph TB
    subgraph "Frontend Application"
        HTML[index.html<br/>Main Structure<br/>🌐 Website Layout] --> CSS[styles.css<br/>Dark Purple Theme<br/>🎨 Visual Styling]
        HTML --> JS[script.js<br/>Interactive Features<br/>⚡ DOM Manipulation]
        CSS --> VARS[CSS Variables<br/>🎯 Theme System<br/>Color Management]
        JS --> FEATURES[🔥 Features:<br/>• Smooth Scrolling<br/>• Animations<br/>• Copy Functionality<br/>• Progress Indicator]
    end
    
    subgraph "Development Toolchain"
        PKG[package.json<br/>📦 Dependencies & Scripts<br/>Project Configuration] --> ESLINT[ESLint<br/>📝 JavaScript Linting]
        PKG --> STYLELINT[Stylelint<br/>🎨 CSS Linting]
        PKG --> HTMLHINT[HTMLHint<br/>🌐 HTML Validation]
        PKG --> PRETTIER[Prettier<br/>✨ Code Formatting]
        HTMLHINTRC[.htmlhintrc<br/>⚙️ HTML Validation Rules] --> HTMLHINT
        PACKAGELOCK[package-lock.json<br/>🔒 Dependency Lock] --> PKG
    end
    
    subgraph "GitHub Integration"
        MCP_EXAMPLE[.vscode/mcp.json.example<br/>📋 MCP Server Template<br/>Safe Configuration] --> GITHUB_API[GitHub MCP Server<br/>🔗 Remote HTTP Endpoint<br/>api.githubcopilot.com]
        ENV_EXAMPLE[.env.example<br/>🔐 Environment Template<br/>Token Placeholder] --> LOCAL_SETUP[Local Development<br/>🛠️ Configuration Setup]
        CLAUDE_CONFIG[.claude/settings.local.json<br/>🤖 Claude MCP Settings<br/>Permissions & Servers]
    end
    
    subgraph "Documentation & Content"
        README[README.md<br/>📚 Project Overview<br/>Architecture Guide] --> DOCS[.docs/prompts.md<br/>📖 Usage Examples<br/>314+ Lines of Workflows]
        DOCS --> WORKFLOW_EXAMPLES[🎯 Workflow Categories:<br/>• Repository Management<br/>• Issue Automation<br/>• PR Workflows<br/>• CI/CD Integration<br/>• Security & Compliance<br/>• Team Collaboration]
    end
    
    subgraph "CI/CD Pipeline"
        DEPLOY_WF[.github/workflows/deploy.yml<br/>🚀 GitHub Pages Deploy<br/>Automated Deployment] --> PAGES[GitHub Pages<br/>🌍 Static Hosting<br/>Live Website]
        LINT_WF[.github/workflows/linter.yaml<br/>✅ PR Validation<br/>Code Quality Checks] --> QUALITY[Code Quality<br/>🔍 Automated Checks<br/>ESLint + Stylelint + HTMLHint]
        PKG --> DEPLOY_WF
        PKG --> LINT_WF
    end
    
    subgraph "Configuration & Security"
        GITIGNORE[.gitignore<br/>🛡️ Git Exclusions<br/>Security Protection] --> NODE_MODULES[node_modules/<br/>📚 Dev Dependencies<br/>Excluded from Git]
        GITIGNORE --> ENV_SECURITY[🔒 Protected Files:<br/>• .env<br/>• .vscode/mcp.json<br/>• *.local files]
    end
    
    subgraph "Runtime Interactions"
        BROWSER[🌐 Web Browser] --> HTML
        VSCODE[💻 VS Code] --> MCP_EXAMPLE
        GITHUB_API --> API_ENDPOINTS[GitHub REST API<br/>🔧 Toolsets:<br/>• repos • issues • pull_requests<br/>• actions • code_security<br/>• notifications • users<br/>• secret_protection • context]
        CLAUDE_CONFIG --> GITHUB_API
    end
    
    subgraph "Content Architecture"
        HTML --> HERO[🎯 Hero Section<br/>Project Introduction<br/>Call-to-Action Buttons]
        HTML --> TOOLSETS[🧰 Toolsets Grid<br/>8 MCP Toolsets<br/>Interactive Cards]
        HTML --> QUICKSTART[⚡ Quick Start<br/>Installation Options<br/>Remote & Local Setup]
        HTML --> EXAMPLES[📋 Examples Grid<br/>6 Workflow Categories<br/>Feature Showcase]
        DOCS --> ADVANCED_EXAMPLES[🚀 Advanced Features:<br/>• Cross-Repository Operations<br/>• Intelligent Automation<br/>• Security Workflows<br/>• Team Analytics]
    end
    
    %% File Flow Dependencies
    HTML -.->|references| CSS
    HTML -.->|references| JS
    CSS -.->|cache busting| VERSIONING[?v=2025-06-20]
    JS -.->|cache busting| VERSIONING
    
    %% Styling with enhanced colors
    classDef frontend fill:#9D7BFF,stroke:#C792EA,stroke-width:3px,color:#fff
    classDef toolchain fill:#4ADE80,stroke:#22C55E,stroke-width:3px,color:#000
    classDef github fill:#60A5FA,stroke:#3B82F6,stroke-width:3px,color:#fff
    classDef docs fill:#C792EA,stroke:#9D7BFF,stroke-width:3px,color:#fff
    classDef cicd fill:#F59E0B,stroke:#D97706,stroke-width:3px,color:#000
    classDef config fill:#6B7280,stroke:#4B5563,stroke-width:3px,color:#fff
    classDef runtime fill:#EF4444,stroke:#DC2626,stroke-width:3px,color:#fff
    classDef content fill:#10B981,stroke:#059669,stroke-width:3px,color:#fff
    
    class HTML,CSS,JS,VARS,FEATURES,VERSIONING frontend
    class PKG,ESLINT,STYLELINT,HTMLHINT,PRETTIER,HTMLHINTRC,PACKAGELOCK toolchain
    class MCP_EXAMPLE,GITHUB_API,ENV_EXAMPLE,LOCAL_SETUP,CLAUDE_CONFIG,API_ENDPOINTS github
    class README,DOCS,WORKFLOW_EXAMPLES,ADVANCED_EXAMPLES docs
    class DEPLOY_WF,LINT_WF,PAGES,QUALITY cicd
    class GITIGNORE,NODE_MODULES,ENV_SECURITY config
    class BROWSER,VSCODE runtime
    class HERO,TOOLSETS,QUICKSTART,EXAMPLES content

里面是什么

  • .docs/prompts.md -示例提示和工作流的全面集合,展示了GitHub MCP Server的全部功能
  • 实验操场 -用于测试各种GitHub MCP Server功能和工具集的空间
  • 工作流示例 -现实世界的自动化场景和用例

GitHub MCP服务器概述

GitHub MCP服务器提供了几个强大的工具集:

工具集 说明
回购协议 存储库操作(文件、分支、提交)
问题 问题管理和跟踪
pull_requests 公关创建、审查和管理
行动 GitHub操作工作流和CI/CD
代码安全 代码扫描和安全警报
通知 GitHub通知管理
用户 用户和帐户操作
秘密保护 秘密扫描和保护
上下文 当前用户和GitHub上下文
实验 实验特征

快速开始

远程服务器(最简单)

远程GitHub MCP服务器由GitHub托管,提供最简单的设置方法:

  1. VS代码:使用单击安装按钮 官方回购
  2. 手动配置:添加到MCP设置中:
    {
      "servers": {
        "github": {
          "type": "http",
          "url": "https://api.githubcopilot.com/mcp/"
        }
      }
    }
    

本地服务器(Docker)

对于本地开发或自定义配置:

docker run -i --rm \
  -e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
  ghcr.io/github/github-mcp-server

示例工作流

结账 .docs/prompts.md 详细示例包括:

  • 库管理 -文件操作、分支管理、批量操作
  • 问题自动化 -智能分流、分析、批量操作
  • 公关工作流程 -自动审核、合并管理、分析
  • CI/CD集成 -工作流监控、故障分析、部署自动化
  • 安全与合规 -代码扫描、秘密检测、安全报告
  • 团队协作 -通知管理、用户分析、跨仓库操作

入门指南

  1. 设置GitHub MCP服务器 跟随 官方文件
  2. 探索示例 在……里面 .docs/prompts.md
  3. 开始实验 使用自己的工作流程和自动化
  4. 分享你的发现 -欢迎投稿!

配置提示

  • 使用特定的工具集:仅启用您需要的功能 --toolsets 为了获得更好的性能
  • 从只读开始:使用 --read-only 安全勘探标志
  • 启用上下文工具集:始终包括 context 更好地理解AI
  • 尝试实验:启用 experiments 尖端功能工具集

资源

许可证

此项目根据MIT许可证获得许可-请参阅 GitHub MCP服务器许可证 了解详情。


🚀 准备好探索了吗? 从以下示例开始 .docs/prompts.md 释放GitHub自动化的力量!