Forgejo

v1.0.0Version Controlstable

MIRROR ONLY!! This Model Context Protocol (MCP) server provides tools and resources for interacting with the Forgejo (specifically Codeberg.org) REST API.

forgejomcpai-integration
Share:
67
Stars
0
Downloads
0
Weekly
0/5

What is Forgejo?

Forgejo is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mirror only!! this model context protocol (mcp) server provides tools and resources for interacting with the forgejo (specifically codeberg.org) rest api.

MIRROR ONLY!! This Model Context Protocol (MCP) server provides tools and resources for interacting with the Forgejo (specifically Codeberg.org) REST API.

This server falls under the Version Control and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MIRROR ONLY!! This Model Context Protocol (MCP) server provi

Use Cases

Interact with Forgejo/Codeberg repositories.
Manage code through Forgejo REST API.
Perform Git operations on Forgejo instances.
raohwork

Maintainer

LicenseMozilla Public License 2.0
Languagego
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx forgejo

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Forgejo

The Forgejo MCP server connects AI assistants to Forgejo and Gitea self-hosted Git instances via their REST API, enabling full issue tracking, milestone management, release handling, and pull request review through natural language. It is written in Go and supports both single-user and multi-user deployments, making it suitable for teams running private Codeberg or Gitea instances who want to automate repository workflows without leaving their AI assistant.

Prerequisites

  • A running Forgejo or Gitea instance (self-hosted or Codeberg.org)
  • A personal access token generated at Settings → Applications → Access Tokens with repository and issue permissions
  • Go 1.21+ if building from source, or Docker for the containerized approach
  • An MCP-compatible client such as Claude Desktop
1

Generate a Forgejo API access token

Log in to your Forgejo or Gitea instance, navigate to Settings → Applications → Access Tokens, and create a new token with at minimum repository read and issue read/write permissions. Copy the token value immediately as it will not be shown again.

2

Install the server

Choose one of three installation methods: Docker (recommended for ease), building from source with Go, or downloading a pre-compiled binary from the GitHub Releases page.

# Docker (recommended)
docker run -p 8080:8080 \
  -e FORGEJOMCP_TOKEN="your-token" \
  -e FORGEJOMCP_SERVER="https://your-forgejo.example.com" \
  ronmi/forgejo-mcp http

# Or install from source
go install github.com/raohwork/forgejo-mcp@latest
3

Set environment variables

Configure the two required environment variables: FORGEJOMCP_SERVER pointing to your Forgejo/Gitea base URL, and FORGEJOMCP_TOKEN holding your access token. Setting these as environment variables is preferred over command-line arguments for security.

export FORGEJOMCP_SERVER="https://codeberg.org"
export FORGEJOMCP_TOKEN="your-api-token-here"
4

Add the server to your MCP client configuration

Edit your Claude Desktop (or other MCP client) configuration file to register the Forgejo MCP server. The binary runs in stdio mode by default when invoked without the 'http' subcommand.

{
  "mcpServers": {
    "forgejo": {
      "command": "forgejo-mcp",
      "env": {
        "FORGEJOMCP_SERVER": "https://your-forgejo.example.com",
        "FORGEJOMCP_TOKEN": "your-api-token-here"
      }
    }
  }
}
5

Verify the connection

Restart your MCP client and ask it to list repositories or issues. The server should respond with real data from your Forgejo instance, confirming the token and server URL are correctly configured.

Forgejo Examples

Client configuration

Claude Desktop config using the installed forgejo-mcp binary with environment variables for auth.

{
  "mcpServers": {
    "forgejo": {
      "command": "forgejo-mcp",
      "args": [],
      "env": {
        "FORGEJOMCP_SERVER": "https://codeberg.org",
        "FORGEJOMCP_TOKEN": "xxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Prompts to try

Natural language prompts that demonstrate issue management, PR review, and milestone tracking capabilities.

- "Show me all open critical bug reports in the myorg/myrepo repository"
- "Create a detailed issue about the login timeout bug and leave a follow-up comment with reproduction steps"
- "Analyze recent pull requests in myorg/myrepo and tell me which ones need priority review"
- "Give me a milestone progression report for the v2.0 milestone"
- "List all releases in the myorg/myproject repository"

Troubleshooting Forgejo

Authentication errors or 401 responses when querying the Forgejo API

Verify the FORGEJOMCP_TOKEN value is correct and that the token has not expired. Also confirm that the token has the required repository and issue scopes enabled in the Forgejo settings.

Server cannot connect to the Forgejo instance

Check that FORGEJOMCP_SERVER is set to the correct base URL including the protocol (https://) but without a trailing slash. For self-hosted instances, ensure the server is reachable from the machine running the MCP server.

Binary not found after installing from source

After running 'go install github.com/raohwork/forgejo-mcp@latest', ensure your Go bin directory (usually ~/go/bin) is in your PATH. Run 'export PATH=$PATH:$(go env GOPATH)/bin' to add it.

Frequently Asked Questions about Forgejo

What is Forgejo?

Forgejo is a Model Context Protocol (MCP) server that mirror only!! this model context protocol (mcp) server provides tools and resources for interacting with the forgejo (specifically codeberg.org) rest api. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Forgejo?

Follow the installation instructions on the Forgejo GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Forgejo?

Forgejo works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Forgejo free to use?

Yes, Forgejo is open source and available under the Mozilla Public License 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Version Control MCP Servers

Explore all version control servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "forgejo": { "command": "npx", "args": ["-y", "forgejo"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Forgejo?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides