Content
# GitCode MCP Go Server
This is the Go language implementation of the GitCode MCP server, providing a standard MCP interface encapsulation for the GitCode API.
## Features
- Fully supports the main functions of the GitCode API
- Implemented based on the standard MCP protocol, using mark3labs/mcp-go SDK
- Supports both STDIO and SSE transmission methods
- Lightweight and fast response
- Strong concurrent processing capability, suitable for high load scenarios
- Modular code structure, easy to extend and maintain
## Installation Requirements
- Go 1.16+
- Network connection to access the GitCode API
## Environment Variable Configuration
The project uses the `.env` file to manage environment variables. You can copy the `.env.example` file and rename it to `.env`, and then set the following environment variables:
```
# GitCode API configuration
GITCODE_TOKEN=<Your GitCode access token>
GITCODE_API_URL=https://api.gitcode.com/api/v5
```
## Installation Instructions
### Method 1: Using the Installation Script (Recommended)
```bash
# Clone the repository
git clone https://github.com/gitcode-org-com/gitcode-mcp.git
cd gitcode-mcp
# Run the installation script
./install.sh
```
The installation script will:
1. Compile the project to generate an executable file
2. Create a configuration directory `~/.gitcode_mcp`
3. Copy the configuration file to the configuration directory
4. Prompt you to enter your GitCode access token
5. Install the executable file to the system path (requires administrator privileges) or user directory
After installation, you can run the `gitcode-mcp` command from any location.
### Method 2: Using Go Install
```bash
# Install the latest version
go install github.com/gitcode-org-com/gitcode-mcp@latest
```
After installing with Go Install, the program will be installed in the `$GOPATH/bin` directory. Make sure this directory has been added to your PATH environment variable.
## Quick Start
1. Run the MCP server
```bash
gitcode-mcp
```
2. Configure the AI platform
The project docs directory provides configuration file references for each platform:
- Claude platform: `claude_config.json`
- Cline platform: `cline_config.json`
- Cursor platform: `cursor_config.json`
- Windsurf platform: `windsurf_config.json`
## MCP Tool List
GitCode MCP provides the following tools:
| Tool Name | Description | Parameters |
|---------|------|-----|
| list_repositories | List the current user's repositories | None |
| get_repository | Get detailed information about a specific repository | owner, repo |
| create_repository | Create a new repository | name, description?, private? |
| list_branches | List the branches of a repository | owner, repo |
| get_branch | Get detailed information about a specific branch | owner, repo, branch |
| create_branch | Create a new branch | owner, repo, branch, ref |
| list_issues | List the Issues of a repository | owner, repo |
| get_issue | Get detailed information about a specific Issue | owner, repo, issue_number |
| create_issue | Create a new Issue | owner, repo, title, body? |
| list_pull_requests | List the Pull Requests of a repository | owner, repo |
| get_pull_request | Get detailed information about a specific Pull Request | owner, repo, pull_number |
| create_pull_request | Create a new Pull Request | owner, repo, title, head, base, body? |
| search_code | Search code | query |
| search_repositories | Search repositories | query |
| search_issues | Search Issues | query |
| search_users | Search users | query |
## License
This project is licensed under the MIT License. See the LICENSE file for details.
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.