Skip to content

read MCP credentials only in the shape they have now, and tidy what #383 and #384 left - #390

Merged
hkonsti merged 2 commits into
mainfrom
hkonsti/drop-legacy-mcp-credentials
Nov 25, 2026
Merged

hkonsti merged 2 commits into
mainfrom
hkonsti/drop-legacy-mcp-credentials

Conversation

@hkonsti

@hkonsti hkonsti commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #383 and #384, removing what #384 kept only for the deploy to roll over, and tidying two things they left.

Old credential shapes

The migration itself stays: a self-hosted instance upgrading from before #384 still needs it (data-migrations/run.ts). Until it has run on start, which takes a moment, such an instance's built-in connections in the old shape can't be used.

Tidying

  • Connecting a custom MCP server and moving one to another address on its page share one step, connectServer in custom/route.ts: ask the server for its tools and save the connection, or begin the sign-in it asks for. What differs, the name and sharing of a new connection or the connection a move renews, is its Destination.
  • withMcpSignIn is withMcpCredential: it sends a token or key as well as a sign-in's access token.
  • Sendable in mcp-session.ts was BuiltInCredential under another name.

Merge once #384 is deployed on every instance, so that no instance writing the old shapes is still running when this one's migration runs.

…only in the data migration, run again for what an instance from before wrote while #384 rolled over

* the old shapes, a key as {auth: 'key', key} and a sign-in's tokens bare, move from mcp-credential.ts into unify-credentials.ts: the session reads a built-in integration's credential with builtInCredentialSchema alone
* the migration runs again as unify-mcp-credentials-again: an instance from before #384 could still write the old shapes while its deploy rolled over, after the first run was noted as done
* Sendable in mcp-session.ts was BuiltInCredential under another name
…thMcpSignIn is withMcpCredential

* connectServer in custom/route.ts asks the server for its tools and saves the connection, or begins the sign-in it asks for, for a new connection and for one moved on its page alike; what differs is its Destination
* withMcpSignIn sends a token or key as well as a sign-in's access token, so it is withMcpCredential
@hkonsti hkonsti changed the title read MCP credentials only in the shape they have now read MCP credentials only in the shape they have now, and tidy what #383 and #384 left Nov 25, 2026
@hkonsti
hkonsti merged commit 78a4aa9 into main Nov 25, 2026
4 checks passed
@hkonsti
hkonsti deleted the hkonsti/drop-legacy-mcp-credentials branch November 25, 2026 23:13
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