Forgejo MCP Server

Connect your AI assistant to Forgejo repositories. Manage issues, pull requests, files, and more through natural language.

Local serverstdioGo

What is the Forgejo MCP Server?

Connect your AI assistant to Forgejo repositories. Manage issues, pull requests, files, and more through natural language.

What the server does

  • "List all my repositories"
  • "Create an issue titled 'Bug in login page'"
  • "Show me open pull requests in my-org/my-repo"
  • "Get the contents of README.md from the main branch"
  • "Show me the latest Actions workflow runs in goern/forgejo-mcp"

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
User
get_my_user_infoGet information about the authenticated user
check_notificationsCheck and list user notifications
get_notification_threadGet detailed info on a single notification thread
mark_notification_readMark a single notification thread as read
mark_all_notifications_readAcknowledge all notifications
list_repo_notificationsFilter notifications scoped to a single repository
mark_repo_notifications_readMark all notifications in a specific repo as read
search_usersSearch for users
Repositories
list_my_reposList all repositories you own
get_repoGet a single repository by owner and name
create_repoCreate a new repository
fork_repoFork a repository
edit_repoEdit repository settings. Only fields you pass change; omitted fields are left unchanged. Providing no fields is an error.
search_reposSearch for repositories
Topics
list_repo_topicsList a repository's topics. Bounded by page (default 1) + limit (default 100); returns {topics, page, limit, count}.
set_repo_topicsReplace all topics. topics is a required comma-separated string; an empty string clears. Invalid names are rejected before the request.
add_repo_topicAdd one topic
delete_repo_topicDelete one topic
Branches
list_branchesList all branches in a repository
create_branchCreate a new branch
delete_branchDelete a branch
list_branch_protectionsList a repository's branch protection rules. Bounded by page (1-based) + limit (page size); the response echoes page/limit so callers can fetch the next page.
get_branch_protectionGet a single rule by rule name
create_branch_protectionCreate a rule. Requires branch_name; status_check_contexts is a comma-separated list of required checks (e.g. "ci/build,ci/test").
edit_branch_protectionEdit a rule by rule name. Only fields you pass change; omitted fields are left unchanged.
delete_branch_protectionDelete a rule by rule name
Webhooks
list_repo_hooksList repository webhooks. Bounded by page (default 1) + limit (default 30, no server-imposed ceiling); returns total_count when Forgejo reports X-Total-Count.
get_repo_hookGet a single repository webhook by ID
create_repo_hookCreate a repository webhook. The secret is accepted but never echoed in the response.
edit_repo_hookEdit a repository webhook. Only fields you pass change; omitted fields are left unchanged.
delete_repo_hookDelete a repository webhook by ID
test_repo_hookTrigger a test delivery for a repository webhook — WARNING: triggers a live HTTP delivery
Files
get_file_contentGet the content of a file. Optional start_line/end_line request a 1-indexed inclusive line range (clamps to file extent; ignored when with_metadata=true).
list_repo_contentsList files and directories at a path. path="" lists the repository root. Returns one level; for a full tree use get_repo_tree with recursive=true.
get_repo_treeGet the Git tree. recursive=true returns the complete file tree in one response (subject to the server's tree-endpoint size cap); recursive=false (default) retu
create_fileCreate a new file. Supply exactly one of plain-text content or binary-safe content_base64 (strict standard Base64).
update_fileUpdate an existing file. Supply exactly one of plain-text content or binary-safe content_base64 (strict standard Base64).
delete_fileDelete a file
change_filesAtomically create, update, and delete multiple files in one native Forgejo commit; create/update operations accept content or content_base64.
Commits
list_repo_commitsList commits in a repository
get_commit_statusesList per-context commit statuses for a full 40-character SHA. Bounded by page (default 1) + limit (default 30, maximum 50); returns {sha, statuses, page, limit,
Issues
list_repo_issuesList issues in a repository (page/limit). Optional sort orders server-side: relevance, latest, oldest, recentupdate, leastupdate, mostcomment, leastcomment, nea
search_issuesSearch issues across every repository of one owner (page/limit); returns {issues,page,limit,count,has_next,total_count} — total_count is present only when Forge
get_issue_by_indexGet a specific issue
create_issueCreate a new issue. Optional labels (comma-separated names or IDs), assignees (comma-separated usernames) and milestone (numeric ID) are applied by the same req
add_issue_labelsAdd labels to an issue. labels takes comma-separated label names or numeric IDs; an unrecognised name is an error and nothing is applied.
remove_issue_labelsRemove labels from an issue. labels takes comma-separated label names or numeric IDs.
update_issueUpdate an existing issue (requires numeric milestone ID). due_date sets the deadline (RFC3339); clear_due_date=true removes it. The two are mutually exclusive —
issue_state_changeOpen or close an issue
list_issue_dependenciesList issues the given issue depends on. Bounded by page (1-based) + limit (page size); the response echoes page/limit so callers can fetch the next page.
list_issue_dependentsList issues that depend on the given issue. Bounded by page (1-based) + limit (page size); the response echoes page/limit so callers can fetch the next page.
add_issue_dependencyMake one issue depend on another. The dependency may live in a different repository: optional depends_on_owner/depends_on_repo default to owner/repo.
remove_issue_dependencyRemove a dependency from an issue. For a cross-repo dependency, optional dependency_owner/dependency_repo default to owner/repo.
list_repo_milestonesList milestones with their IDs (use with update_issue)
list_repo_labelsList labels with their IDs. Merges org-level labels for org-owned repos (set include_org_labels=false to opt out). Each entry carries a scope field ("repo" or "
list_org_labelsList organization-level labels with their IDs. The assignment tools accept label names directly, so this is for discovery and for the rare name that exists in b
create_repo_labelCreate a repository label (name, color as 6-digit hex, optional description). Returns the numeric id; add_issue_labels also takes the name.
edit_repo_labelEdit a repository label (PATCH — only supplied fields change: name, color, description).
delete_repo_labelDelete a repository label. Refuses by default when the label is in use (reports count); set delete_mode=force to override.
get_repo_labelGet a single repository label by numeric id.
create_org_labelCreate an organization-level label. Same fields as create_repo_label.
edit_org_labelEdit an organization-level label (PATCH semantics).
delete_org_labelDelete an organization-level label. In-use guard counts across visible org repos (best-effort); delete_mode=force overrides.
get_org_labelGet a single organization-level label by numeric id.
Comments
list_issue_commentsList comments on an issue or PR
get_issue_commentGet a specific comment
create_issue_commentAdd a comment to an issue or PR
edit_issue_commentEdit a comment
delete_issue_commentDelete a comment
list_repo_pull_requestsList pull requests in a repository
get_pull_request_by_indexGet a specific pull request
create_pull_requestCreate a new pull request
update_pull_requestUpdate an existing pull request
list_pull_reviewsList reviews for a pull request
get_pull_reviewGet a specific pull request review
list_pull_review_commentsList comments on a pull request review
list_pull_request_filesList changed files in a pull request (paginated). Use the returned filenames as the file_path argument to get_pull_request_diff.
get_pull_request_diffGet the unified diff of a pull request. Optional file_path returns only that file's hunks (matches on either pre- or post-rename path).
merge_pull_requestMerge a pull request (style: merge/rebase/rebase-merge/squash; optional title/message/delete-branch/force-merge/wait-for-checks).
create_pull_reviewCreate a review on a pull request (state: APPROVED/REQUEST_CHANGES/COMMENT) with optional inline comments.
submit_pull_reviewSubmit a pending pull request review
dismiss_pull_reviewDismiss a pull request review
delete_pull_reviewDelete a pending pull request review
create_review_requestsRequest reviews from specific users or teams
delete_review_requestsCancel pending review requests
Packages
list_packagesList package versions of a user or org (one row per version). Optional type and q. Server-paged via page/limit (default 30, max 50). Envelope {packages, page, l
get_packageGet one package version. Does not embed owner/creator users
delete_packageDelete one package version (not every version of the name). No preflight. 4xx/5xx stay errors
list_package_filesList files of one package version. Client-paged via page/limit (default 30, max 50); envelope {files, page, limit, count, has_next, total_count} (total_count is
Actions
dispatch_workflowTrigger a workflow run via workflow_dispatch event
list_workflow_runsList workflow runs with optional filtering by status, event, or SHA
get_workflow_runGet details of a specific workflow run by ID
list_action_run_jobsList jobs for a Forgejo v16+ workflow run with client-side page and limit bounds
get_action_job_logsRead a Forgejo v16+ job log with resumable offset and max_bytes bounds; defaults to the tail
cancel_workflow_runCancel a pending or running workflow run. Already-finished runs also return success (HTTP 204); the run is left unchanged
delete_workflow_runDelete a completed workflow run. A live run is an API error. Removes the run and its job logs; Forgejo marks that run's artifacts deleted
list_action_run_artifactsList artifacts of a workflow run. Server-paged via page/limit (default 30, max 50); optional name filter. Envelope {artifacts, page, limit, count, total_count?}
get_action_artifactGet metadata for one Actions artifact. Does not download the zip
list_repo_action_secretsList a repository's Actions secrets (names only; Forgejo never returns values). Client-paged via page/limit (default 30, max 50)
create_or_update_repo_action_secretCreate or update a repository Actions secret. Overwrites any existing secret with the same name; the value is never echoed back
delete_repo_action_secretDelete a repository Actions secret
list_org_action_secretsList an organization's Actions secrets (names only; Forgejo never returns values). Client-paged via page/limit (default 30, max 50)
create_or_update_org_action_secretCreate or update an organization Actions secret. Overwrites any existing secret with the same name; the value is never echoed back
delete_org_action_secretDelete an organization Actions secret
Organizations
list_my_orgsList my organizations
list_user_orgsList a user's organizations
get_orgGet organization details
create_orgCreate an organization
edit_orgEdit organization settings
delete_orgDelete an organization — destructive and irreversible: all repos, teams and data are permanently removed
list_org_membersList members of an organization
check_org_membershipCheck if a user is a member of an organization
remove_org_memberRemove a member from an organization
list_org_teamsList teams in an organization
search_org_teamsSearch for teams in an organization
create_org_teamCreate a team in an organization
add_team_memberAdd a user to a team
remove_team_memberRemove a user from a team
add_team_repoAdd a repository to a team
remove_team_repoRemove a repository from a team
list_issue_tracked_timesList tracked time entries on an issue or PR
list_repo_tracked_timesList tracked time entries across a repository
list_my_tracked_timesList your own tracked time entries
add_issue_timeLog time against an issue or PR (accepts seconds or duration like 15m)
reset_issue_timeDelete ALL tracked time entries on an issue or PR (destructive)
delete_issue_time_entryDelete a single tracked time entry by ID
start_issue_stopwatchStart a stopwatch on an issue or PR
stop_issue_stopwatchStop a running stopwatch and record the elapsed time
cancel_issue_stopwatchCancel a running stopwatch without recording
list_my_stopwatchesList currently running stopwatches
Attachments
list_issue_attachmentsList attachments on an issue or PR
get_issue_attachmentGet metadata for a single issue/PR attachment
download_issue_attachmentDownload an issue/PR attachment (inline if < 1 MiB; metadata + URL otherwise)
create_issue_attachmentUpload a new attachment to an issue or PR (base64 content or a file path on the MCP host)
edit_issue_attachmentRename an issue/PR attachment
delete_issue_attachmentDelete an issue/PR attachment
list_comment_attachmentsList attachments on an issue/PR comment
get_comment_attachmentGet metadata for a single comment attachment
download_comment_attachmentDownload a comment attachment (inline if < 1 MiB; metadata + URL otherwise)
create_comment_attachmentUpload a new attachment to an issue/PR comment (base64 content or a file path on the MCP host)
edit_comment_attachmentRename a comment attachment
delete_comment_attachmentDelete a comment attachment
Releases
list_releasesList releases for a repository (page/limit + client-side state filter: all/draft/prerelease/published)
get_release_by_idGet a release by numeric ID
get_release_by_tagGet a release by tag name
get_latest_releaseGet the latest non-draft, non-prerelease release
create_releaseCreate a new release (pass target_commitish to also create the tag)
edit_releaseUpdate fields of an existing release (only supplied fields are sent)
delete_releaseDelete a release by numeric ID — destructive
delete_release_by_tagDelete a release by tag name — destructive, verify tag
list_release_attachmentsList attachments on a release (response fetched in full, sliced client-side)
get_release_attachmentGet metadata for a single release attachment
download_release_attachmentDownload a release attachment (inline if < 1 MiB; metadata + URL otherwise)
create_release_attachmentUpload a new attachment to a release (base64 content or a file path on the MCP host)
edit_release_attachmentRename a release attachment
delete_release_attachmentDelete a release attachment — destructive
Wiki
list_wiki_pagesList pages using page/limit; returns has_next and, when Forgejo reports X-Total-Count, total_count. total_count counts upstream's raw wiki tree entries, so it c
get_wiki_pageRead decoded Markdown; optional start_line/end_line, always returns total_lines.
get_wiki_revisionsList revision history using page/limit; returns has_next and total_count, the page's total revision count as reported in the response body.
create_wiki_pageCreate a page and return its server-normalized page_name; slash-separated titles are a flat subpage naming convention (no hierarchy and no automatic parent page
update_wiki_pageUpdate content/title by normalized page_name; last writer wins.
delete_wiki_pageDelete a page by normalized page_name.
Server
get_forgejo_mcp_server_versionGet the MCP server version

How to install the Forgejo MCP Server

{
  "mcpServers": {
    "forgejo": {
      "command": "forgejo-mcp",
      "args": [
        "--transport",
        "stdio",
        "--url",
        "https://your-forgejo-instance.org"
      ],
      "env": {
        "FORGEJO_ACCESS_TOKEN": "YOUR_FORGEJO_ACCESS_TOKEN",
        "FORGEJO_USER_AGENT": "forgejo-mcp/1.0.0"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
FORGEJO_ACCESS_TOKENDeclared in the maintainer’s client configuration.Check documentation
FORGEJO_USER_AGENTDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use Forgejo MCP to User.”
  • “Use Forgejo MCP to get my user info.”
  • “Use Forgejo MCP to check notifications.”

Frequently asked questions

Connect your AI assistant to Forgejo repositories. Manage issues, pull requests, files, and more through natural language. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.