Is the Forgejo MCP server safe? What it can reach
What the Forgejo MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.
No vendor-run Forgejo MCP server is documented, so this covers the most used community one, forgejo-mcp by goern. You run it yourself against your own Forgejo instance with a personal access token, and it acts with that token’s rights. It can merge pull requests, delete organizations and change secrets, and no flag to turn off single tools is documented. Scope the token narrowly.
Who maintains it
| Implementation | Kind | Status |
|---|---|---|
| forgejo-mcp by goern (community) | Community | active |
| forgejo-mcp GitHub mirror | Community | active |
It runs as a local process on your machine.
How it signs in
A Forgejo personal access token from Settings, Applications, Access Tokens, passed as FORGEJO_ACCESS_TOKEN. The server acts as that user. An opt-in resource-server mode instead lets users sign in at an OpenID Connect provider, with a Forgejo 16 Authorized Integration.
What its tools can do
| Kind | Tools |
|---|---|
| Read | get_my_user_info, check_notifications, get_notification_thread, list_repo_notifications, search_users, list_my_repos, get_repo, search_repos, list_repo_topics, list_branches, list_branch_protections, get_branch_protection, list_repo_hooks, get_repo_hook, get_file_content, list_repo_contents, get_repo_tree, list_repo_commits, get_commit_statuses, list_repo_issues, search_issues, get_issue_by_index, list_issue_dependencies, list_issue_dependents, list_repo_milestones, get_milestone, list_repo_labels, list_org_labels, get_repo_label, get_org_label, list_issue_comments, get_issue_comment, list_repo_pull_requests, get_pull_request_by_index, list_pull_reviews, get_pull_review, list_pull_review_comments, list_pull_request_files, get_pull_request_diff, list_packages, get_package, list_package_files, list_workflow_runs, get_workflow_run, list_action_run_jobs, get_action_job_logs, list_action_run_artifacts, get_action_artifact, list_action_variables, get_action_variable, list_repo_action_secrets, list_org_action_secrets, list_my_orgs, list_user_orgs, get_org, list_org_members, check_org_membership, list_org_teams, search_org_teams, list_issue_tracked_times, list_repo_tracked_times, list_my_tracked_times, list_my_stopwatches, list_issue_attachments, get_issue_attachment, download_issue_attachment, list_comment_attachments, get_comment_attachment, download_comment_attachment, list_releases, get_release_by_id, get_release_by_tag, get_latest_release, list_release_attachments, get_release_attachment, download_release_attachment, list_wiki_pages, get_wiki_page, get_wiki_revisions, get_forgejo_mcp_server_version |
| Write | mark_notification_read, mark_all_notifications_read, mark_repo_notifications_read, create_repo, fork_repo, edit_repo, set_repo_topics, add_repo_topic, create_branch, create_repo_hook, edit_repo_hook, create_file, update_file, change_files, create_issue, add_issue_labels, update_issue, issue_state_change, add_issue_dependency, create_milestone, edit_milestone, create_repo_label, edit_repo_label, create_org_label, edit_org_label, create_issue_comment, edit_issue_comment, create_pull_request, update_pull_request, create_pull_review, submit_pull_review, create_review_requests, link_package, unlink_package, create_action_variable, update_action_variable, create_org, edit_org, create_org_team, add_issue_time, start_issue_stopwatch, stop_issue_stopwatch, cancel_issue_stopwatch, create_issue_attachment, edit_issue_attachment, create_comment_attachment, edit_comment_attachment, create_release, edit_release, create_release_attachment, edit_release_attachment, create_wiki_page, update_wiki_page |
| Can’t be undone | delete_repo_topic, delete_branch, create_branch_protection, edit_branch_protection, delete_branch_protection, delete_repo_hook, test_repo_hook, delete_file, remove_issue_labels, remove_issue_dependency, delete_milestone, delete_repo_label, delete_org_label, delete_issue_comment, merge_pull_request, dismiss_pull_review, delete_pull_review, delete_review_requests, delete_package, dispatch_workflow, cancel_workflow_run, delete_workflow_run, delete_action_variable, create_or_update_repo_action_secret, delete_repo_action_secret, create_or_update_org_action_secret, delete_org_action_secret, delete_org, remove_org_member, add_team_member, remove_team_member, add_team_repo, remove_team_repo, reset_issue_time, delete_issue_time_entry, delete_issue_attachment, delete_comment_attachment, delete_release, delete_release_by_tag, delete_release_attachment, delete_wiki_page |
The README says to create the token with the permissions you need and lists no named scopes. Several tools are grouped as destructive for their effect on access, CI or shared settings, such as branch protection, team membership, secrets and workflow dispatch. Some actions tools need Forgejo v16 or newer.
Built-in limits
| Option | What it does |
|---|---|
Token permissions | The token you create decides what every tool can do, because the server has no per-tool allowlist in its documented options. |
FORGEJO_MCP_ALLOW_FILE_PATH_UPLOAD | Off by default. When on, attachment tools can upload files from the host filesystem. |
FORGEJO_MCP_UPLOAD_ROOT | Confines file_path uploads to one directory. The default is anywhere the process can read. |
--host and --allowed-hosts | The sse and http transports listen on loopback by default. A reachable address needs --allowed-hosts, and every request needs its own Authorization header. |
delete_mode | delete_milestone, delete_repo_label and delete_org_label refuse to delete in-use items unless delete_mode is force. |
Signed releases | Releases and container images are signed with cosign, with SLSA provenance and an SBOM documented for checking them. |
The risks
- Issues, pull request bodies, comments and wiki pages on a shared forge come from other people, so an injected instruction in one could make the agent merge a pull request, dispatch a workflow or change files as you.
- create_or_update_repo_action_secret and create_or_update_org_action_secret overwrite CI secrets, and dispatch_workflow runs workflows that may use those secrets.
- delete_org permanently removes all repositories, teams and data in an organization, and delete_package, delete_release and delete_file also remove data.
- edit_branch_protection, delete_branch_protection and the team tools change who can push or merge, so a single bad call can widen access.
- create_repo_hook and test_repo_hook can point a webhook at an outside URL and trigger a live delivery.
Limit it in Claude Code
Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:
claude mcp add --env FORGEJO_ACCESS_TOKEN=... forgejo -- forgejo-mcp --transport stdio --url https://your-forgejo-instance.orgClaude Code names MCP tools mcp__forgejo__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:
{
"permissions": {
"deny": [
"mcp__forgejo__delete_org",
"mcp__forgejo__remove_org_member",
"mcp__forgejo__delete_package",
"mcp__forgejo__delete_repo_action_secret",
"mcp__forgejo__delete_org_action_secret",
"mcp__forgejo__create_or_update_repo_action_secret",
"mcp__forgejo__create_or_update_org_action_secret",
"mcp__forgejo__create_branch_protection",
"mcp__forgejo__edit_branch_protection",
"mcp__forgejo__delete_branch_protection",
"mcp__forgejo__delete_release",
"mcp__forgejo__delete_release_by_tag",
"mcp__forgejo__delete_release_attachment",
"mcp__forgejo__delete_repo_hook",
"mcp__forgejo__test_repo_hook",
"mcp__forgejo__add_team_member",
"mcp__forgejo__remove_team_member",
"mcp__forgejo__add_team_repo",
"mcp__forgejo__remove_team_repo"
],
"ask": [
"mcp__forgejo__merge_pull_request",
"mcp__forgejo__dispatch_workflow",
"mcp__forgejo__cancel_workflow_run",
"mcp__forgejo__delete_workflow_run",
"mcp__forgejo__delete_branch",
"mcp__forgejo__delete_file",
"mcp__forgejo__create_file",
"mcp__forgejo__update_file",
"mcp__forgejo__change_files",
"mcp__forgejo__create_repo_hook",
"mcp__forgejo__edit_repo_hook",
"mcp__forgejo__edit_repo",
"mcp__forgejo__create_repo",
"mcp__forgejo__create_release",
"mcp__forgejo__create_pull_request",
"mcp__forgejo__update_pull_request",
"mcp__forgejo__create_pull_review",
"mcp__forgejo__create_issue",
"mcp__forgejo__create_issue_comment"
]
}
}Limit it in Codex
Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:
[mcp_servers.forgejo]
command = "forgejo-mcp"
args = ["--transport", "stdio", "--url", "https://your-forgejo-instance.org"]
env_vars = ["FORGEJO_ACCESS_TOKEN"]
disabled_tools = ["delete_org", "remove_org_member", "delete_package", "delete_repo_action_secret", "delete_org_action_secret", "create_or_update_repo_action_secret", "create_or_update_org_action_secret", "create_branch_protection", "edit_branch_protection", "delete_branch_protection", "delete_release", "delete_release_by_tag", "delete_release_attachment", "delete_repo_hook", "test_repo_hook", "add_team_member", "remove_team_member", "add_team_repo", "remove_team_repo"]Checklist
- Create the token with the fewest permissions that fit the job, on a separate account if you can.
- Deny the secret, branch protection, team and organization tools.
- Ask before merges, file changes and workflow runs.
- Keep the http transport on loopback and leave file path uploads off.
Checked against the vendor documentation on November 25, 2026. forgejo-mcp README · forgejo-mcp on GitHub
What Excellent covers
Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server
Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing