
gitea-mcp
io.github.werebear73由 GitHub 帳號 werebear73 發布v0.5.1更新於 Oct 25, 2026
Model Context Protocol server for Gitea (and Forgejo, Codeberg).
概覽
本機 MCP 伺服器,讓 AI 助理在 Gitea、Forgejo 或 Codeberg 實例上讀取、建立與管理議題、拉取請求、檔案與發行版本。
- 可以做什麼
- 建立、列出、讀取、更新議題並新增留言,列出標籤、里程碑與分支,用於分類整理與記錄。列出並檢視拉取請求,新增留言、建立與合併拉取請求。讀取儲存庫檔案、提交變更並建立分支。列出與建立發行版本。查詢伺服器資訊與版本。
- 適用情境
- 當團隊或專案在自架的 Gitea、Forgejo 或 Codeberg 上追蹤工作時適用,可讓助理不必離開對話就開立議題、分類整理、跨儲存庫留言或發行版本。
- 執行需求
- 以 Python 套件(pip 或 uvx)透過 stdio 在本機執行,也可自架為 streamable HTTP 服務。需要以環境變數提供 GITEA_URL(實例基礎網址)與 GITEA_TOKEN(個人存取權杖),並能連線至該實例。選用的 GITEA_TIMEOUT、GITEA_MAX_RETRIES 與 GITEA_RETRY_BASE_DELAY 可調整 HTTP 行為。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 gitea-mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
gitea-mcp
A Model Context Protocol server for Gitea — lets AI assistants (Claude, ChatGPT, Copilot, and anything else that speaks MCP) read, create, and manage issues, repositories, and releases on any Gitea instance you can reach.
Also works against Forgejo and Codeberg (API-compatible).
Why
Self-hosted Gitea is a popular GitHub alternative for solo developers, small teams, and privacy-conscious organizations. With this MCP server installed, your AI assistant can:
- File audit findings or refactor notes as Gitea issues without you leaving the chat
- Triage a repo's open issues in natural language
- Cut a release at the end of a coding session
- Comment on issues across multiple repos in one pass
Features
- Bearer authentication via Personal Access Token (PAT)
- Async HTTP via
httpxandFastMCP - Works with self-hosted Gitea, Forgejo, and Codeberg
Quick Start
1. Install
Or with uv:
2. Generate a Personal Access Token
In your Gitea instance, go to Settings → Applications → Generate New Token and grant at least:
read:repositorywrite:issueread:user
Add write:repository if you also want to create releases.
3. Configure your MCP client
Claude Desktop (interactive): run
It prompts for the Gitea URL and Personal Access Token, verifies the connection, and writes (or merges into) the right claude_desktop_config.json for your OS. Restart Claude Desktop and you're done.
To check that the server can reach your Gitea instance at any time:
doctor reads GITEA_URL and GITEA_TOKEN from the environment, runs a GET /api/v1/user, and reports the authenticated username plus the state of the MCP tool surface. Exit 0 = ready; exit 1 = connection/load failure; exit 2 = missing config.
Any MCP client (manual): add gitea-mcp to the client's MCP config. The recommended form uses uvx so the client launches the latest published wheel in an isolated env without needing gitea-mcp on its own PATH (this is what gitea-mcp init writes):
If you'd rather use a globally pip-installed gitea-mcp binary, drop args and set command to "gitea-mcp" directly — works as long as the binary is on the MCP client's PATH at launch time.
See mcp.json for a complete example. The same shape works for Claude Desktop, VS Code, Cowork, Claude Code, and any other MCP-compatible client.
Configuration
Configuration is read from environment variables.
Self-hosting / HTTP transport
By default gitea-mcp runs in stdio mode — each MCP client (Claude Desktop, Cowork, etc.) launches its own subprocess on demand. For self-hosting one instance that multiple clients connect to over the network, use the streamable-HTTP transport:
All four flags can also be provided via environment variables (handy for Docker / systemd units):
MCP clients connect to the resulting URL (e.g. https://gitea-mcp.example.com/mcp) just like they would to a local stdio server, except they share the one running instance.
Auth model (this release). The server reads GITEA_TOKEN from its own environment, so any client that reaches the URL acts as that one Gitea user. Run it for yourself behind your own access controls (firewall, reverse-proxy auth, VPN, Tailscale). Multi-tenant bring-your-own-token is on the roadmap.
The no-args invocation (gitea-mcp with no subcommand) still runs in stdio mode, so existing Claude Desktop / Cowork / Claude Code integrations are unaffected by this addition.
Compatibility
Development
The two-stage pre-commit policy keeps the commit loop snappy (lint + type only) while making git push block on the slow stuff that's actually caught CI/release bugs in the past — the full test suite and python -m build && twine check dist/*, which surfaces setuptools_scm version surprises before they reach a tag push.
Roadmap
See docs/ROADMAP.md for what's shipped, what's next, and what's out of scope.
Publishing
- MCP Registry metadata is tracked in
server.json. - Smithery + MCP Registry publication steps are documented in
docs/PUBLISHING.md.
Versioning
Semantic versioning, derived from git tags via setuptools_scm. See VERSIONING.md for the release process.
Contributing
Issues and pull requests welcome. For substantial changes, please open an issue first to discuss the approach.
License
MIT — use it however you like, including commercial products.
Built by Waretech Services.
來源:README.md,提交 5adde5e
工具
0版本歷史
1- v0.5.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分