Skip to content

Add a cleanup path for defunct native-MCP connections#128

Merged
ryw merged 1 commit into
mainfrom
cleanup-orphan-native-connections
Jun 14, 2026
Merged

Add a cleanup path for defunct native-MCP connections#128
ryw merged 1 commit into
mainfrom
cleanup-orphan-native-connections

Conversation

@ryw

@ryw ryw commented Jun 14, 2026

Copy link
Copy Markdown
Member

Follow-up to #126. The orphaned tembo self-key connection (left by the tembotembo-agent-studio rename) can't be removed from the UI — it doesn't render as a card (no catalog provider), so it lingers with a still-valid minted tas_ key.

  • Connections → Native MCP now shows a "removed provider" banner with a one-click Remove when you hold connections to a non-catalog provider. removeDefunctNativeConnectionsAction deletes the rows, revokes any self-key tas_ key, drops their cached tools, and audits each.
  • Generalized the disconnect key-revocation: it now fires whenever the row has a metadata.api_key_id (only self-key connections do) instead of matching type === "tembo-agent-studio" — so a renamed provider's leftover key is revoked on disconnect/cleanup too.

Scoped to your own connections (the action clears the acting user's rows, so the banner is hidden when an admin is viewing another member).

tsc / eslint / next build clean.

🤖 Generated with Claude Code

A native connection to a provider that left the catalog (e.g. the old `tembo`
self-key connection after the `tembo-agent-studio` rename) lingers as an
orphaned row: it doesn't render on the Connections page, can't be disconnected,
keeps a minted tas_ key alive, and (before #126) leaked into CAP's prompt.

- The Connections → Native MCP page now shows a "removed provider" banner with a
  one-click Remove when you hold such connections; removeDefunctNativeConnectionsAction
  deletes the rows, revokes any self-key key, and drops their cached tools.
- Generalized the disconnect key-revocation to fire on any self-key connection
  (metadata.api_key_id present) instead of matching the current slug, so a
  renamed provider's leftover key is revoked too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ryw ryw merged commit ec75648 into main Jun 14, 2026
10 checks passed
@ryw ryw deleted the cleanup-orphan-native-connections branch June 14, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant