gitea-mcp
gitea-mcp is an MCP server providing full Gitea API coverage, enabling AI agents to manage all aspects of a Gitea instance. It exposes ~300 API functionalities, accessible via 6 compact meta-tools (compact mode) or individually.
Meta-tools (compact mode):
gitea_read— Any GET request: retrieve repositories, issues, pull requests, branches, tags, commits, files, users, organizations, notifications, packages, wikis, webhooks, CI/Actions artifacts, and more.gitea_create— Any POST request: create repositories, issues, pull requests, releases, labels, milestones, comments, branches, deploy keys, webhooks, teams, organizations, wiki pages, and trigger CI workflows.gitea_update— Any PUT/PATCH request: edit repositories, issues, pull requests, releases, file contents, user settings, team membership, milestones, labels, etc.gitea_delete— Any DELETE request: remove repositories, issues, comments, branches, tags, releases, webhooks, deploy keys, team members, and more.gitea_admin_read— Privileged GET requests on/admin/*endpoints: list users, view instance settings, inspect cron tasks (requires admin privileges).gitea_admin_write— Privileged POST/PUT/PATCH/DELETE on/admin/*endpoints: create/delete users, manage instance settings, run cron jobs (requires admin privileges).gitea_version— Retrieve the MCP server version and connected Gitea service version.
All tools support operation="help" to list available endpoints for that category. Files are auto-base64 encoded, and self-rotating user access tokens are supported (requires write:user scope).
Provides comprehensive access to the Gitea API, allowing AI agents to manage repositories, issues, pull requests, releases, branches, file contents, organizations, teams, and CI/CD workflows.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gitea-mcplist all open pull requests in the web-app repository"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gitea-mcp
MCP server for Gitea -- full API coverage for autonomous AI agents.
Features
~290 operations covering the entire Gitea API surface
Repositories, issues, pull requests, releases, labels, milestones
File content management (create, read, update, delete)
Branches, tags, commits, and status checks
Actions / CI workflows and artifacts
Long-running waiters -
workflow_runs_wait/workflow_jobs_waitblock until a run or job finishes (streaming progress via MCP notifications); non-blocking*_wait_start/*_wait_poll(max_block=...)/*_wait_cancel+waits_listkeep the agent responsive. Waits tolerate transient API errors (max_poll_failures, default 3 consecutive), background waits self-terminate aftermax_lifetime(default 2h), and all wait ops live ingitea_read- they only ever GETOrganizations, teams, and user management
Webhooks, deploy keys, notifications, wiki, packages
Admin endpoints for instance-level operations
6 risk-graded meta-tools (
gitea_read/gitea_write/gitea_execute/gitea_delete/gitea_admin_read/gitea_admin_write) — agents pick a tool surface by the kind of side effect, not the HTTP verbPer-param help with
operation='help' params={'search': 'foo'}for substring filtering and cross-group hintsZero-config install via
uvx
Related MCP server: mcp-gitpro
Quick Start
Add the following to your MCP client configuration (Claude Desktop, Cursor, Claude Code, etc.).
For Claude Code global config on macOS: ~/.claude.json → "mcpServers".
{
"mcpServers": {
"gitea": {
"command": "uvx",
"args": ["--refresh", "--extra-index-url", "https://nikitatsym.github.io/gitea-mcp/simple", "gitea-mcp"],
"env": {
"GITEA_URL": "https://gitea.example.com",
"GITEA_TOKEN": "your-api-token"
}
}
}
}Or use the interactive Setup Page to generate the config.
Configuration
Variable | Required | Description |
| Yes | Base URL of your Gitea instance (e.g. |
| Yes | Personal access token with appropriate permissions. For |
| No | Max character length for the |
By default, creating public repos and orgs is blocked — agents must pass private=true explicitly. To allow public repos, add --allow-public to the command args:
"args": ["--refresh", "--extra-index-url", "https://nikitatsym.github.io/gitea-mcp/simple", "gitea-mcp", "--allow-public"]Tool Groups
All ~290 operations are exposed through 6 risk-graded meta-tools — one tool surface per scope, dispatched via operation + params. Aligned with the v2 MCP spec so agents pick a tool by the kind of side effect, not the HTTP verb.
Meta-tool | Scope | Examples |
| GET, safe / read-only |
|
| Create + update (POST/PUT/PATCH) |
|
| Action triggers with real-world side effects |
|
| Destructive DELETE |
|
| Admin-scope GET |
|
| Admin-scope writes + admin actions |
|
Each meta-tool takes operation (PascalCase op name, or help / schema) plus params (dict):
gitea_read(operation="help") # list every op in this group
gitea_read(operation="help", params={"search": "merge"}) # filter by substring; surfaces cross-group hits
gitea_read(operation="schema", params={"op": "GetRepo"}) # full JSON Schema for one op
gitea_read(operation="GetRepo", params={"owner": "alice", "repo": "x"}) # invoke
gitea_write(operation="CreateIssue", params={"owner": "alice", "repo": "x", "title": "Bug", "body": "<brief>repro</brief>"})
gitea_execute(operation="MergePullRequest", params={"owner": "alice", "repo": "x", "index": 7, "merge_type": "squash"})Params are validated strictly via Pydantic: unknown keys, wrong types, and missing required fields all surface as a ValueError with field-level detail.
Creating a Gitea API Token
Log in to your Gitea instance.
Go to Settings > Applications.
Under Manage Access Tokens, enter a token name (e.g.
mcp-server).Select the permissions your agent needs (read/write on repos, issues, etc.).
Click Generate Token and copy the value immediately -- it is shown only once.
Development
The project uses npm scripts for the local test lifecycle:
# unit tests (no docker, fast)
npm test
# bring up Gitea container + bootstrap admin user + write tests/.env
npm run gitea:up
# run integration tests against the live container
npm run test:integration
# tear down
npm run gitea:down
# one-shot: up + integration + down (exits with the pytest status code)
npm run test:integration:fullnpm run gitea:bootstrap is idempotent — re-running against an already-bootstrapped instance no-ops if tests/.env carries a still-valid token, otherwise deletes the named token and creates a fresh one. The bootstrap script (scripts/bootstrap.py) is also runnable directly via uv run python scripts/bootstrap.py.
tests/.env schema:
GITEA_URL=http://localhost:3000
GITEA_TOKEN=<sha1>
GITEA_ADMIN_USER=testadmin
GITEA_ADMIN_PASSWORD=testadmin1234Integration tests are gated behind @pytest.mark.integration and skipped unless GITEA_URL + GITEA_TOKEN are present — npm test will not require docker.
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikitatsym/gitea-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server