LabscoMCP early access ↗
goernMCP SERVER · OFFICIAL PROJECT

Forgejo MCP Server

Issues, pull requests, files, releases, wiki and Actions on your own Forgejo instance, as tools.

by goern ↗Git Hosting & Code Review✓ Official

LABSCO SUMMARY

Everything is bounded, which is why it survives a real repository.

Wide forge servers usually fall over on the same thing: one call returns a whole CI log or a whole diff, and the context is gone. Here paging, line ranges, byte offsets and truncation sentinels are built into the tool descriptions, and when a resource truncates a list it names the tool to call for the rest. That is the difference between a demo repository and yours.

What it is

A Go MCP server for Forgejo instances, with an unusually wide surface and a consistent discipline about bounded output: list tools take page and limit and echo them back, file and wiki reads take line ranges, and job logs are resumable. Development, issues, releases and container images now live at git.b4mad.industries/agentic-forges/forgejo-mcp; the Codeberg repository remains as a read-only mirror and no longer publishes images.

What you get

  • Issues and labels: list_repo_issues with server-side sorting, search_issues across an owner's repositories, create_issue, update_issue, issue_state_change, add_issue_labels, create_repo_label, list_org_labels, plus dependencies through add_issue_dependency and list_issue_dependents
  • Pull requests and review: list_repo_pull_requests, create_pull_request, list_pull_request_files, get_pull_request_diff for the whole diff or one file's hunks, create_pull_review with inline comments, merge_pull_request with a choice of merge style
  • Files and commits: get_file_content with an optional line range, create_file, update_file, delete_file, list_repo_commits
  • Actions: dispatch_workflow, list_workflow_runs, get_workflow_run, list_action_run_jobs, and get_action_job_logs with resumable offset and max_bytes so a huge log does not arrive all at once
  • Releases and attachments: create_release, edit_release, get_latest_release, list_release_attachments, download_release_attachment
  • Wiki: list_wiki_pages, get_wiki_page with line ranges, create_wiki_page, update_wiki_page, delete_wiki_page
  • Time tracking: add_issue_time, start_issue_stopwatch, stop_issue_stopwatch, list_my_tracked_times
  • Branch protection and webhooks as first-class tools, including test_repo_hook — which triggers a live HTTP delivery, as its own description warns
  • forgejo:// resource templates for owners, repos, commits, issues, PRs, labels and wiki pages, for clients that read resources; every list tool stays available for clients that do not
  • A CLI mode that invokes any tool from a shell, for scripts and CI without running a server

Requirements

A Forgejo personal access token in FORGEJO_ACCESS_TOKEN, created under Settings, Applications, Access Tokens with the scopes you need, and --url pointing at your instance. Install with go install, a release binary, the AUR packages, Nix from the unstable channel, or the signed container image, which carries a cosign signature and a CycloneDX SBOM. Wiki behaviour was live-tested against Forgejo 15.0.4+gitea-1.22.0 and the full demo replayed against 16.0.0+gitea-1.22.0 — that is the tested range, not a promise about every deployment.

Setup effort

One command plus a key — forgejo-mcp --transport stdio --url <YOUR_FORGEJO_URL>, then supply credentials