by oschina
Provides tools to interact with Gitee's API, enabling AI assistants to manage repositories, issues, pull requests, and notifications.
Mcp Gitee offers a Model Context Protocol (MCP) server implementation that connects AI assistants with Gitee's REST API. It exposes a wide set of actions—such as repository listing, file retrieval, issue handling, and pull‑request management—through a standardized toolset.
npx without a prior build:
{
"command": "npx",
"args": ["-y", "@gitee/mcp-gitee@latest"]
}
Or install globally with go install gitee.com/oschina/mcp-gitee@latest.GITEE_ACCESS_TOKEN (or --token)GITEE_API_BASE (default https://gitee.com/api/v5)localhost:8000) or let an AI host invoke it through the MCP endpoint.--enabled-toolsets / --disabled-toolsets or the corresponding environment variables.Q: Do I need to build the binary before using it?
A: No. The npx command runs the latest package version directly. Building is optional for custom deployments.
Q: Which environment variables are required?
A: GITEE_ACCESS_TOKEN is mandatory for authentication. GITEE_API_BASE is optional if you use the default Gitee API endpoint.
Q: How can I limit the exposed tools?
A: Use --enabled-toolsets (whitelist) or --disabled-toolsets (blacklist). If both are provided, the whitelist takes precedence.
Q: Can I run the server on a custom host/port?
A: Yes. Use the --address flag, e.g., --address 0.0.0.0:9000.
Q: What transport types are available?
A: stdio (default), sse, and http.
Gitee MCP Server is a Model Context Protocol (MCP) server implementation for Gitee. It provides a set of tools for interacting with Gitee's API, allowing AI assistants to manage repositories, issues, pull requests, and more.



Clone the repository:
git clone https://gitee.com/oschina/mcp-gitee.git
cd mcp-gitee
Build the project:
make build
Move ./bin/mcp-gitee PATH env
go install gitee.com/oschina/mcp-gitee@latest
Check mcp-gitee version:
mcp-gitee --version
config example: Click to view more application configuration
{
"mcpServers": {
"gitee": {
"url": "https://api.gitee.com/mcp",
"headers": {
"Authorization": "Bearer <your personal access token>"
}
}
}
}
{
"mcpServers": {
"gitee": {
"command": "npx",
"args": [
"-y",
"@gitee/mcp-gitee@latest"
],
"env": {
"GITEE_API_BASE": "https://gitee.com/api/v5",
"GITEE_ACCESS_TOKEN": "<your personal access token>"
}
}
}
}
{
"mcpServers": {
"gitee": {
"command": "mcp-gitee",
"env": {
"GITEE_API_BASE": "https://gitee.com/api/v5",
"GITEE_ACCESS_TOKEN": "<your personal access token>"
}
}
}
}
--token: Gitee access token--api-base: Gitee API base URL (default: https://gitee.com/api/v5)--version: Show version information--transport: Transport type (stdio、sse or http, default: stdio)--address: The host and port to start the server on (default: localhost:8000)--enabled-toolsets: Comma-separated list of tools to enable (if specified, only these tools will be enabled)--disabled-toolsets: Comma-separated list of tools to disableYou can also configure the server using environment variables:
GITEE_ACCESS_TOKEN: Gitee access tokenGITEE_API_BASE: Gitee API base URLENABLED_TOOLSETS: Comma-separated list of tools to enableDISABLED_TOOLSETS: Comma-separated list of tools to disableToolset management supports two modes:
Enable specified tools (whitelist mode):
--enabled-toolsets parameter or ENABLED_TOOLSETS environment variable--enabled-toolsets="list_user_repos,get_file_content"Disable specified tools (blacklist mode):
--disabled-toolsets parameter or DISABLED_TOOLSETS environment variable--disabled-toolsets="list_user_repos,get_file_content"Note:
enabled-toolsets and disabled-toolsets are specified, enabled-toolsets takes precedenceThis project is licensed under the MIT License. See the LICENSE file for more details.
The server provides various tools for interacting with Gitee:
| Tool | Category | Description |
|---|---|---|
| list_user_repos | Repository | List user authorized repositories |
| get_file_content | Repository | Get the content of a file in a repository |
| create_user_repo | Repository | Create a user repository |
| create_org_repo | Repository | Create an organization repository |
| create_enter_repo | Repository | Create an enterprise repository |
| fork_repository | Repository | Fork a repository |
| create_release | Repository | Create a release for a repository |
| list_releases | Repository | List repository releases |
| search_open_source_repositories | Repository | Search open source repositories on Gitee |
| list_repo_pulls | Pull Request | List pull requests in a repository |
| merge_pull | Pull Request | Merge a pull request |
| create_pull | Pull Request | Create a pull request |
| update_pull | Pull Request | Update a pull request |
| get_pull_detail | Pull Request | Get details of a pull request |
| comment_pull | Pull Request | Comment on a pull request |
| list_pull_comments | Pull Request | List all comments for a pull request |
| get_diff_files | Pull Request | Get a pull request diff files |
| create_issue | Issue | Create an issue |
| update_issue | Issue | Update an issue |
| get_repo_issue_detail | Issue | Get details of a repository issue |
| list_repo_issues | Issue | List repository issues |
| comment_issue | Issue | Comment on an issue |
| list_issue_comments | Issue | List comments on an issue |
| get_user_info | User | Get current authenticated user information |
| search_users | User | Search for users |
| list_user_notifications | Notification | List user notifications |
We welcome contributions from the open-source community! If you'd like to contribute to this project, please follow these guidelines:
For more information, please refer to the CONTRIBUTING file.
Please log in to share your review and rating for this MCP.
{
"mcpServers": {
"gitee": {
"command": "npx",
"args": [
"-y",
"@gitee/mcp-gitee@latest"
],
"env": {
"GITEE_API_BASE": "https://gitee.com/api/v5",
"GITEE_ACCESS_TOKEN": "<YOUR_PERSONAL_ACCESS_TOKEN>"
}
}
}
}claude mcp add gitee npx -y @gitee/mcp-gitee@latestExplore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.