# Gitea MCP

> Gitea MCP connects your self-hosted Git instance directly to any AI agent. You can manage repositories, track issues, and audit pull requests—all from conversation. Quickly list projects, check organization details, or verify branch protection rules without leaving your chat window.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Tags:** git, version-control, self-hosted, code-hosting, issue-tracking

## Description

Connect your private Gitea instance using this MCP, and you'll get full control over project collaboration right through any AI client. Instead of logging into the web interface, you talk to your agent and ask it to perform tasks like checking repository details or listing all active issues in an organization. You can track everything from pull request status to user profile information using natural language.

It lets your agent list every accessible repository with its clone URL and visibility state. Need to audit team progress? Your agent pulls up a comprehensive list of issues across multiple repos, letting you see labels, states, and assignees at a glance. This powerful connection is managed through the Vinkius catalog, giving you access to Gitea's full suite of developer tools without ever having to click away from your IDE or chat window.

## Tools

### list_repos
Lists every repository you can see, providing names, descriptions, clone URLs, star counts, and visibility status for each one.

### get_repo
Retrieves the complete set of details for a single specified Gitea repository.

### list_issues
Generates a list of all current issues within a specific repository, including their status, labels, and who is assigned them.

### get_issue
Fetches the full content and detailed metadata for one specified issue number.

### list_orgs
Provides a list of all organizations you are currently a member of within Gitea.

### get_org
Retrieves detailed information about a specific organization, including its website and total repo count.

### list_org_repos
Lists every repository that belongs to a specified Gitea organization.

### list_pulls
Gathers all pull requests for a given repo, letting you check if they are open, closed, or merged.

### list_branches
Lists every branch in a repository and provides associated commit SHAs to confirm its history.

### get_me
Extracts your own authenticated Gitea user profile identity, including your email and administrative status.

## Prompt Examples

**Prompt:** 
```
List the last 5 repositories I worked on
```

**Response:** 
```
Retrieving your repositories... I found 5 recent projects including 'web-app', 'api-service', and 'infra-config'. Highlights: 'web-app' (Default: main, Visibility: private). Which one would you like to see the issues for?
```

**Prompt:** 
```
Show me open pull requests for repo 'api-service'
```

**Response:** 
```
Retrieving PRs for 'api-service'... I found 2 open pull requests: #101 'Add OAuth support' and #102 'Fix rate-limiting bug'. Would you like the review status or branch details for either of these?
```

**Prompt:** 
```
List all issues in organization 'Eng-Team'
```

**Response:** 
```
Retrieving organization issues... I found 15 issues across the 'Eng-Team' repositories. Most are in 'core-engine' and 'frontend-v2'. Would you like me to filter them by labels or assignees?
```

## Capabilities

### View all project repositories
List every repository you have access to and get detailed info like the clone URL, star count, and if it's private or public.

### Track issues and tasks
See a list of all open issues in any repo, checking numbers, labels, states, and who is assigned to them. You can also pull the full text body for deep analysis.

### Audit code review requests
List every pull request—open, closed, or merged—and check which branches they connect from and to.

### Manage organizational structure
See all organizations you belong to, pulling metadata like the organization's website and total repository count.

### Check branch rules and status
List every branch in a repo and verify commit SHAs and whether specific protection rules are active on that branch.

## Use Cases

### Auditing an entire feature set
A developer needs to confirm that all related components are ready for merge. They ask the agent to list pull requests for 'auth-service', then use a tool to get full details on #45, and finally check the branch protection rules using `list_branches`. The entire audit happens in one chat thread.

### Onboarding new team members
A manager needs an overview of all projects. They ask the agent to list organizations (`list_orgs`), then select 'Marketing', and finally request a list of all repositories belonging to that org using `list_org_repos`. This gives them instant scope visibility.

### Diagnosing stale tasks
A product manager notices delays. They ask the agent to list issues across 'Eng-Team' and then filter those results by label or assignee, immediately pinpointing where work is stuck.

## Benefits

- You stop context switching. Instead of opening the web UI to check repository details or listing all repos, you just ask your agent, and it pulls out clone URLs and visibility status immediately.
- Issue tracking becomes instant. Asking for a list of issues lets you see numbers, states, labels, and assignees across multiple projects without clicking through dashboards.
- Code review auditing is simplified. Your agent can list all pull requests, letting you monitor if they're open or merged and verifying the source/target branches instantly.
- Organization visibility improves. Use this MCP to identify all organizations you belong to and get high-level metadata about them, like their location and total repo count.
- Compliance checks are easier. You can list every branch in a repository and check its protection rules or verify commit SHAs just by asking your AI client.

## How It Works

The bottom line is you get Git project oversight without needing to open a browser tab.

1. Subscribe to this MCP, then provide your Gitea Instance URL and Access Token (you find the token in your Gitea User Settings > Applications).
2. Your agent establishes a secure connection, allowing it read access to your code data.
3. You talk to your AI client—it uses the connection to pull repository lists, issue statuses, or organization details on demand.

## Frequently Asked Questions

**How do I use Gitea MCP to check if a repo is private?**
Use `list_repos`. The tool returns full details for every repository you can see, including a status flag that shows whether it's marked as 'private' or 'public'.

**Can I track issues in an organization using Gitea MCP?**
Yes. First, use `list_orgs` to find the correct organization ID, and then use tools like `list_org_repos` followed by `list_issues` to gather all relevant task data.

**Does Gitea MCP work for reading PR details?**
Absolutely. The `list_pulls` tool gathers all open, closed, or merged pull requests in a repository so you can audit the review status.

**What is the best way to verify branch rules with Gitea MCP?**
Use `list_branches`. This function lists every branch and allows you to verify commit SHAs and check if specific branch protection rules are in place for auditing purposes.

**Is the user profile visible via Gitea MCP?**
Yes. You can run the `get_me` tool, which extracts your authenticated profile identity, giving you access to your login name, email, and admin status.