gitea-mcp
Provides tools for interacting with a Gitea instance, enabling management of repositories, issues, pull requests, file content, and commit history.
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 open issues in the repo"
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
A local MCP server that connects Claude directly to your own Gitea instance — no hosted gateway in between.
Most MCP setups for Git hosting route through a third-party gateway (Composio and similar): the gateway holds your token, brokers every API call, and sits as an opaque intermediary between your agent and your infrastructure. gitea_mcp skips that entirely. It runs as a subprocess on your own machine, talks over stdio, and speaks directly to your Gitea instance — your token and repo data never pass through anyone else's server.
This project is intentionally local-only. There's no hosted endpoint, no third-party account, and no server to deploy — just a Python script your MCP client launches on demand.
Features
Direct connection — talks straight to
GITEA_BASE_URL, nothing in betweenRepositories — list and search
Issues — list (filtered by state) and create
Pull requests — list (filtered by state) and create
Files — read content and write (create or update) as a single commit, with SHA-based conflict protection
Commits — list history, optionally scoped to one file
Actionable errors — auth, not-found, permission, conflict, and validation failures all come back as specific, readable messages instead of raw exceptions
Related MCP server: GitHub MCP Server
Prerequisites
Python 3.9 or later
A running Gitea instance you have API access to
A Gitea personal access token
Install
python3 -m venv venv
source venv/bin/activate # venv\Scripts\activate on Windows
pip install -r requirements.txtDependencies are pinned tomcp==1.9.4 deliberately. Newer mcp releases (2.0.0+) restructured the package and no longer expose FastMCP at the path this server imports it from.
Configure
Generate a token in Gitea under Settings → Applications → Generate New Token, scoped narrowly to what this server needs (repo read/write, issue read/write) rather than every permission available.
export GITEA_BASE_URL="https://gitea.example.com"
export GITEA_TOKEN="<your token>"The server refuses to start if either variable is missing — no silent fallback to a hardcoded value.
Usage
Run standalone
python3 gitea_mcp.pyAdd to Claude Desktop
In Claude Desktop's MCP config (claude_desktop_config.json):
{
"mcpServers": {
"gitea": {
"command": "/path/to/venv/bin/python3",
"args": ["/path/to/gitea_mcp.py"],
"env": {
"GITEA_BASE_URL": "https://gitea.example.com",
"GITEA_TOKEN": "<your token>"
}
}
}
}Claude Desktop launches the server as a subprocess and talks to it over stdio — no port to open, no service to keep running.
Available tools
Tool | Description |
| List or search repositories accessible to the authenticated user |
| List issues in a repository, filtered by state |
| Create an issue with a title, body, and existing labels |
| List pull requests in a repository, filtered by state |
| Open a pull request from one branch into another |
| Read a file's content and current blob SHA |
| Create or update a file as a single commit |
| List commit history, optionally scoped to a file path |
Scope
This is a first pass covering the core workflow — repos, issues, PRs, file read/write, and commit history. Branch management, releases, label administration, webhooks, and org-level operations aren't implemented yet. The plan is to expand once this core set proves out in real use rather than building everything speculatively up front.
Testing
tests/test_gitea_mcp.py exercises all 8 tools against a real Gitea instance — no mocking of the Gitea API.
Point this at a disposable scratch repo, never a real project repo. The write tests create and clean up issues, pull requests, branches, and files as part of running.
pip install -r requirements-dev.txt
export GITEA_BASE_URL="https://gitea.example.com"
export GITEA_TOKEN="<your token>"
export TEST_REPO_OWNER="<owner of your scratch repo>" # defaults to "dmc"
export TEST_REPO_NAME="<name of your scratch repo>" # defaults to "gitea-mcp-test-repo"
pytest tests/ -vThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.4
- FlicenseBqualityDmaintenanceAn MCP server that allows Claude and other MCP-compatible LLMs to interact with the GitHub API, supporting features like creating issues, getting repository information, listing issues, and searching repositories.4
- Flicense-qualityDmaintenanceA working MCP server that connects to the real GitHub API, enabling users to manage repositories, issues, pull requests, and more through natural language in Claude Desktop.
- AlicenseAqualityDmaintenanceAn MCP server that gives Claude live access to your GitHub workspace — PR reviews, issue triaging, repo search, and weekly digest reports through natural language.7MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that gives your AI access to the source code and docs of all public github repos
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- 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/datamathcode/gitea-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server