Skip to main content
Glama

Gitea for Claude Code

CI Security Release License: Apache-2.0 Node.js

A Claude Code plugin that connects Claude to any Gitea instance — gitea.com or your own self-hosted server. It ships a bundled MCP server with 126 tools and 7 workflow skills for repositories, files, branches, issues, pull requests and reviews, organisations and teams, Gitea Actions, releases, webhooks and notifications.

🇩🇪 Deutsche Dokumentation: docs/de/README.md

You:    Analyse the failed Gitea Actions runs and fix the pipeline.
Claude: ▸ gitea · actions_failures_analyze   → run #42 failed in job "test", step "npm test"
        ▸ gitea · actions_job_logs           → error: Cannot find module './config.js'
        The test imports a file that was renamed in 3f2c1a9 …

Features

Area

What Claude can do

Repositories

list, search, inspect, create, configure, change visibility, archive, fork, delete (confirmed), topics

Files

read, list directories and trees, find files by glob, search contents, create/update/delete, multi-file commits, compare a file between refs

Git

branches, commits with diffs, history analysis, compare refs, tags, commit status, branch and tag protection, local repository inspection and push

Issues

list/filter by priority, labels, assignee, milestone; search across repositories; create, edit, assign, label, comment, close/reopen; backlog summary; labels and milestones

Pull requests

list, create, edit, diff, files, commits, reviews and inline comments, review requests, merge-readiness check, merge (confirmed), update branch, close

Organisations

users, organisations, members, teams and team members, collaborators, repository access analysis

Gitea Actions

workflows and their YAML, runs, jobs, logs, failure analysis, re-run, dispatch, cancel, artifacts

Releases

list, create (with generated notes), edit, delete, assets upload/delete, notes generation, compare releases

More

webhooks (repository and organisation), notifications, repository health analysis

Full list: docs/TOOLS.md.

Skills (invoke with /gitea:<name> or just ask in natural language): setup, pr-from-changes, pr-review, issue-triage, ci-failures, release, repo-overview.

Related MCP server: gitea-mcp

Requirements

  • Claude Code 2.1.x or newer

  • Node.js ≥ 22.19 on your PATH (the MCP server is a single bundled JavaScript file; no npm install, no build step)

  • A Gitea instance with the API enabled and a personal access token. Tested against Gitea 28.2; feature detection adapts to older versions and Forgejo.

Installation

In Claude Code:

/plugin marketplace add jtracht/claude-code-gitea
/plugin install gitea@jtracht-gitea

Or from a terminal:

claude plugin install gitea --marketplace jtracht/claude-code-gitea
# equivalent:
claude plugin marketplace add jtracht/claude-code-gitea
claude plugin install gitea@jtracht-gitea

No GitHub SSH key? Set CLAUDE_CODE_PLUGIN_PREFER_HTTPS=1 before adding the marketplace.

Claude Code then asks for the plugin options. You can change them at any time with /plugin → gitea → Configure, or claude plugin configure gitea. Run /reload-plugins (or restart Claude Code) afterwards.

Offline / air-gapped: download gitea-plugin-<version>.zip from the releases, verify it against SHA256SUMS, unpack it and start Claude Code with claude --plugin-dir ./gitea.

Configuration

Option

Default

Description

Gitea server URL

–

e.g. https://git.example.com (https required)

Gitea API token

–

stored in the OS credential store, never in settings.json

Allow write operations

on

create/edit repositories, files, branches, issues, PRs, releases

Allow destructive operations

off

deletions; each one still needs your confirmation

Allow administrative operations

off

organisations, teams, collaborators, protection rules, webhooks; each change needs confirmation

CA certificate file

–

PEM file of a private CA for self-hosted servers

Trust the OS CA store

off

also trust certificates installed in the operating system

Profiles file

–

JSON file with additional Gitea servers

Allow insecure HTTP

off

only for local test instances

