MCP GITHUB 企业版是一个模型上下文协议(MCP)服务器,它允许 AI 代理(如 Claude、ChatGPT 等)查询你的 GitHub 企业版许可数据。通过 /consumed-licenses 端点,用户可以安全地获取许可摘要、用户详细信息、组织成员资格和企业角色等内容。
git clone https://github.com/yourusername/mcp-github.git
cd mcp-github
pip install -r requirements.txt
export GITHUB_TOKEN="你的GitHub令牌"
python server.py
curl http://localhost:8000/consumed-licenses
许可摘要
• "显示我们 GitHub 企业的许可摘要"
• "我们现在有多少个许可证在使用?"
详细许可使用情况
• "列出所有使用的 GitHub 许可证"
• "是否有未使用的 GitHub 许可证?"
用户查找
• "johndoe 属于哪些 GitHub 组织?"
• "johndoe 在企业中有哪些角色?"
• "获取 johndoe 的详细信息"
| 工具 | 描述 |
|---|---|
list_consumed_licenses |
汇总许可,可选包含用户信息 |
get_user_organizations |
列出用户的 GitHub 组织成员资格 |
get_user_enterprise_roles |
列出用户的企业角色 |
get_user_detail |
用户的完整许可详细信息 |
git clone https://github.com/yourusername/mcp-github.git
cd mcp-github
pip install -r requirements.txt
export GITHUB_TOKEN="你的GitHub令牌"
python server.py
curl http://localhost:8000/consumed-licenses
欢迎贡献!请随意提交拉取请求。
git clone https://github.com/yourusername/mcp-github.git
cd mcp-github
git checkout -b feature/amazing-feature
git commit -m '添加一些很棒的功能'
git push origin feature/amazing-feature
此项目根据 MIT 许可证发布,具体内容请参阅 LICENSE 文件。
感谢以下项目的贡献:
为 AI ↔️ GitHub 企业版集成打造的匠心之作。