Gitee MCP server

Integrates with Gitee repositories to enable repository creation, code management, issue tracking, and pull request workflows using a simple token-based authentication system.
Back to servers
Provider
normal-coder
Release date
Mar 07, 2025
Language
TypeScript
Package
Stats
341 downloads
5 stars

The Gitee MCP Server allows AI assistants to perform operations on Gitee repositories, issues, and pull requests through the Model Context Protocol (MCP). It acts as a bridge between AI systems and Gitee's API, enabling automated interactions with your Gitee projects.

Installation Options

Using NPX

The easiest way to run the Gitee MCP Server is using NPX:

{
  "mcpServers": {
    "Gitee": {
      "command": "npx",
      "args": [
        "-y",
        "gitee-mcp-server"
      ],
      "env": {
        "GITEE_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}

Using Smithery

For Claude Desktop users, you can install the server automatically via Smithery:

npx -y @smithery/cli install @normal-coder/gitee-mcp-server --client claude

Using Docker

You can also run the server as a Docker container:

  1. Pull the Docker image:
docker pull normalcoder/gitee-mcp-server
  1. Configure the MCP server:
{
  "mcpServers": {
    "Gitee": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITEE_PERSONAL_ACCESS_TOKEN",
        "normalcoder/gitee-mcp-server"
      ],
      "env": {
        "GITEE_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
      }
    }
  }
}

Configuration

The server requires the following configuration:

  • GITEE_PERSONAL_ACCESS_TOKEN (Required): Your Gitee personal access token, obtained from Gitee Personal Access Tokens
  • GITEE_API_BASE_URL (Optional): Gitee OpenAPI endpoint, defaults to https://gitee.com/api/v5
  • DEBUG (Optional): Set to true to enable debug logging

Supported Operations

Repository Operations

  • create_repository: Create a new Gitee repository
  • fork_repository: Fork an existing Gitee repository

Branch Operations

  • create_branch: Create a new branch
  • list_branches: List all branches
  • get_branch: Get details of a specific branch

File Operations

  • get_file_contents: Get contents of a file or directory
  • create_or_update_file: Create or update a file
  • push_files: Push multiple files at once

Issue Operations

  • create_issue: Create a new issue
  • list_issues: List issues in a repository
  • get_issue: Get details of a specific issue
  • update_issue: Update an existing issue
  • add_issue_comment: Add a comment to an issue

Pull Request Operations

  • create_pull_request: Create a new pull request
  • list_pull_requests: List pull requests in a repository
  • get_pull_request: Get details of a specific pull request
  • update_pull_request: Update an existing pull request
  • merge_pull_request: Merge a pull request

User Operations

  • get_user: Get information about a Gitee user
  • get_current_user: Get information about the authenticated user

Debugging

If you encounter issues with the server, you can enable debug logging by setting the DEBUG environment variable to true. This will provide more detailed logs about the server's operations.

For a more interactive debugging experience, you can use the MCP inspector:

npx @modelcontextprotocol/inspector npm run start --env-file=.env

Create a .env file with your configuration:

GITEE_API_BASE_URL=https://gitee.com/api/v5
GITEE_PERSONAL_ACCESS_TOKEN=<YOUR_TOKEN>

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later