Connecting to your own Gitea

  1. In Gitea open Settings → Applications → Manage Access Tokens and create a token. Recommended scopes for everyday work: write:repository, write:issue, read:user, read:organization, write:notification (read-only use: the read: variants).

  2. Configure the plugin with your server, e.g. https://git.tracht-digital.de, and the token.

  3. Ask Claude: "Test the Gitea connection." — connection_test reports the server version, the user, granted scopes, supported features and enabled operation levels.

Self-signed or internal certificates: set CA certificate file to your CA's PEM file or enable Trust the OS CA store. TLS verification is never disabled.

Multiple servers, read-only profiles and all environment variables: docs/CONFIGURATION.md.

Usage examples

  • "Show me my Gitea repositories."

  • "Create a new private repository called inventory-service with a README."

  • "Analyse all open issues and suggest priorities."

  • "Show the failed Gitea Actions runs."

  • "Create a pull request from my changes."

  • "Analyse the last pull request."

  • "Create a release for this repository."

  • "Compare the last two releases."

  • "Show me all open tasks of the project."

When you work inside a clone whose remote points to your Gitea server, owner and repo are detected automatically.

Security

  • The token is kept in the system credential store, sent only to the configured origin, and redacted from every log line, error and tool result.

  • Plain http:// is refused unless explicitly allowed; redirects to other hosts are never followed with credentials.

  • Operations are split into read, write, destructive and admin. Destructive and admin tools are not even registered until you enable them.

  • Deleting, merging, changing visibility and changing permissions require an informed confirmation: Claude Code asks you directly (MCP elicitation) or the call must carry a confirmation token that Claude may only send after you agreed.

  • Local git operations run without a shell and with validated arguments; file uploads are restricted to the working directory.

Details: SECURITY.md and docs/ARCHITECTURE.md.

Troubleshooting

Symptom

Fix

NOT_CONFIGURED

Configure URL and token via /plugin → gitea → Configure, then /reload-plugins.

UNAUTHORIZED

Token invalid, expired or revoked — create a new one.

FORBIDDEN … scope

The token lacks a scope; create one with the scope named in the message.

TLS_ERROR

Private CA: set CA certificate file or Trust the OS CA store.

REDIRECT_BLOCKED

Configure the final canonical URL (scheme, host, sub path).

PERMISSION_DENIED

The operation level is disabled in the plugin options.

UNSUPPORTED

Your Gitea version lacks that API; connection_test lists supported features.

MCP server not starting

Check node --version (≥ 22.19) and claude mcp list; set GITEA_LOG_LEVEL=debug for details.

More: docs/INSTALLATION.md.

Development

npm ci
npm run check            # typecheck, lint, format, docs, unit + MCP tests, build, smoke test
npm run gitea:up         # isolated Gitea + Actions runner in Docker (127.0.0.1 only)
npm run test:integration # exercises every tool against it and verifies each request against the OpenAPI spec
npm run gitea:down
claude --plugin-dir ./plugin   # try the local build

Architecture: docs/ARCHITECTURE.md · Contributing: CONTRIBUTING.md · Changes: CHANGELOG.md

License

Apache License 2.0. Gitea is a trademark of its respective owners; this project is not affiliated with Gitea or Anthropic.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    An MCP server providing comprehensive Gitea API coverage with 186 tools for managing repositories, issues, pull requests, and CI/CD workflows. It enables autonomous AI agents to perform complex development and administrative tasks directly through a Gitea instance.
    7
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A local MCP server that connects Claude directly to your Gitea instance, enabling management of repositories, issues, pull requests, files, and commit history.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    This MCP server enables users to interact with Forgejo instances through a finite, audited catalog of 33 tools covering users, repositories, issues, pull requests, and more, with explicit write controls and verified result envelopes.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables Claude and other AI agents to manage Bitbucket Cloud repositories, pull requests, branches, tags, commits, diffs, files, and pipelines through a secure local MCP server with read and write tools.
    MIT