forgejo-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Port to listen on for http mode; must equal the domain's target port on Railway | 3000 |
| TRANSPORT | No | Transport mode: 'stdio' for local use, 'http' for Railway deployment | stdio |
| FORGEJO_URL | No | The URL of the Forgejo instance, e.g. https://forgejo.example.org | |
| FORGEJO_TOKEN | No | The Forgejo token (required for stdio mode; must not be set for http mode) | |
| FORGEJO_DEFAULT_REPO | No | Optional default repository to avoid repeating on every call | |
| FORGEJO_DEFAULT_OWNER | No | Optional default owner to avoid repeating on every call |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| forgejo_whoamiA | Returns the Forgejo account the token used for this call belongs to. No parameters. Returns: { id, login, full_name, email } Use it to confirm a token is valid and which identity writes will be attributed to, before creating an issue or a pull request. Errors: 401 if the token is missing, expired or revoked; 403 if it lacks the 'read:user' scope. |
| forgejo_list_reposA | Lists the repositories the token can reach, most recently updated first. Parameters: page, limit, response_format. Returns: { total, count, page, limit, has_more, repos: [{ full_name, private, fork, default_branch, description, updated_at, html_url }] } Use it to discover the owner/repo values to pass to the other tools when they are unknown. Errors: 403 if the token lacks the 'read:user' scope. |
| forgejo_list_issuesA | Lists a repository's issues. Pull requests are excluded (use forgejo_list_pull_requests). Parameters:
Returns: { total, count, page, limit, has_more, issues: [{ number, title, state, author, labels, comments, created_at, updated_at, html_url }] } Examples:
|
| forgejo_get_issueA | Returns a full issue: description, metadata and, on request, its comments. Parameters: owner, repo, number (required), include_comments (bool, default true), response_format. Returns: { number, title, state, author, labels, assignees, body, html_url, comments: [{ author, body, created_at }] } Also works with a pull request number: issues and PRs share one numbering space in Forgejo. Errors: 404 if the number does not exist in this repository. |
| forgejo_create_issueA | Opens a new issue. Write operation: requires the 'write:issue' scope. Parameters:
Returns: { number, title, state, html_url, unresolved_labels } The issue is attributed to the token's owner — check with forgejo_whoami if unsure. |
| forgejo_comment_issueA | Adds a comment to an issue or a pull request (shared numbering). Parameters: owner, repo, number (required), body (string, required), response_format. Returns: { id, author, created_at, html_url } Write operation: requires the 'write:issue' scope. The comment is attributed to the token's owner and cannot be deleted by this tool. |
| forgejo_update_issueA | Changes an existing issue: state, title, body, labels or assignees. Write operation: requires the 'write:issue' scope. Parameters:
At least one changing field is required; omitted fields are left untouched. Returns: { number, title, state, labels, assignees, html_url, unresolved_labels } Examples:
To add to a discussion without altering the issue, use forgejo_comment_issue instead. Also accepts a pull request number, but only its issue-side fields change — it cannot merge or close a PR's branch. |
| forgejo_list_pull_requestsA | Lists a repository's pull requests. Parameters: owner, repo, state ('open' | 'closed' | 'all', default 'open'), page, limit, response_format. Returns: { total, count, page, limit, has_more, pull_requests: [{ number, title, state, merged, draft, head, base, author, html_url }] } Note: a PR closed without merging and a merged PR both report state='closed' — rely on the 'merged' field. |
| forgejo_get_pull_requestA | Returns a pull request: description, merge state, statistics and, on request, the unified diff. Parameters: owner, repo, number (required), include_diff (bool, default false), response_format. Returns: { number, title, state, merged, mergeable, head, base, additions, deletions, changed_files, body, html_url, diff? } The diff is truncated past the context limit and the cut is explicitly reported in the returned text. Tip: leave include_diff=false for a status check — it saves a lot of context. |
| forgejo_create_pull_requestA | Opens a pull request between two branches of the repository. Write operation: requires the 'write:repository' scope. Parameters:
Returns: { number, title, state, head, base, html_url } Prerequisite: the 'head' branch must exist server-side — push before calling. Errors: 409 if a PR is already open for this branch pair; 404 if the head or base branch does not exist; 422 if the request is otherwise rejected. |
| forgejo_list_branchesA | Lists the repository's branches with their latest commit and protection status. Parameters: owner, repo, page, limit, response_format. Returns: { total, count, page, limit, has_more, branches: [{ name, protected, commit_sha, commit_message }] } Use it to confirm a branch exists before opening a pull request with forgejo_create_pull_request. |
| forgejo_list_commitsA | Lists a branch's commits, newest first. Parameters: owner, repo, branch (string, optional — the repository's default branch when omitted), page, limit, response_format. Returns: { total, count, page, limit, has_more, commits: [{ sha, message, author, date, html_url }] } Examples:
|
| forgejo_get_fileA | Reads a text file's contents, or lists a directory, at a given revision. Parameters:
Returns, for a file: { type: 'file', path, size, sha, content, truncated, html_url } Returns, for a directory: { type: 'directory', path, entries: [{ name, type, size }] } Binary files are not decoded: their size and SHA are returned with an explicit note. Contents are truncated past the context limit and the cut is reported. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/Birdiz/forgejo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server