Skip to main content
Glama

gitea-mcp

MCP (Model Context Protocol) server for Gitea, a self-hosted Git service. Exposes the Gitea API v1 as MCP tools, enabling Claude Code and other MCP clients to manage repositories, issues, pull requests, and more.

Setup

1. Install dependencies and build

npm install
npm run build

2. Configure environment variables

Variable

Description

GITEA_URL

Base URL of your Gitea instance (e.g., https://gitea.example.com)

GITEA_TOKEN

API token from Gitea

Generate a token in Gitea under Settings > Applications > Access Tokens.

3. Register with Claude Code

Add to your Claude Code MCP config:

{
  "mcpServers": {
    "gitea": {
      "command": "node",
      "args": ["/path/to/gitea-mcp/dist/index.js"],
      "env": {
        "GITEA_URL": "https://gitea.example.com",
        "GITEA_TOKEN": "your-token"
      }
    }
  }
}

Related MCP server: gitea-mcp-server

Tool Reference

Tools are grouped by domain with an action parameter.

Tool

Actions

gitea_repos

search, get, create_user, create_org, delete, list_branches, get_branch, create_branch, list_tags, list_commits, get_contents, create_file, update_file, delete_file, list_releases, create_release, list_forks, create_fork, list_topics, list_collaborators, list_hooks

gitea_issues

list, get, create, update, list_comments, create_comment, list_labels, add_labels, list_milestones, create_milestone, list_repo_labels, create_repo_label

gitea_pulls

list, get, create, update, merge, list_reviews, create_review, get_diff, list_files, list_commits

gitea_users

me, get, search, list_repos, list_my_repos, list_starred, list_my_starred, list_followers, list_following

gitea_orgs

list_my, get, create, update, list_repos, list_members, list_teams, list_labels, list_hooks

gitea_notifications

list, list_repo, mark_read, mark_repo_read

gitea_admin

list_users, create_user, delete_user, list_orgs, list_cron_tasks, run_cron_task, version, settings, gitignore_templates, license_templates, render_markdown

Usage Examples

# Search for repositories
"Search for repos matching 'webapp' on my Gitea instance"

# Create a pull request
"Create a PR from feature-branch to main on owner/repo"

# List issues
"Show me open issues on owner/repo"

Development

npm run dev    # Watch mode (recompile on changes)
npm run build  # One-time build
npm start      # Run the MCP server

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      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
      B
      maintenance
      Provides ~200 auto-generated tools and resources for LLM agents to interact with Gitea and Forgejo instances via the Model Context Protocol.
      1
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI agents to read repositories, manage issues, inspect CI/CD workflow runs, create branches, commit files, and open pull requests on a self-hosted Gitea instance.
      7
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Enables Claude to manage repositories, files, branches, commits, issues, pull requests, labels, releases, and CI workflows on Forgejo and Gitea instances, including Codeberg and self-hosted or private deployments, through the shared /api/v1 REST API. It runs locally over stdio with token-based auth and an optional read-only mode that hides all write tools.
      49
      MIT