Forgejo MCP Server
Provides tools to interact with Forgejo repositories, including listing repositories, getting repository information, managing issues (list and create), and reading file contents.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Forgejo MCP Serverlist my repositories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Forgejo MCP Server
A Model Context Protocol (MCP) server that provides Claude Desktop with tools to interact with Forgejo repositories.

Features
List repositories
Get repository information
List issues with filtering by state
Create new issues
Read file contents from repositories
List, view, and create pull requests
Related MCP server: forgejo-mcp
Installation
git clone https://github.com/nsvk13/forgejo-mcp-server
cd forgejo-mcp-server
npm install
npm run buildConfiguration
Environment Variables
Set the following environment variables:
FORGEJO_BASE_URL: Your Forgejo instance URL (e.g.,https://your-forgejo.com)FORGEJO_TOKEN: Your Forgejo API token
Generating a Forgejo API Token
Go to your Forgejo instance
Navigate to Settings → Applications
Generate a new token with appropriate permissions
Copy the token for use in configuration
Claude Desktop Configuration
Add the following to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"forgejo": {
"command": "node",
"args": ["/absolute/path/to/forgejo-mcp-server/dist/index.js"],
"env": {
"FORGEJO_BASE_URL": "https://your-forgejo-instance.com",
"FORGEJO_TOKEN": "your_api_token_here"
}
}
}
}Replace the path and credentials with your actual values.
Usage
After configuration, restart Claude Desktop. You can then use commands like:
"List my Forgejo repositories"
"Show issues in repository owner/repo-name"
"Create an issue in repository with title 'Bug report'"
"Show the contents of README.md from repository"
Available Tools
list_repositories: Get list of user repositoriesget_repository: Get detailed repository informationlist_issues: List issues with optional state filteringcreate_issue: Create a new issueget_file_content: Read file contents from repositorylist_pull_requests: List pull requests with optional state filteringget_pull_request: Get a single pull request by its numbercreate_pull_request: Open a new pull request from a head branch into a base branch
Development
# Build the project
npm run build
# Run in development mode
npm run devRequirements
Node.js 18 or higher
TypeScript
Valid Forgejo instance with API access
Available Tools
8 toolscreate_issueC
Create a new issue
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Issue description | |
| repo | Yes | Repository name | |
| owner | Yes | Repository owner | |
| title | Yes | Issue title |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosing behavioral traits. It only states the basic action, omitting critical details like required permissions, side effects, or idempotency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (one sentence) but under-specified for the tool's complexity. It lacks essential details that could be added without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Without output schema or annotations, the description fails to explain return values, error cases, or required context like authentication. It is insufficient for an agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% as each parameter has a description in the input schema. The description adds no additional meaning beyond the schema, meeting the baseline but not enhancing understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Create a new issue' clearly states the verb and resource, distinguishing it from siblings like create_pull_request. The param names (owner, repo, title) strongly imply a GitHub issue context, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. It does not specify when not to use it or mention any prerequisites, which is insufficient for an agent to make informed choices.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_pull_requestB
Open a new pull request from a head branch into a base branch
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | Target branch to merge into | |
| body | No | Pull request description | |
| head | Yes | Source branch (the branch with your changes) | |
| repo | Yes | Repository name | |
| owner | Yes | Repository owner | |
| title | Yes | Pull request title |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations; the description only says 'Open a new pull request' without disclosing side effects, permissions, or error conditions. It lacks behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no wasted words, but could benefit from more detail without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No annotations or output schema; the description is too brief to fully inform about mutation behavior, response, or workflow. Incomplete for a 6-parameter tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so each parameter is well-described in the schema. The tool description adds no additional meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Open a new pull request' with the source and target branches, distinguishing it from sibling tools like create_issue and list_pull_requests.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, no prerequisites or context provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_file_contentC
Get file content from repository
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch or commit (defaults to main) | main |
| path | Yes | File path | |
| repo | Yes | Repository name | |
| owner | Yes | Repository owner |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It implies a read operation but does not state that it is non-destructive, or disclose any constraints like size limits, encoding, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise single sentence with no filler. Could be slightly expanded without losing conciseness to include behavior notes.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and annotations, the description is insufficient. It does not explain the return format (raw text, JSON, base64?), error handling, or rate limits.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% parameter descriptions, so the description adds minimal value beyond that. The description does not elaborate on parameter behavior (e.g., what happens if ref is invalid).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (get) and resource (file content from repository), distinguishing it from sibling tools focused on issues, PRs, and repository metadata. However, it could be more specific (e.g., 'raw text content').
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, such as when to use a specific branch or commit. No mention of prerequisites or context for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pull_requestB
Get a single pull request by its number
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name | |
| index | Yes | Pull request number | |
| owner | Yes | Repository owner |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears the full burden of disclosing behavioral traits. It only states the primary action without mentioning any side effects, safety profile, or return structure. It does not indicate whether the operation is read-only or what happens if the PR does not exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no wasted words. It front-loads the verb and resource. However, it is slightly under-specified for a tool with three parameters and no output schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema, the description should clarify what is returned (e.g., the full pull request object). It does not. The tool is simple but the description leaves the agent guessing about the result structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameters are already documented. The description adds minimal value beyond 'by its number' which aligns with the 'index' parameter. It does not enrich understanding of the owner or repo parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get'), the resource ('pull request'), and the selection criterion ('by its number'). It effectively differentiates from sibling tools like list_pull_requests (which returns multiple) and create_pull_request (which creates).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is given on when to use this tool versus alternatives. It does not mention that it is best used when the pull request number is known, nor does it advise against using it when listing is sufficient. Siblings exist but no distinction is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_repositoryC
Get repository information
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name | |
| owner | Yes | Repository owner |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only states 'get information', implying a read operation, but provides no details on authentication, rate limits, or what exact data is returned (e.g., full repository object vs summary).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is only two words, which is overly terse. While concise, it lacks a complete sentence and fails to provide any context, making it under-specified rather than efficiently written.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and only two simple parameters, the description is incomplete. It does not describe the return format, error conditions, or any additional context such as pagination or filtering, leaving the agent with insufficient information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with both 'owner' and 'repo' having basic descriptions. The tool description adds no additional meaning beyond the schema, which is adequate but not helpful. Baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get repository information' clearly indicates a read operation on a single repository, but it is vague about what specific information is returned. It distinguishes from siblings like 'create_issue' or 'list_repositories' by the action and resource, but fails to specify the scope of the returned data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as 'list_repositories' for multiple repos or 'get_file_content' for specific file details. The description does not mention prerequisites or use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_issuesC
Get list of repository issues
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name | |
| owner | Yes | Repository owner | |
| state | No | Issue state | open |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. The description only says 'Get list of repository issues' with no mention of pagination, rate limits, read-only nature, authentication requirements, or return format. This is insufficient for an agent to understand the tool's behavior beyond its basic function.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at one sentence. While it could be improved with more context, it is not verbose and focuses on the core purpose. Every word earns its place, but it lacks any structure for readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has three parameters (fully described in schema), no output schema, and no annotations, the description is too minimal. It does not explain return values, pagination, ordering, or how it differs from similar list tools. The agent lacks enough context to properly use this tool in complex scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% at both parameter level and for enum. The description adds no additional meaning beyond what the schema already provides (e.g., 'owner', 'repo', 'state'). Baseline score of 3 is appropriate since schema fully documents parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Get list of repository issues', which clearly identifies the action (get list) and the resource (repository issues). This distinguishes it from sibling tools like create_issue, get_pull_request, etc., which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. For example, it does not mention that this tool lists issues without creating them, nor does it specify that it differs from list_pull_requests or search functionality. No explicit when-to-use or when-not-to-use information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_pull_requestsC
Get list of repository pull requests
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name | |
| owner | Yes | Repository owner | |
| state | No | Pull request state | open |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description bears full burden. It implies read-only but lacks details on pagination, response format, or any rate limits. Minimal behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence conveys the core action. It is appropriately concise but could include a brief note about optional filtering without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, so return format is undefined. The description fails to explain what the list contains (e.g., PR summaries, full objects). Agents may struggle to interpret the response.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so all parameters are already documented. The description adds no extra meaning beyond 'list pull requests', providing no additional context for parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves pull requests for a repository. It distinguishes from siblings like 'get_pull_request' (single) and 'list_issues' (different resource). However, it does not explicitly mention the optional state filter, which is only in the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like 'get_pull_request' for a single PR or 'list_issues' for issues. The agent must infer usage from context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_repositoriesB
Get list of user repositories
| Name | Required | Description | Default |
|---|---|---|---|
| username | No | Username (optional, defaults to current user) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden of behavioral disclosure. It only states the basic function; it does not mention authentication requirements, pagination behavior, scope (public vs private repos), or any side effects. This is insufficient for safe agent decision-making.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at 4 words, with no unnecessary information. Every part is functional, though minimal.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and annotations, the description should provide more context about the return format, pagination, and access control. It is minimal but not complete enough for an agent to use correctly without guessing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes the single parameter 'username' with 100% coverage. The description adds no additional meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('get list') and resource ('user repositories'), which distinguishes it from sibling tools like create_issue or get_repository. The verb-resource combination is specific and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. However, the sibling set (e.g., get_repository for single repo, create_issue for issues) implies that this tool is for listing all repositories, but no exclusions or context are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct resource (issue, PR, file, repository) with specific actions, so there is no ambiguity. An agent can clearly differentiate between creating issues, listing pull requests, or getting file content.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., create_issue, get_file_content), making them predictable and easy to understand.
With 8 tools covering core operations for issues, pull requests, repositories, and file content, the scope is well-balanced for a Git forge server—neither too sparse nor overwhelming.
The tool set covers create and read operations for issues and PRs, plus repository and file access, but notably lacks update/delete operations (e.g., update_issue, merge_pull_request) and repository creation, leaving notable gaps for full lifecycle management.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP Server for JFrog, providing tools for development and artifact management.
A MCP server built for developers enabling Git based project management with project and personal…
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows integration with Claude Desktop by creating and managing custom tools that can be executed through the MCP framework.88
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server for Forgejo and Gitea instances, enabling AI assistants to interact with repositories, issues, pull requests, and more.1002849MIT
- AlicenseNot gradedqualityBmaintenanceA self-hosted MCP server and dashboard that provides governed, auditable AI access to a Forgejo instance, with tools for managing repositories, issues, pull requests, and more.2Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nsvk13/forgejo-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server