Remove the Forgejo MCP connector: servers on dev/dev-new, the public endpoint, and its OIDC client #288
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#288
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of #266. Remove the Forgejo MCP connector entirely — the
forgejo-mcpservers, the public endpoint that fronted them, and the OIDC client that gated it. Decided during the Keycloak migration: it was the one Authelia client not migrated (#279), and the bespoke OIDC flow that fronted it has no Keycloak equivalent worth rebuilding.This is a feature removal, not dead-code cleanup:
mcp-forgejo.cloonar.comcurrently works. Afterwards Claude.ai can no longer reach Forgejo as a remote MCP connector, and the connector should be deleted on the Claude.ai side too.Scope
The servers —
devanddev-newBoth hosts run their own instance; remove from both.
hosts/fw/configuration.nix:43showsdev's microvm import is currently commented out in favour ofdev-new, but its config is retained as a documented fallback, so leaving one behind would make the fallback inconsistent.hosts/dev/modules/forgejo-mcp.nixandhosts/dev-new/modules/forgejo-mcp.nix. Each carries theforgejo-mcpuser/group, the systemd unit on port 8090, thesops.secrets.forgejo-mcp-tokendeclaration, and an nftables ruleip saddr 10.42.97.5 tcp dport 8090 accept.hosts/dev/configuration.nix:16andhosts/dev-new/configuration.nix:17.The public endpoint — web-02
hosts/fw/vms/web/mcp-forgejo.nix— the vhost plus the hand-rolled OIDC flow against Authelia's/api/oidc/{authorization,token,userinfo}and theauth_request /_oidc_checkbearer gate.hosts/fw/vms/web/default.nix:81.DNS — fw
hosts/fw/modules/ddclient.nix:23— remove"mcp-forgejo.cloonar.com".hosts/fw/modules/dnsmasq.nix:130— remove the split-horizon entry.The OIDC client — web-arm
hosts/web-arm/modules/authelia.nix:324-362— remove theclaude-mcp-forgejoclient entry, including itsaudience/requested_audience_modeRFC 8707 block.Authelia is still live and serving nothing else via forward-auth, so removing one client is safe. There is no cross-host deploy-ordering constraint: the whole feature is going away, so it does not matter whether the vhost or the client disappears first.
Comments vs. ADRs — treat them differently
Update stale code comments that assert something false about the current configuration once this lands:
hosts/dev-new/configuration.nix:45("lab.cloonar.com / mcp-forgejo / dev.cloonar.com keep working unchanged"),hosts/fw/configuration.nix:43, andhosts/fw/modules/dnsmasq.nix:116. Drop the mcp-forgejo mention; leave the surrounding rationale intact.Do not edit the ADRs.
docs/adr/0005anddocs/adr/0022both reference mcp-forgejo. They record decisions as they were made, and rewriting them to erase a service that existed at the time falsifies the record. ADR-0022 already documents the decision to drop it.Human steps
Secrets (per CLAUDE.md the agent does not touch these) — after the PR merges, 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 here — 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.Out of scope
Verification
scripts/pre-commitdry-builds the affected hosts (dev,dev-new,fw,web-arm).Human, after deploy:
https://mcp-forgejo.cloonar.comno longer resolves or serves.systemctl status forgejo-mcpondev-new— unit gone.auth.cloonar.comitself still comes up — the client list changed, and a malformedidentity_providers.oidc.clientsentry fails Authelia at startup.lab.cloonar.comand the six Keycloak clients are unaffected.