mcp-gitee-service
Facilitate comprehensive administration of Gitee code repositories, issue tracking, pull request lifecycles, and notification streams via robust API interfacing. This tool automates various repository actions and refines collaborative processes through configurable parameters.
Author

JJ-H
Quick Info
Actions
Tags
Gitee Model Context Protocol (MCP) Bridge
Gitee MCP Bridge functions as a dedicated Model Context Protocol (MCP) server integration layer targeting the Gitee platform. It exposes a collection of utilities enabling AI agents to programmatically govern repositories, manage tracked issues, handle merge requests, and interact with notifications.
Core Capabilities
- Interface with Gitee's resource structures: repositories, reported issues, merge proposals, and platform alerts.
- Adjustable base URI setting to accommodate diverse, self-hosted Gitee deployments.
- Configuration accessibility via command-line switches for straightforward setup.
- Native support spanning individual user accounts, organizational structures, and enterprise-level environments.
Operational Workflow Example: Fetching an Issue, Implementing Code, and Submitting a Merge Request
1. Retrieve a specific repository issue. 2. Execute necessary development work and subsequently propose a merge request aligned with the issue specifications. 3. Post relevant commentary and formally resolve the issue.Setup Instructions (Skippable when utilizing runtime execution environments like npx)
Prerequisites
- Requires Go version 1.23.0 or newer installed.
- A valid Gitee credential possessing an access token; obtain one here: Token Generation Link
Building From Source Code
-
Clone the official repository structure: bash git clone https://gitee.com/oschina/mcp-gitee.git cd mcp-gitee
-
Compile the executable: bash make build
Ensure the resulting binary ./bin/mcp-gitee is present in your system's PATH environment variable.
Installation via Go Toolchain
bash go install gitee.com/oschina/mcp-gitee@latest
Execution
Verify the installed version:
bash mcp-gitee --version
MCP Endpoint Configuration
Refer to Installation Documentation for detailed application configuration examples.
- Using npx (Node Package Executive):
{
"mcpServers": {
"gitee": {
"command": "npx",
"args": [
"-y",
"@gitee/mcp-gitee@latest"
],
"env": {
"GITEE_API_BASE": "https://gitee.com/api/v5",
"GITEE_ACCESS_TOKEN": "
- Using the compiled executable:
{
"mcpServers": {
"gitee": {
"command": "mcp-gitee",
"env": {
"GITEE_API_BASE": "https://gitee.com/api/v5",
"GITEE_ACCESS_TOKEN": "
Command-Line Parameters
-token: Authentication credential for Gitee.-api-base: The foundational URL for Gitee API endpoints (default: https://gitee.com/api/v5).-version: Outputs the current software version.-transport: Specifies the data transmission mechanism (stdioorsse; default:stdio).-sse-address: Defines the network address and port for the Server-Sent Events server to initiate (default: localhost:8000).
Configuration via Environment Variables
Server settings can alternatively be supplied through system environment variables:
GITEE_ACCESS_TOKEN: The requisite Gitee secret token.GITEE_API_BASE: The base endpoint URI for Gitee API calls.
Licensing
This codebase is distributed under the permissive MIT License. Detailed terms are available in the LICENSE file.
Available Service Operations
The server exposes a suite of functionalities for interacting with Gitee resources:
| Operation Name | Domain Category | Function Description |
|---|---|---|
| list_user_repos | Repository | Enumerate repositories accessible to the authenticated user. |
| get_file_content | Repository | Retrieve the contents of a specified file within a repository. |
| create_user_repo | Repository | Provision a new repository under the user's namespace. |
| create_org_repo | Repository | Establish a new repository within an organizational scope. |
| create_enter_repo | Repository | Provision a new repository within an enterprise scope. |
| fork_repository | Repository | Duplicate an existing repository. |
| create_release | Repository | Publish a new versioned release for a repository. |
| list_releases | Repository | Obtain a listing of existing repository releases. |
| search_open_source_repositories | Repository | Query the platform for publicly available repositories. |
| list_repo_pulls | Pull Request | Fetch the list of pending merge requests for a repository. |
| merge_pull | Pull Request | Finalize and integrate the changes from a pull request. |
| create_pull | Pull Request | Initiate a new pull request proposal. |
| update_pull | Pull Request | Modify the attributes of an existing pull request. |
| get_pull_detail | Pull Request | Retrieve comprehensive details about a specific pull request. |
| comment_pull | Pull Request | Add a note or annotation to a pull request discussion. |
| list_pull_comments | Pull Request | Fetch all recorded comments associated with a pull request. |
| create_issue | Issue | Log a new problem report or feature request. |
| update_issue | Issue | Modify the state or content of an existing issue. |
| get_repo_issue_detail | Issue | Fetch the specific details for a repository issue. |
| list_repo_issues | Issue | Generate a roster of issues tracked in a repository. |
| comment_issue | Issue | Attach feedback or status updates to an issue thread. |
| list_issue_comments | Issue | View all comments appended to a specific issue. |
| get_user_info | User | Obtain details pertaining to the currently authenticated user identity. |
| search_users | User | Execute a search for other registered platform users. |
| list_user_notifications | Notification | Retrieve the current stream of user alerts and notifications. |
Community Participation
Contributions from the broader open-source collective are highly valued! To participate in the advancement of this utility, kindly adhere to these preliminary steps:
- Create a personal fork of the project repository.
- Establish a dedicated branch for your proposed feature or defect correction.
- Implement your modifications and ensure thorough code documentation.
- Submit a formal pull request accompanied by a clear narrative summarizing the alterations.
For comprehensive guidance, consult the CONTRIBUTING documentation file.
