Skip to content

feat(gitea): add Gitea plugin with compact MCP output - #376

Open
OPVL wants to merge 1 commit into
zai-org:mainfrom
OPVL:feat/gitea-plugin
Open

OPVL wants to merge 1 commit into
zai-org:mainfrom
OPVL:feat/gitea-plugin

Conversation

@OPVL

@OPVL OPVL commented Dec 1, 2026 •

Copy link
Copy Markdown

Plugin type (required) / 插件类型(必填)

  • UI Plugin / 是 UI 插件 — provides MCP Apps interactive pages / 提供 MCP Apps 交互页面
  • Standard plugin / 普通插件(非 UI) — does not provide MCP Apps interactive pages / 不提供 MCP Apps 交互页面
  • Not applicable / 不适用 — repository-only changes; no plugin content changed / 仅仓库级改动,不涉及插件内容

Affected plugin name(s) / 涉及的插件名称:gitea (Standard plugin)

What / 改动内容

Adds a community Gitea plugin at external_plugins/gitea (category developer-tools, version 0.2.0). It fills the gap next to the existing github and gitlab plugins for teams on gitea.com or self-hosted Gitea.

User problem: there is no Gitea integration in the marketplace, and a naive REST wrapper floods agent context. Raw Gitea objects embed full user and repository objects (one PR carries two complete repos), so a single create_pr returned ~12k characters and list_issues hit 60k+.

Visible behaviour:

  • MCP server (mcp/server.mjs, Node ≥ 18, no dependencies, 33 tools): repos, branches, tags, issues (+ cross-repo search), comments, labels, milestones, pull requests (view with status checks and optional clipped diff, create, edit, merge), releases, orgs, Actions runs, workflow dispatch, Actions secrets.
  • Skills: setup (token configuration without pasting secrets into chat), issue, pr, repo, release, actions. Every write is confirmed with the user first; delete_repo additionally requires confirm: true.
  • Compact output: list tools emit a {page,count,more,total} line plus one compact JSON row per item; create/edit return number/id, state and URL; long bodies, comments and diffs are clipped with opt-outs (full, last_comments, max_diff_chars).

How it was tested:

  • Read tools exercised against a real self-hosted Gitea (28.x) instance, comparing old vs new output: create_pr ~12,045 → 205 chars, 20-item list_issues 60,100 (truncated) → 3,660, list_prs 60,105 → 3,798, get_pr 12,605 → 3,880.
  • Write tools (create_pr, edit_pr, create_issue, add_comment) checked against a local mock replaying real Gitea responses.
  • The earlier 0.1.0 build was installed and used in ZCode Desktop from a local marketplace; 0.2.0 has been verified by driving the MCP server over stdio (ZCode Desktop retest pending).
  • python3 scripts/validate.py passes (59 plugins) and git diff --check is clean. scripts/build_dist.py stops at the pre-existing excalidraw: incomplete build; run pnpm build first without a UI build, so I packaged external_plugins/gitea with build_dist.build_zip directly: 14 files, and the extracted plugin starts with the 0644 permissions the zip applies (the MCP command is sh .../run-node.sh, so it does not rely on the executable bit).

Version and registration: new plugin at 0.2.0; the manifest and the marketplace.json entry match (name, version, description, description_i18n en + zh-CN).

Dependencies, network, permissions, side effects:

  • Requires Node.js ≥ 18. run-node.sh locates Node via PATH, nvm, then Homebrew/system paths (POSIX sh, so macOS/Linux).
  • Network: HTTPS only to the Gitea URL the user configures; no other services, no telemetry.
  • Reads ~/.config/gitea/mcp.json or GITEA_URL/GITEA_TOKEN; writes no files. No hooks.
  • Write tools change data on the user's Gitea instance (documented in both READMEs).

Licensing / provenance: original work by the submitter, Apache-2.0 (LICENSE included). Upstream source: https://github.com/OPVL/gitea-mcp. No third-party code or assets.

Self-check / 自查清单

  • Plugin name is unique kebab-case; new external plugin directory is external_plugins/<name>/; existing fixes retain ownership / 插件名唯一且 kebab-case,外部新增插件位于 external_plugins/<name>/,已有插件修复保留原归属
  • Usage category is set independently of publisher ownership / 用途分类 category 已填写,与维护归属分开
  • Plugin type and affected names are declared above / 已在上方声明插件类型与涉及的插件名称
  • version bumped in BOTH plugin.json and marketplace.json (artifacts are immutable) / plugin.json 与 marketplace.json 两处版本号已同步升级(制品不可变)
  • README.md (EN) and README_CN.md (中文) both updated and equivalent / 中英文 README 均已更新且语义一致
  • description_i18n has both en and zh-CN / description_i18n 包含 en 与 zh-CN
  • No secrets, machine-specific paths, or private dependencies / 不含密钥、机器专属路径或私有依赖
  • Model/API/network dependencies documented / 模型、API、网络依赖已写明
  • python3 scripts/validate.py passes; build_dist.py packaging verified for this plugin (full run needs the UI pnpm build, see above) / 本地校验通过;本插件打包已验证(完整构建需先执行 UI 的 pnpm build)

🤖 Generated with Claude Code

Community plugin under external_plugins/gitea: a zero-dependency Node MCP
server (33 tools) and six skills for Gitea issues, pull requests,
repositories, labels, milestones, releases, organizations and Actions,
including self-hosted instances. Source: https://github.com/OPVL/gitea-mcp

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@panda920

panda920 commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

✅ Internal validation passed. A ZCode maintainer will review the change next; after acceptance, release checks run separately and this PR is closed automatically.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants