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 functionalities of the GitCode API
- Implemented based on the standard MCP protocol, using the mark3labs/mcp-go SDK
- Supports two transmission methods: STDIO and SSE
- Lightweight with fast response times
- Strong concurrency handling capabilities, suitable for high-load scenarios
- Modular code structure for easy expansion and maintenance
## Installation Requirements
- Go 1.16+
- Network connection to access the GitCode API
## Environment Variable Configuration
The project uses a `.env` file to manage environment variables. You can copy the `.env.example` file and rename it to `.env`, 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 the configuration directory `~/.gitcode_mcp`
3. Copy the configuration files 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 anywhere.
### 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. Please ensure that this directory is added to your PATH environment variable.
## Quick Start
1. Run the MCP server
```bash
gitcode-mcp
```
2. Configure the AI platforms
Configuration file references for various platforms are provided in the project's docs directory:
- 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 repositories of the current user | 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 for code | query |
| search_repositories | Search for repositories | query |
| search_issues | Search for issues | query |
| search_users | Search for users | query |
## License
This project is licensed under the MIT License. Please refer to the LICENSE file for details.
Connection Info
You Might Also Like
MarkItDown MCP
Converting files and office documents to Markdown.
Time
Obtaining current time information and converting time between different...
Filesystem
Model Context Protocol Servers
Sequential Thinking
Offers a structured approach to dynamic and reflective problem-solving,...
Git
Model Context Protocol Servers
Context 7
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors