GitHub MCP Bridge

MIT License
  • Linux
  • Apple

Integrations

  • Recommended for production deployments to securely store GitHub tokens and other sensitive credentials.

  • Provides containerized deployment options with pre-built Docker images, supporting various configuration options for running the GitHub MCP Bridge alongside other services.

  • Enables access to GitHub Enterprise data, including user management, organization access, email retrieval, and license management features. Allows listing enterprise users, getting user details, viewing organizations, accessing user emails, and managing enterprise licenses.

MCP GITHUB 企业版🌉



模型上下文协议 (MCP) 服务器,允许 AI 代理(Claude、ChatGPT 等)查询您的 GitHub Enterprise 许可证数据。通过/consumed-licenses端点安全地获取许可证摘要、每个用户的详细信息、组织成员资格和企业角色。


📊 功能和示例提示

  • 许可证摘要
    "Show me our GitHub Enterprise license summary"
    "How many licenses are we currently using?"
  • 许可证使用详情
    "List all consumed GitHub licenses"
    "Do we have any unused GitHub licenses?"
  • 用户查找
    "What GitHub orgs does johndoe belong to?"
    "What enterprise roles does johndoe have?"
    "Is johndoe an owner in our enterprise?"
    "Get detailed info about johndoe"
    "Does johndoe have 2FA enabled?"

🌟 功能

  • 许可证分析:总席位与已消耗席位
  • 用户查找:组织成员资格、角色、2FA、SAML ID
  • 分页:自动处理大型企业
  • 双传输:stdio 用于直接 MCP,SSE 用于 HTTP
  • Kubernetes-Ready :在 EKS/GKE 或任何 K8s 集群上部署

📋 先决条件

  • Python 3.9+
  • 带有read:enterprise / 许可证范围的 GitHub PAT
  • GitHub Enterprise Cloud 租户

🚀 快速入门

1. 克隆并安装

git clone https://github.com/vipink1203/mcp-github-enterprise.git cd mcp-github-enterprise python -m venv .venv source .venv/bin/activate pip install -r requirements.txt

2.配置

cp .env.example .env # Edit .env: set GITHUB_TOKEN and GITHUB_ENTERPRISE_URL

3. 运行

标准输入输出传输
export TRANSPORT=stdio python main.py
SSE 运输
export TRANSPORT=sse PORT=8050 python main.py

🐳 Docker 和 n8n

将此服务与 n8n 一起添加到您的 docker-compose.yml 中:

services: github-mcp: image: ghcr.io/vipink1203/mcp-github-enterprise:latest environment: - GITHUB_TOKEN=${GITHUB_TOKEN} - GITHUB_ENTERPRISE_URL=${GITHUB_ENTERPRISE_URL} - TRANSPORT=sse - PORT=8050 ports: - "8050:8050" restart: unless-stopped networks: - n8n-network

在 n8n 的 UI 中,启用 MCP 客户端:

🔌 客户端配置

Claude Desktop / 风帆冲浪 / 光标

将此配置添加到您的 Claude Desktop 设置中:

{ "mcpServers": { "github-ent": { "command": "/path/to/your/venv/python", "args": ["/path/to/main.py"], "env": { "GITHUB_TOKEN": "", "GITHUB_ENTERPRISE_URL": "https://api.github.com/enterprises/{enterprise_name}", "TRANSPORT": "stdio" } } }

SSE配置

{ "mcpServers": { "github": { "transport": "sse", "url": "http://localhost:8050/sse" } } }

📊 示例用例

  • 企业用户管理:自动化用户入职和离职
  • 许可证监控:许可证即将到期时收到警报
  • 组织分析:分析组织结构和关系
  • 用户访问审计:跟踪用户权限和访问级别
  • 人工智能驱动的 GitHub Insights :让人工智能分析你的企业 GitHub 数据

🔌 MCP 工具和资源

工具

姓名描述
list_consumed_licenses总结许可证,可选择包括用户
get_user_organizations列出用户的 GitHub 组织会员资格
get_user_enterprise_roles列出用户的企业角色
get_user_detail用户的完整许可证详细信息

资源

URI描述
github://consumed-licenses/{dummy}完整许可证使用情况 + 用户详细信息
github://user/{username}/roles用户的组织和企业角色

🔒 安全注意事项

  • 安全存储你的 GitHub 令牌
  • 为你的 GitHub 令牌使用适当的范围
  • 对于生产环境,请考虑使用 AWS Secrets Manager 或类似产品
  • 在 Kubernetes 部署中实施网络策略

🤝 贡献

欢迎贡献代码!欢迎提交 Pull 请求。

  1. 分叉存储库
  2. 创建你的功能分支( git checkout -b feature/amazing-feature
  3. 提交您的更改( git commit -m 'Add some amazing feature'
  4. 推送到分支( git push origin feature/amazing-feature
  5. 打开拉取请求

📜 许可证

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

🙏 致谢


采用❤️构建,实现无缝 AI ↔️ GitHub Enterprise 集成。

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议服务器,使 AI 代理能够安全地访问和与 GitHub Enterprise 数据交互,提供对企业用户、组织、电子邮件和许可证信息的访问。

  1. 📊 Capabilities & Example Prompts
    1. 🌟 Features
      1. 📋 Prerequisites
        1. 🚀 Quick Start
          1. 1. Clone & Install
          2. 2. Configure
          3. 3. Run
        2. 🐳 Docker & n8n
          1. 🔌 Client Configuration
            1. Claude Desktop / Windsurf / Cursor
            2. SSE Configuration
          2. 📊 Example Use Cases
            1. 🔌 MCP Tools & Resources
              1. Tools
              2. Resources
            2. 🔒 Security Considerations
              1. 🤝 Contributing
                1. 📜 License
                  1. 🙏 Acknowledgements

                    Related MCP Servers

                    • -
                      security
                      A
                      license
                      -
                      quality
                      A server that allows AI assistants to browse and read files from specified GitHub repositories, providing access to repository contents via the Model Context Protocol.
                      Last updated -
                      3
                      JavaScript
                      MIT License
                      • Apple
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Model Context Protocol server that enables AI agents to retrieve and understand entire codebases at once, providing tools to analyze local workspaces or remote GitHub repositories.
                      Last updated -
                      9
                      TypeScript
                      MIT License
                      • Linux
                      • Apple
                    • A
                      security
                      F
                      license
                      A
                      quality
                      A Model Context Protocol server that enables AI models to interact with GitHub's API, allowing for repository creation and management with descriptions, topics, and website URLs through natural language commands.
                      Last updated -
                      1
                      JavaScript
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.
                      Last updated -
                      129
                      Python

                    View all related MCP servers

                    ID: x1b6elkh5o