MCP cover image
See in Github
2025-03-31

GitCode MCP服务器是gitCode 推出的模型上下文协议(模型上下文协议)服务实现

1

Github Watches

0

Github Forks

1

Github Stars

GitCode MCP Go Server

这是GitCode MCP服务器的Go语言实现版本,提供了GitCode API的标准MCP接口封装。

功能特点

  • 完整支持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 环境变量中。

快速开始

  1. 运行MCP服务器
gitcode-mcp
  1. 配置AI平台

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

    • Claude平台: claude_config.json
    • Cline平台: cline_config.json
    • Cursor平台: cursor_config.json
    • Windsurf平台: windsurf_config.json

MCP工具清单

GitCode MCP提供以下工具:

工具名称 描述 参数
list_repositories 列出当前用户的仓库
get_repository 获取特定仓库的详细信息 owner, repo
create_repository 创建新仓库 name, description?, private?
list_branches 列出仓库的分支 owner, repo
get_branch 获取特定分支的详细信息 owner, repo, branch
create_branch 创建新分支 owner, repo, branch, ref
list_issues 列出仓库的Issues owner, repo
get_issue 获取特定Issue的详细信息 owner, repo, issue_number
create_issue 创建新Issue owner, repo, title, body?
list_pull_requests 列出仓库的Pull Requests owner, repo
get_pull_request 获取特定Pull Request的详细信息 owner, repo, pull_number
create_pull_request 创建新Pull Request owner, repo, title, head, base, body?
search_code 搜索代码 query
search_repositories 搜索仓库 query
search_issues 搜索Issues query
search_users 搜索用户 query

许可证

该项目采用MIT许可证。详情请参阅LICENSE文件。

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • modelcontextprotocol
  • 模型上下文协议服务器

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • open-webui
  • 用户友好的AI接口(支持Ollama,OpenAi API,...)

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

    Reviews

    5 (1)
    Avatar
    user_g8yRr5X8
    2025-04-16

    I've been using the OKX MCP Server by badger3000, and I couldn't be more satisfied. Its seamless integration and robust performance have significantly streamlined my daily operations. The user interface is intuitive, making navigation a breeze. Highly recommend for anyone looking to enhance their server capabilities! Check it out here: https://mcp.so/server/okx-mcp-server/badger3000.