gitea-mcp
gitea-mcp is an MCP server that gives AI agents full, risk-graded access to a Gitea instance's REST API — repos, issues, PRs, CI, orgs, and admin — through six meta-tools.
Repositories & content — create/edit/delete repos, manage files, branches, tags, commits, and status checks
Issues & PRs — list, create, edit, comment, label, milestone; merge PRs with a chosen merge type
Actions / CI — dispatch workflows, fetch artifacts, read job logs; long-running waiters (blocking, start/poll/cancel) with transient-error tolerance and self-termination
Projects & orgs — boards/columns/issue placement for repo, org, and user projects; teams, users, and membership
Extras — webhooks, deploy keys, notifications, wiki, packages, and releases
Admin operations — instance-level user/runner management and cron job execution via
gitea_admin_read/gitea_admin_writeSafe discovery —
operation='help'lists ops (with substring search and cross-group hints),operation='schema'returns full JSON Schema per op, with strict Pydantic param validationRisk-graded surfaces —
gitea_read(GET-only),gitea_write(POST/PUT/PATCH),gitea_execute(side-effecting actions),gitea_delete(destructive) so agents pick by side effect, not HTTP verbDeployment flexibility — zero-config
uvxinstall, optional streamable HTTP mode, importable as a library for multi-instance hosting
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 "Deploy 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-mcp list 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, built for autonomous AI agents.
The supported Gitea baseline and integration harness are 28.3.0. The gate checks every endpoint in that release's Swagger against the hand-written operations.
Features
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; job logs come back as text, one job or a whole run at a time
Projects (boards): columns and issue placement for repository, organization and user projects
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
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: gitea-mcp
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.
HTTP
gitea-mcp --http serves streamable HTTP at http://127.0.0.1:8000/mcp (--host, --port) instead of stdio, same environment variables. No authentication: put a gateway in front.
The package can also be imported: mcp, Settings, the client class, and client_var (a ContextVar the host sets per request) let one process serve several instances.
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
Operations are exposed through risk-graded meta-tools — one tool surface per scope, dispatched via operation + params.
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 return a contextual error result 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
dev.py is the single gate entry point (dev-script contract): lint
(ruff + mypy + tackbox), e2e (boots the dockerized Gitea, runs the integration
suite), test (unit + e2e), check (lint + test). Pre-commit and CI both
run ./dev.py check — install the hook once per clone with
python dev.py hook, which points core.hooksPath at the tracked
.githooks/.
npm scripts cover the docker lifecycle around it:
# 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 use @pytest.mark.integration and are deselected by npm test.
Selecting them requires GITEA_URL + GITEA_TOKEN; missing configuration fails
the run rather than silently skipping it.
License
Available Tools
7 toolsgitea_admin_readB
Gitea admin read operations (GET /admin/*).
operation='help' — list ops with parameter names + types. operation='help' params={'search':'X'} — same, filtered to ops whose name contains X (case-insensitive). operation='schema' — JSON Schema for one op. params={'op': 'OpName'} or params={} to list op names. operation='' params={...} — invoke. Params validated strictly: unknown keys, wrong types, missing required → ValueError with field-level detail.
Inputs: operation (required), params.
gitea_admin_writeA
Gitea admin write operations (POST/PUT/PATCH/DELETE /admin/*) and admin-scope actions like running cron jobs.
operation='help' — list ops with parameter names + types. operation='help' params={'search':'X'} — same, filtered to ops whose name contains X (case-insensitive). operation='schema' — JSON Schema for one op. params={'op': 'OpName'} or params={} to list op names. operation='' params={...} — invoke. Params validated strictly: unknown keys, wrong types, missing required → ValueError with field-level detail.
Inputs: operation (required), params.
gitea_deleteA
Gitea delete operations (DELETE) — destructive.
operation='help' — list ops with parameter names + types. operation='help' params={'search':'X'} — same, filtered to ops whose name contains X (case-insensitive). operation='schema' — JSON Schema for one op. params={'op': 'OpName'} or params={} to list op names. operation='' params={...} — invoke. Params validated strictly: unknown keys, wrong types, missing required → ValueError with field-level detail.
Inputs: operation (required), params.
gitea_executeA
Gitea action triggers — merge PRs, dispatch workflows, and other side-effecting actions beyond plain CRUD.
operation='help' — list ops with parameter names + types. operation='help' params={'search':'X'} — same, filtered to ops whose name contains X (case-insensitive). operation='schema' — JSON Schema for one op. params={'op': 'OpName'} or params={} to list op names. operation='' params={...} — invoke. Params validated strictly: unknown keys, wrong types, missing required → ValueError with field-level detail.
Inputs: operation (required), params.
gitea_readA
Gitea read operations — safe, GET-only.
operation='help' — list ops with parameter names + types. operation='help' params={'search':'X'} — same, filtered to ops whose name contains X (case-insensitive). operation='schema' — JSON Schema for one op. params={'op': 'OpName'} or params={} to list op names. operation='' params={...} — invoke. Params validated strictly: unknown keys, wrong types, missing required → ValueError with field-level detail.
Inputs: operation (required), params.
gitea_versionA
Get the Gitea MCP server version and service version.
Inputs: no named parameters.
gitea_writeA
Gitea write operations — create or update resources (POST/PUT/PATCH).
operation='help' — list ops with parameter names + types. operation='help' params={'search':'X'} — same, filtered to ops whose name contains X (case-insensitive). operation='schema' — JSON Schema for one op. params={'op': 'OpName'} or params={} to list op names. operation='' params={...} — invoke. Params validated strictly: unknown keys, wrong types, missing required → ValueError with field-level detail.
Inputs: operation (required), params.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
The tools are divided by operation category (read, write, delete, etc.) with clear names, but there is overlap: gitea_delete and gitea_admin_write both handle DELETE operations, and gitea_execute may overlap with gitea_write for actions like merge PR. An agent may be uncertain which umbrella tool to use for a given operation.
All tools share the gitea_ prefix and use snake_case, which is consistent. However, gitea_version is a noun while the others are verbs (read, write, delete, execute), a minor deviation from the otherwise verb-based pattern.
With 7 tools, the count is well within the typical range for a server that wraps a full API. Each umbrella tool covers a broad category of operations, making the top-level count compact and manageable.
The set covers the core domains: version info, read/write/delete operations, admin read/write, and side-effecting actions. The split between gitea_write and gitea_execute is somewhat redundant for certain actions, and there is no dedicated search tool, but overall coverage is strong.
Maintenance
Related MCP Connectors
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
A MCP server built for developers enabling Git based project management with project and personal…
A registry of AI agent tools — MCP servers, APIs, CLIs, SDKs — kept current by automated ingestion.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceA comprehensive MCP server suite that enables AI interaction with Gitea for repository management, secure command execution, and Docker monitoring. It provides additional tools for long-term memory, filesystem access, and web searching to support full development cycles.-
- AlicenseAqualityBmaintenanceMCP server for managing Gitea repositories via the Gitea API, enabling operations on issues, comments, labels, milestones, and repository info.7250 npm2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for OpenDev Gitea and Gerrit APIs, enabling repository browsing, code review, and change management for LLM agents.Apache 2.0
- AlicenseBqualityCmaintenanceA comprehensive MCP server that exposes 73 GitHub API tools for managing repositories, pull requests, issues, actions, releases, search, and more, enabling natural language control of GitHub.73MIT