# Forgejo / Codeberg / Gitea

> Forgejo / Codeberg / Gitea is an open-source MCP server for developer tools. Rust MCP server for Forgejo, Codeberg and Gitea: repos, issues, PRs and CI, writes opt-in. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux
- **Repository:** https://github.com/brechanbech/forgejo-mcp-rs
- **MCP Registry name:** io.github.brechanbech/forgejo-mcp-rs
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

forgejo-mcp-rs talks directly to the Forgejo and Gitea REST API through its own small client, with no third-party forge SDK in the path that holds your token. It is read-only by default and covers the authenticated user, repositories, issues, pull requests, search, organisations, notifications, comments, reviews and Actions runs.

Writes are gated twice. A separate write token must be supplied, and a deliberate time-boxed write mode (10 minutes by default, 60 at most) must be switched on. The read token is mandatory and must differ from the write token. Credentials for push mirrors and repository migration come from environment variables rather than tool arguments, and release uploads are disabled until an upload directory is set.

It detects whether an instance is Forgejo or Gitea from its version string and normalises the differing Actions endpoints into one shape. It speaks MCP 2026-07-28 and falls back to 2024-11-05 over stdio, and runs on macOS and Linux with Windows untested. The default instance is codeberg.org.

## Features

- **Read-only by default:** Reads users, repos, issues, PRs, reviews, search and CI runs.
- **Guarded writes:** Writes need a separate token and a time-boxed write mode.
- **Forgejo and Gitea:** Detects the flavour and normalises Actions differences.
- **Own API client:** Uses an in-house client with no third-party forge SDK.
- **CI control:** Dispatches, cancels and reruns workflow runs when writes are on.
- **Secrets kept out of chat:** Mirror and migration credentials come from environment variables.

## Good for

- Summarise open issues and pull requests on Codeberg
- Review a pull request diff and leave a review
- Check why a CI run failed
- Create a branch and open a PR from an agent

## Install

### Claude Code (Terminal)

```sh
claude mcp add forgejo-mcp-rs -- npx -y forgejo-mcp-rs
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "forgejo-mcp-rs": {
      "command": "npx",
      "args": [
        "-y",
        "forgejo-mcp-rs"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "forgejo-mcp-rs": {
      "command": "npx",
      "args": [
        "-y",
        "forgejo-mcp-rs"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "forgejo-mcp-rs": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "forgejo-mcp-rs"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "forgejo-mcp-rs": {
      "command": "npx",
      "args": [
        "-y",
        "forgejo-mcp-rs"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "forgejo-mcp-rs": {
      "command": "npx",
      "args": [
        "-y",
        "forgejo-mcp-rs"
      ]
    }
  }
}
```

## Tools

- `create_repo`: Creates a repository; write mode only.
- `edit_repo`: Edits a repository; write mode only.
- `create_branch`: Creates a branch; write mode only.
- `delete_branch`: Deletes a branch; write mode only.
- `create_issue`: Creates an issue; write mode only.
- `edit_issue`: Edits an issue; write mode only.
- `comment_on_issue`: Comments on an issue; write mode only.
- `create_pull_request`: Opens a pull request; write mode only.
- `create_pull_request_review`: Submits a pull request review; write mode only.
- `merge_pull_request`: Merges a pull request; write mode only.
- `create_or_update_file`: Creates or updates a file; write mode only.
- `delete_file`: Deletes a file; write mode only.
- `delete_repo`: Deletes a repository; write mode only.
- `migrate_repo`: Migrates a repository from a source instance; write mode only.
- `dispatch_workflow`: Dispatches a workflow; write mode only.
- `cancel_workflow_run`: Cancels a workflow run; write mode only.
- `rerun_workflow`: Reruns a workflow; write mode only.

## FAQ

### Is it read-only?

By default yes; writes need a separate token plus an active write mode.

### How long does write mode last?

10 minutes by default and up to 60.

### Which servers work?

Forgejo, Codeberg and Gitea.

### Does it support Windows?

Windows is untested; macOS and Linux are supported.

### Is Forgejo / Codeberg / Gitea free?

Yes. Forgejo / Codeberg / Gitea is open source, so you can use and self-host it for free.

### How do I add Forgejo / Codeberg / Gitea to Claude Code?

Run this command in your terminal: claude mcp add forgejo-mcp-rs -- npx -y forgejo-mcp-rs

### What are the best alternatives to Forgejo / Codeberg / Gitea?

The closest alternatives to Forgejo / Codeberg / Gitea are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/forgejo-codeberg-gitea
