关于 Mcp Server Github
Mcp Server Github 为团队和开发者提供 GitHub API 操作,涵盖代码库数据、问题、拉取请求、代码搜索、分支和 Actions 工作流。
主要功能
- 01列出代码库
- 02创建问题
- 03列出拉取请求
- 04读取文件内容
- 05搜索代码
- 06管理分支和 Actions 工作流
适用场景
- 01查看代码库和拉取请求信息
- 02创建带标签或受理人的问题
- 03搜索 GitHub 代码库中的代码
- 04检查工作流运行记录
MCP 相关
这是一个向 MCP 客户端提供 GitHub API 工具的 MCP 服务。运行时需在 GITHUB_TOKEN 中配置 GitHub 个人访问令牌。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
服务地址
https://github.com/kogunlowo123/mcp-server-aws一键复制安装命令
Claude CodeTerminal
claude mcp add --transport http github-kogunlowo123 https://github.com/kogunlowo123/mcp-server-awsCursor.cursor/mcp.json
{"mcpServers":{"github-kogunlowo123":{"type":"http","url":"https://github.com/kogunlowo123/mcp-server-aws"}}}在 Cursor 中打开VS Code.vscode/mcp.json
{"servers":{"github-kogunlowo123":{"type":"http","url":"https://github.com/kogunlowo123/mcp-server-aws"}}}在 VS Code 中打开Claude Desktopclaude_desktop_config.json
{"mcpServers":{"github-kogunlowo123":{"type":"http","url":"https://github.com/kogunlowo123/mcp-server-aws"}}}Windsurf~/.codeium/windsurf/mcp_config.json
{"mcpServers":{"github-kogunlowo123":{"serverUrl":"https://github.com/kogunlowo123/mcp-server-aws"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
全部服务地址
Streamable HTTP
https://github.com/kogunlowo123/mcp-server-awsStreamable HTTP
https://github.com/kogunlowo123/mcp-server-azureStreamable HTTP
https://github.com/kogunlowo123/mcp-server-terraformStreamable HTTP
https://github.com/kogunlowo123/mcp-server-kubernetesStreamable HTTP
https://github.com/kogunlowo123/mcp-server-devopsStreamable HTTP
https://github.com/kogunlowo123/mcp-server-githubStreamable HTTP
https://github.com/kogunlowo123/mcp-server-databaseStreamable HTTP
https://github.com/kogunlowo123/mcp-server-vector-db工具
详细介绍
mcp-server-github
一个 MCP(Model Context Protocol)服务,提供用于与 GitHub API 交互的工具,包括仓库、议题、拉取请求、代码搜索、分支和 GitHub Actions 工作流。
架构
graph TB
subgraph Client
style Client fill:#4A90D9,stroke:#2E6BA6,color:#FFFFFF
MCP_Client["MCP Client"]
end
subgraph Server["mcp-server-github"]
style Server fill:#2ECC71,stroke:#1A9B52,color:#FFFFFF
Index["index.ts<br/>MCP Server Entry"]
subgraph Tools
style Tools fill:#F39C12,stroke:#C67D0A,color:#FFFFFF
T1["list_repos"]
T2["create_issue"]
T3["list_pull_requests"]
T4["get_file_contents"]
T5["search_code"]
T6["create_branch"]
T7["list_workflows"]
T8["get_workflow_runs"]
end
end
subgraph External["GitHub API"]
style External fill:#24292E,stroke:#1B1F23,color:#FFFFFF
Repos["Repos API"]
Issues["Issues API"]
PRs["Pull Requests API"]
Contents["Contents API"]
Search["Search API"]
Git["Git Refs API"]
Actions["Actions API"]
end
MCP_Client -- "stdio transport" --> Index
Index --> T1 & T2 & T3 & T4 & T5 & T6 & T7 & T8
T1 --> Repos
T2 --> Issues
T3 --> PRs
T4 --> Contents
T5 --> Search
T6 --> Git
T7 --> Actions
T8 --> Actions
安装
npm install
npm run build
配置
| 变量 | 描述 | 必需 |
|---|---|---|
GITHUB_TOKEN | GitHub 个人访问令牌 | 是 |
用法
独立运行
GITHUB_TOKEN=ghp_xxxx npm start
开发
npm run dev
Docker
docker build -t mcp-server-github .
docker run -e GITHUB_TOKEN=ghp_xxxx mcp-server-github
MCP 客户端配置
{
"mcpServers": {
"github": {
"command": "node",
"args": ["dist/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_xxxx"
}
}
}
}
工具参考
| 工具 | 描述 | 参数 |
|---|---|---|
list_repos | 列出仓库 | owner?、type?、sort? |
create_issue | 创建议题 | owner、repo、title、body?、labels?、assignees? |
list_pull_requests | 列出拉取请求 | owner、repo、state?、sort? |
get_file_contents | 获取文件内容 | owner、repo、path、ref? |
search_code | 搜索代码 | query、per_page? |
create_branch | 创建分支 | owner、repo、branch、from_branch? |
list_workflows | 列出工作流 | owner、repo |
get_workflow_runs | 获取工作流运行记录 | owner、repo、workflow_id、status? |
许可证
MIT
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。