GitHub MCP Server

GitHub MCP Server

site icon
2025.03.31 0
GoGitHub集成API接口自动化工具开发效率交流协作
GitHub MCP Server 是一个基于Model Context Protocol (MCP)的GitHub集成服务器,为LLM(大语言模型)应用程序提供与GitHub API通信的标准化接口。它支持多种GitHub操作,包括仓库搜索、创建、文件操作、Pull Request管理等。
View on GitHub

Overview

基本能力

产品定位

GitHub MCP Server 是一个为LLM应用程序设计的GitHub API集成工具,旨在简化与GitHub的交互过程。

核心功能

  • 仓库搜索
  • 仓库创建
  • 文件内容获取
  • 文件创建与更新
  • 多文件批量推送
  • 仓库分叉
  • Pull Request创建与管理
  • Pull Request详情获取
  • Pull Request评论添加

适用场景

  • 自动化GitHub仓库管理
  • 批量文件操作
  • Pull Request自动化流程
  • LLM应用程序与GitHub的集成

工具列表

工具名 说明
search_repositories GitHub仓库搜索
create_repository 创建新GitHub仓库
get_file_contents 获取仓库文件内容
create_or_update_file 创建或更新仓库文件
push_files 批量推送文件到仓库
fork_repository 分叉GitHub仓库
create_pull_request 创建Pull Request
get_pull_request 获取Pull Request详情
create_pull_request_review 为Pull Request添加评论

使用教程

使用依赖

需要安装Go语言环境。

安装教程

go get github.com/yamagai/github-mcp-server-sse

调试方式

标准输入输出模式

export GITHUB_TOKEN=your_github_token
github-mcp

SSE模式

export GITHUB_TOKEN=your_github_token
github-mcp -t sse

Docker容器

docker build -t github-mcp-server-sse .
docker run -p 8080:8080 -e GITHUB_TOKEN=your_github_token github-mcp-server-sse

许可证

该项目遵循 MIT 开源许可条款。