Summary
Let your AI read your Gitea: find repositories, triage issues and pull requests with their comments, files, diffs and reviews, check releases and organizations, and read branches, commits and files. gitea.com or your own Gitea server, with an access token. Read-only.
Guided setup
Connect Gitea to Gemini in 2 minutes
Start a free trial on AnythingMCP Cloud, connect Gitea in the guided setup, then add your MCP URL to Gemini. No code and no server to run.
No credit card · 7-day trial · Self-host alternative available
Try asking
Example prompts for Gitea
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Gitea, paste your credentials, mint an MCP API key — done. No Docker, no
git clone, no local server.
Gitea + Gemini
Let your AI read your Gitea: find repositories, triage issues and pull requests with their comments, files, diffs and reviews, check releases and organizations, and read branches, commits and files. gitea.com or your own Gitea server, with an access token. Read-only.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
GITEA_URL, GITEA_TOKEN
Step 1 — Get credentials
Setting up takes about 2 minutes. You need an account on gitea.com or on your own Gitea server, and an access token with Read permission for Repository, Issue, Organization and User.
- In Gitea, click your avatar, then Settings, then Applications. Under Manage Access Tokens, type a name (for example "AnythingMCP") and set Repository, Issue, Organization and User to Read (the scopes
read:repository,read:issue,read:organizationandread:user). On a Gitea version without token scopes, the token gets the full access of its user. - Click Generate Token and copy the token right away: Gitea shows it only once. Paste only the token into
GITEA_TOKEN, without the wordtokenorBearerin front. The connector addstokenitself. - Set
GITEA_URLto the address you open Gitea at, for examplehttps://gitea.comorhttps://git.example.com, without/api/v1and without a trailing slash. If Gitea runs under a sub path, keep it (https://example.com/gitea). - Install the connector and run
gitea_get_current_user: it shows the user the token belongs to and confirms that address and token work.
Read-only: all 30 tools only read. The connector cannot create, change or delete anything in Gitea, and the AI sees exactly what the token's user can see.
What it reads: repositories (searched across the whole instance, or listed for your user, an organization or another user), issues with comments, labels and milestones, pull requests with their changed files, diff, commits and reviews, releases with notes and attached files, organizations with members and teams, branches, commits, the file tree and file contents. gitea_search_issues finds issues and pull requests across all repositories that are assigned to you, created by you or wait for your review.
Repositories and numbers: every repository takes owner (a user or organization) and repo, the two parts of https://host/owner/repo. Issues and pull requests share one number sequence per repository. Gitea treats a pull request as an issue too, so gitea_get_issue and gitea_list_issue_comments also work with a pull request number for its title, labels and conversation, while gitea_get_pull_request, gitea_get_pull_request_files and gitea_get_pull_request_diff give the code side.
Your own server: a Gitea on an internal host (a private IP or an internal name) needs a self-hosted AnythingMCP on the same network, with the hostname in SSRF_ALLOWED_HOSTS, or the outbound guard blocks the call. Forgejo, and Codeberg which runs it, offer the same API v1 routes, so an address such as https://codeberg.org should work too. The connector is written against the Gitea API.
Limits: a Gitea server returns 30 items per page by default and at most 50 (its MAX_RESPONSE_ITEMS setting), so the AI asks for the next page instead of a bigger limit. Pull request diffs and file contents over 200 KB are cut: open the pull request's html_url for the rest.
Common errors: 401 means the token is wrong, expired or deleted, or GITEA_URL points at another server. 403 means the token lacks a scope the call needs (Gitea names it in the message), for example read:issue for issues or read:organization for organizations. 404 means the repository, issue or file does not exist or the user cannot see it: Gitea answers 404 for private resources it hides. 422 names a missing or invalid field.
The connector does not create or edit issues, comments, pull requests, releases, branches or files, does not merge or approve, and does not cover Actions runs and workflows, packages, wikis, notifications, webhooks, deploy keys or administration.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Gemini
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of
YOUR_MCP_API_KEY. - Save the file and restart
gemini. - Run
/mcpinside Gemini CLI (orgemini mcp listin your shell) —anythingmcpshould show as connected. - Start prompting — Gemini CLI can now call the
Giteatools.
Available tools
| Tool | What it does |
|---|---|
gitea_get_current_user | Get the Gitea user the token belongs to: id, login, full_name, email, is_admin and html_url |
gitea_search_repositories | Search the repositories the token can see on the whole instance by keyword, topic, type or archived state: full_name, description… |
gitea_list_my_repositories | List the repositories owned by the token's user, with full_name, description, default_branch, private, archived, stars_count… |
gitea_list_organization_repositories | List the repositories of an organization that the token's user can see: full_name, description, default_branch, private, archived… |
gitea_list_user_repositories | List the repositories owned by a given user that the token's user can see: full_name, description, default_branch, private, archived… |
gitea_get_repository | Get one repository: description, default_branch, private, archived, fork, empty, size, stars_count, forks_count, open_issues_count… |
gitea_list_issues | List a repository's issues with filters: number, title, state, labels, assignees, milestone, comments count, created_at, updated_at and… |
gitea_search_issues | Search issues and pull requests across every repository the token's user can see, or narrow to the ones assigned to, created by, mentioning… |
gitea_get_issue | Get one issue by its number: title, body (Markdown), state, labels, assignees, milestone, due_date, comments count, created_at, closed_at… |
gitea_list_issue_comments | List the comments on an issue, oldest first: id, body (Markdown), user, created_at, updated_at and html_url |
gitea_list_labels | List a repository's labels: id, name, color and description |
gitea_list_milestones | List a repository's milestones: id, title, state, description, due_on, open_issues and closed_issues |
gitea_list_pull_requests | List a repository's pull requests: number, title, state, merged, mergeable, head and base branches, user, labels, created_at, updated_at… |
gitea_get_pull_request | Get one pull request by its number: title, body (Markdown), state, merged, mergeable, head and base (branch, sha, repository), additions… |
gitea_get_pull_request_files | List the files a pull request changes: filename, previous_filename, status (added, modified, deleted, renamed), additions, deletions and… |
gitea_get_pull_request_diff | Read the unified diff of a pull request as plain text, for reviewing the actual changes |
gitea_list_pull_request_commits | List the commits of a pull request: sha, message, author, date and html_url |
gitea_list_pull_request_reviews | List the reviews of a pull request: id, reviewer, state (APPROVED, REQUEST_CHANGES, COMMENT, PENDING), body, comments_count and submitted_at |
gitea_list_releases | List a repository's releases, newest first: tag_name, name, body (release notes in Markdown), draft, prerelease, published_at, the attached… |
gitea_get_latest_release | Get the most recent release that is neither a draft nor a pre-release: tag_name, name, body (release notes), published_at, assets and… |
gitea_get_release_by_tag | Get one release by its tag name: name, body (release notes), draft, prerelease, published_at, assets and html_url |
gitea_list_my_organizations | List the organizations the token's user belongs to: name, full_name, description, visibility and website |
gitea_get_organization | Get one organization: name, full_name, description, website, location, visibility and avatar_url |
gitea_list_organization_members | List the members of an organization that the token's user may see: login, full_name and html_url |
gitea_list_organization_teams | List the teams of an organization: id, name, description, permission, and whether the team covers all repositories |
gitea_list_branches | List a repository's branches: name, the latest commit (id, message, timestamp), protected and who may push |
gitea_list_commits | List the commits of a repository, newest first: sha, message, author, date and html_url |
gitea_get_commit | Get one commit by branch, tag or sha: message, author, committer, date, parents, html_url and, with files, the changed files and stats |
gitea_get_tree | List the files and folders of a repository at a branch, tag or commit: path, type (blob for a file, tree for a folder), mode and size |
gitea_get_file_content | Read a file of a repository as text, at a branch, tag or commit (the default branch when ref is left out) |
FAQ
Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.
Next steps
Was this guide helpful?