Forgejo MCP Server
MIRROR ONLY!! This Model Context Protocol (MCP) server provides tools and resources for interacting with the Forgejo (specifically Codeberg.org) REST API.
goern
README
Forgejo MCP Server
<div style="position: relative; float: right;"> <img src="images/forgejo-mcp_small.png" alt="forgejo mcp server logo"/> </div>
This is a Model Context Protocol (MCP) server that provides tools and resources for interacting with Forgejo REST API, for example the one hosted at https://codeberg.or/.
Features
- List and get repositories
- List, get, and create issues
- Get user information
- Dependency injection for modular architecture
- Robust error handling and request processing
- Caching layer for improved performance
- Comprehensive unit and integration tests
- Enhanced Forgejo issue management commands
Installation
-
Clone this repository
-
Install dependencies:
npm install -
Build the project:
npm run build
Configuration
To use this MCP server, you need to:
-
Generate a Codeberg API token:
Option 1: Use the helper script:
npm run get-tokenThis will open your browser to the Codeberg applications settings page.
Option 2: Manually navigate to:
- Go to your Codeberg settings: https://codeberg.org/user/settings/applications
- Generate a new token with appropriate permissions (repo, user)
- Copy the token (it will only be shown once!)
-
Configure the API token:
Option 1: Using a .env file (recommended for development):
Copy the
.env.samplefile to.envin the project root and add your token:cp .env.sample .envThen edit the
.envfile to add your Codeberg API token:CODEBERG_API_TOKEN=your_token_hereOption 2: Using the MCP settings file:
For VSCode, edit the MCP settings file located at:
- Windows:
%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\mcp_settings.json - macOS:
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json - Linux:
~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json
Add the following configuration (a sample file is provided at
mcp-settings-sample.json):{ "mcpServers": { "codeberg": { "command": "node", "args": ["/absolute/path/to/mcp-codeberg/build/index.js"], "env": { "CODEBERG_API_TOKEN": "your-api-token-here" }, "disabled": false, "alwaysAllow": [] } } } - Windows:
Running the Server
The MCP server can be run in two modes:
Stdio Mode (Default)
This is the default mode used by MCP clients like VSCode.
npm start
# or
node build/index.js
HTTP Mode
You can also run the server in HTTP mode, which starts a web server that provides information about the MCP server.
npm run start:http
# or
node build/index.js --sse --port 3000 --host localhost
Command line options:
--sse: Enable HTTP mode (default: false)--port: Port to use for HTTP mode (default: 3000)--host: Host to bind to for HTTP mode (default: localhost)--help: Show help information
Example:
# Run in HTTP mode on port 8080
node build/index.js --sse --port 8080
# Run in HTTP mode binding to all interfaces
node build/index.js --sse --host 0.0.0.0
# Show help information
node build/index.js --help
The HTTP server will look something like

Available Tools
list_repositories
Lists repositories for a user or organization.
Parameters:
owner: Username or organization name
Example:
{
"owner": "username"
}
get_repository
Gets details about a specific repository.
Parameters:
owner: Repository ownername: Repository name
Example:
{
"owner": "username",
"name": "repo-name"
}
list_issues
Lists issues for a repository.
Parameters:
owner: Repository ownerrepo: Repository namestate: Issue state (open, closed, all) - optional, defaults to "open"
Example:
{
"owner": "username",
"repo": "repo-name",
"state": "open"
}
get_issue
Gets details about a specific issue.
Parameters:
owner: Repository ownerrepo: Repository namenumber: Issue number
Example:
{
"owner": "username",
"repo": "repo-name",
"number": 1
}
create_issue
Creates a new issue in a repository.
Parameters:
owner: Repository ownerrepo: Repository nametitle: Issue titlebody: Issue body
Example:
{
"owner": "username",
"repo": "repo-name",
"title": "Bug: Something is not working",
"body": "Detailed description of the issue"
}
get_user
Gets details about a user.
Parameters:
username: Username
Example:
{
"username": "username"
}
Available Resources
Current User Profile
URI: codeberg://user/profile
Repository Information
URI Template: codeberg://repos/{owner}/{repo}
Repository Issues
URI Template: codeberg://repos/{owner}/{repo}/issues
User Information
URI Template: codeberg://users/{username}
Development Costs
up until commit 6ae7ebe1030d372646e38b59e4361d698ba16fc3 the cost has been:
Tokens i/o: 3.4m/28.3k
Context Window: 85.9k of 200.0k
API Cost: $2.1752
Model: claude-3.7-sonnet via openrouter.ai
License
GPL-3.0-or-later
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor
Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.
Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.