mcp-gitee-gateway
A comprehensive Model Context Protocol (MCP) integration layer enabling programmatic orchestration of Gitee platform resources, including code repositories, issue tracking, pull requests, and user notifications. Facilitates automated workflow execution leveraging AI agents for efficient task generation and lifecycle management within Gitee environments.
Author

ropon
Quick Info
Actions
Tags
Gitee MCP Orchestration Service
This document details the Gitee MCP Orchestration Service, an implementation of the Model Context Protocol (MCP) designed specifically to interface with the Gitee code hosting platform's Application Programming Interface (API). It furnishes a robust suite of utilities empowering intelligent agents to govern crucial DevOps lifecycle elements such as repository administration, issue resolution tracking, source code merge requests, and activity alerts.
Core Capabilities
- Seamless interaction with Gitee assets: repositories, reported issues, proposed pull requests, and system alerts.
- Adaptable API endpoint configuration to accommodate self-hosted or private Gitee instances.
- Leverages standard command-line interface parameters for streamlined setup.
- Full compatibility across individual user accounts, organizational structures, and enterprise deployments.
Exemplary Operational Sequence: Issue Resolution via Automated PR Submission
1. Acquire the complete manifest of outstanding Issues associated with a target repository. 2. Execute the required development effort and programmatically generate a Pull Request referencing the initial Issue details. 3. Finalize the work by appending resolution notes and transitioning the originating Issue to a closed state.Deployment Instructions
Prerequisites
- Requires a runtime environment featuring Go version 1.23.0 or later.
- A valid Gitee credential set, specifically a Personal Access Token (PAT) obtained from this authorization portal.
Compilation from Source Distribution
-
Clone the source repository: bash git clone https://gitee.com/oschina/mcp-gitee.git cd mcp-gitee
-
Compile the binary asset: bash make build
The resulting executable,
./bin/mcp-gitee, must be placed within the system's execution PATH environment variable.
Simplified Installation via go install
bash go install gitee.com/oschina/mcp-gitee@latest
Operational Invocation
Verify the installed component version:
bash mcp-gitee --version
MCP Host Configuration Schema
Configuration snippet for Cursor or Windsurf agents:
{
"mcpServers": {
"gitee": {
"command": "mcp-gitee",
"env": {
"GITEE_API_BASE": "https://gitee.com/api/v5",
"GITEE_ACCESS_TOKEN": "
Command-Line Argument Reference
-token: Supply the requisite Gitee authentication token.-api-base: Specify the root URL for the Gitee API interaction (Default:https://gitee.com/api/v5).-version: Output version details and terminate.-transport: Communication methodology; options includestdioorsse(Default:stdio).-sse-address: Network interface and port for the Server-Sent Events listener (Default:localhost:8000).
Environment Variable Overrides
The service behavior can also be governed by setting system environment variables:
GITEE_ACCESS_TOKEN: Primary authentication credential for API calls.GITEE_API_BASE: Alternative specification for the API endpoint base path.
Licensing Stipulations
This software is distributed under the terms of the MIT License. Refer to the designated LICENSE file for comprehensive legal disclosures.
Available Service Functions
The server exposes the following capabilities for agent invocation:
| Tool | Domain Context | Functional Summary |
|---|---|---|
| list_user_repos | Repository | Retrieve a catalog of repositories accessible by the user. |
| get_file_content | Repository | Fetch the textual contents of a specified file within a repository. |
| create_user_repo | Repository | Provision a new repository under the authenticated user's namespace. |
| create_org_repo | Repository | Provision a new repository under an associated organization. |
| create_enter_repo | Repository | Provision a new repository within an enterprise scope. |
| create_release | Repository | Publish a new version release artifact for a repository. |
| list_releases | Repository | Enumerate all existing releases for a repository. |
| list_repo_pulls | Pull Request | Obtain a manifest of all pull requests impacting a repository. |
| merge_pull | Pull Request | Integrate the changes from an active pull request. |
| create_pull | Pull Request | Initiate a new pull request between branches. |
| update_pull | Pull Request | Modify the attributes of an existing pull request. |
| get_pull_detail | Pull Request | Retrieve granular metadata for a specific pull request. |
| comment_pull | Pull Request | Append a textual annotation or feedback to a pull request. |
| list_pull_comments | Pull Request | List all recorded comments associated with a pull request. |
| create_issue | Issue | Log a new problem report or task item. |
| update_issue | Issue | Modify the metadata or status of an existing issue. |
| get_repo_issue_detail | Issue | Fetch the complete details for a repository-bound issue. |
| list_repo_issues | Issue | Generate a listing of issues active within a repository. |
| comment_issue | Issue | Add commentary directly to an issue thread. |
| list_issue_comments | Issue | Display all discussion threads tied to a specific issue. |
| get_user_info | User | Retrieve identity information for the currently authenticated principal. |
| list_user_notifications | Notification | Check the feed of recent system alerts directed at the user. |
Community Engagement
We enthusiastically welcome external contributions to this open-source initiative! To participate in the development process, please adhere to the following contribution protocol:
- Fork the main repository to your personal namespace.
- Establish a dedicated feature or correction branch.
- Implement your modifications, ensuring comprehensive code documentation accompanies all changes.
- Submit a formal Pull Request detailing the scope and purpose of your proposed alterations.
Please consult the CONTRIBUTING documentation for exhaustive guidance.
