feat: remove the Forgejo MCP connector #292
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!292
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/288"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Removes
mcp-forgejo.cloonar.comend to end. This is a feature removal, not dead-code cleanup — the endpoint works today, and after this lands Claude.ai can no longer reach Forgejo as a remote MCP connector.Decided during the Keycloak migration (ADR-0022):
claude-mcp-forgejowas the one Authelia client not migrated in #279, and the hand-rolled OIDC flow that fronted it has no Keycloak equivalent worth rebuilding.What was removed
Servers —
devanddev-new. Deletedhosts/{dev,dev-new}/modules/forgejo-mcp.nixand dropped both imports. Each file carried theforgejo-mcpuser/group, the systemd unit on port 8090, thesops.secrets.forgejo-mcp-tokendeclaration and the nftables ruleip saddr 10.42.97.5 tcp dport 8090 accept— all of it went with the file. Both hosts were done so the retaineddevfallback stays consistent withdev-new.Public endpoint — web-02. Deleted
hosts/fw/vms/web/mcp-forgejo.nix(vhost, the/authorize+/tokenforwarding to Authelia, and theauth_request /_oidc_checkbearer gate) and dropped the import.DNS — fw. Removed
mcp-forgejo.cloonar.comfromddclient.nixand the split-horizonaddressentry fromdnsmasq.nix.OIDC client — web-arm. Removed the
claude-mcp-forgejoentry fromidentity_providers.oidc.clients, including its RFC 8707audience/requested_audience_modeblock. The six surviving clients (gitea,nextcloud,grafana,freescout,synapse,immich) are untouched, andadmin-only— the policy this client used — is still referenced bygitea,grafanaandfreescout, so it stays.Stale comments at
hosts/dev-new/configuration.nix,hosts/fw/configuration.nixandhosts/fw/modules/dnsmasq.nixwere updated to drop only the mcp-forgejo mention; the surrounding rationale is intact.ADRs deliberately untouched.
docs/adr/0005and0022still reference mcp-forgejo. They record decisions as they were made; rewriting them to erase a service that existed at the time would falsify the record. The diff touches no file underdocs/.Two things worth a reviewer's eye
services.nginx.appendHttpConfiglimit_req_zone ... zone=mcpdeclaration, commented as "shared across future MCP vhosts". It had no other consumer —grep -rn 'zone=mcp'across the repo is now empty — so it went with the file rather than being preserved for a hypothetical future vhost.forgejo-mcp-client-secretinhosts/fw/vms/web/secrets.yamlwas never declared in Nix anywhere. The vhost's Authelia flow was pure nginx proxying and referenced noconfig.sops.*. So there was no orphaned declaration to remove; the encrypted key is simply unused and is listed under human steps below.⚠️ The dry-build gate did not run
scripts/pre-commitcould not execute in the agent sandbox: there is no Nix toolchain there (nix-instantiateabsent, no/nixstore), soscripts/test-configurationfails fordev,dev-new,fwandweb-armwithERROR: 'nix-instantiate' command not found— an environmental failure, not a config error. The commit was made with--no-verify.Please dry-build the four affected hosts before merging. In lieu of it, these substitute checks passed:
grep -rn 'mcp-forgejo\|forgejo-mcp\|claude-mcp-forgejo'over all*.nixreturns zero hits outsidedocs/adr/; the only remaining references repo-wide are the three encryptedsecrets.yamlentries.HEADversion, so all removals were syntactically whole units../-relative module path referenced anywhere in the repo still resolves (only pre-existingshell.nixruntime-generated paths remain unresolved, untouched by this PR).These catch a dangling import or an unbalanced attrset, but they are not a substitute for evaluation — a malformed
identity_providers.oidc.clientsentry fails Authelia at startup, soweb-armin particular deserves the real build.Human steps after merge
Secrets (per CLAUDE.md the agent does not touch these) — after merge, so no module still declares them:
hosts/dev/secrets.yaml—forgejo-mcp-tokenhosts/dev-new/secrets.yaml—forgejo-mcp-tokenhosts/fw/vms/web/secrets.yaml—forgejo-mcp-client-secretAlso:
claude-mcpbot's PAT in Forgejo, and delete the bot account if it serves nothing else. The token is the actual credential — deleting the sops entry only removes the copy.mcp-forgejo.cloonar.comDNS record at the provider. Removing it from ddclient stops updates but does not remove the record.Post-deploy verification
https://mcp-forgejo.cloonar.comno longer resolves or serves.systemctl status forgejo-mcpondev-new— unit gone.auth.cloonar.comstill comes up — the client list changed, and a malformed clients entry fails Authelia at startup.lab.cloonar.comand the six Keycloak clients unaffected.Closes #288