Back to MCP directory
publicPublicdnsLocal runtime

gitcode

GitCode MCP Go服务器是一个基于Go语言实现的GitCode API标准MCP接口封装,提供完整的GitCode API功能支持,采用标准MCP协议实现,支持多种传输方式,具有轻量级、高并发和模块化特点。

article

README

🚀 GitCode MCP Go 服务器

这是GitCode MCP服务器的Go语言实现版本,它对GitCode API的标准MCP接口进行了封装,能让开发者更便捷地使用GitCode API的各项功能。

🚀 快速开始

运行MCP服务器

gitcode-mcp

配置AI平台

项目docs目录下提供了各平台的配置文件参考:

  • Claude平台: claire.json
  • 天气预报平台: weather_forecast.json
  • 货车轨迹平台: truck_tracking.json

✨ 主要特性

  • 完整支持GitCode API的主要功能。
  • 基于标准MCP协议实现,使用mark3labs/mcp-go SDK。
  • 支持STDIO和SSE两种传输方式。
  • 轻量级,响应速度快。
  • 并发处理能力强,适合高负载场景。
  • 模块化的代码结构,便于扩展和维护。

📦 安装指南

安装要求

  • Go 1.16+
  • 网络连接以访问GitCode API

环境变量配置

项目使用.env文件来管理环境变量。您可以复制.env.example文件并重命名为.env,然后设置以下环境变量:

# GitCode API配置
GITCODE_TOKEN=<您的GitCode访问令牌>
GITCODE_API_URL=https://api.gitcode.com/api/v5

安装说明

方法一:使用安装脚本(推荐)

# 克隆仓库
git clone https://github.com/gitcode-org-com/gitcode-mcp.git
cd gitcode-mcp

# 运行安装脚本
./install.sh

安装脚本会:

  1. 编译项目生成可执行文件。
  2. 创建配置目录 ~/.gitcode_mcp
  3. 复制配置文件到配置目录。
  4. 提示输入您的GitCode访问令牌。
  5. 将可执行文件安装到系统路径(需要管理员权限)或用户目录。

安装完成后,您可以在任何位置运行 gitcode-mcp 命令。

方法二:使用 Go Install

# 安装最新版本
go install github.com/gitcode-org-com/gitcode-mcp@latest

使用 Go Install 安装后,程序会被安装到 $GOPATH/bin 目录下。请确保该目录已添加到您的 PATH 环境变量中。

📚 详细文档

MCP工具清单

| 属性 | 详情 | |------|------| | 工具名称 | GitCode的MCP接口服务器 | | 描述 | 无 |

📄 许可证

项目采用MIT协议。更多详细信息请查看LICENSE文件。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client