fix(mcplocal): rebind upstream auth token on every project refresh #133
Reference in New Issue
Block a user
Delete Branch "fix/stale-upstream-token"
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?
A cached project router outlives the caller's bearer token.
syncUpstreamsonly created aMcpdUpstream(which binds the token at construction) for server names not already registered, so after the Sep 15 token rotation every pre-rotation upstream kept posting the old bearer: six attached, healthy servers (gitea, aws-docs, my-grafana, unifi-network, docmost, searxng) 401'd ontools/listforever with no client-visible error, while firecrawl and techdocs — attached after the rotation — worked.mcpctl errorsstayed empty because the warnings only reached mcplocal's journal.Changes:
serverIdafter delete+recreate under the same name).getToolDiscoveryFailures().begin_sessionresponse name each attached server that contributed no tools and the error that silenced it.Verified: after restarting mcplocal, the sre project serves 163 tools from all 8 servers (was 39 from 2); full mcplocal suite 852/852 green.
🤖 Generated with Claude Code