Skip to content

edit a custom MCP server's address or token on its page - #383

Merged
hkonsti merged 1 commit into
mainfrom
hkonsti/mcp-server-editing
Nov 25, 2026
Merged

hkonsti merged 1 commit into
mainfrom
hkonsti/mcp-server-editing

Conversation

@hkonsti

@hkonsti hkonsti commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

A custom MCP connection could only be renamed; a server that moved, or a token that changed, meant disconnecting and connecting again, losing every agent's settings. Its page now has a pencil opening Edit the server.

What it does

  • PUT /api/orgs/:org/connections/:id/server with {url?, token?, desktop?} asks the server at the address for its tools before anything is kept, then gives the connection its new credential, account and tools. Its id, name, activity and the settings for the tools still listed stay.
  • A server that asks for a sign-in has it begun as connecting does; the callback renews this connection (fromConnection in connect-flow.ts) rather than making a new one beside it.
  • url left out keeps the stored address, its query too, which the dialog never shows since it may hold a key.
  • token left out keeps the current token only while the server stays on the same origin, so a token is never sent to another server unasked; null drops it.
  • An address another of the person's connections has already, or a built-in service's server (Notion, Linear, …), is turned down.
  • GET …/server answers the address without its query and how it is signed in to (none, token, oauth), only for whoever may change the connection.
  • In the desktop app a sign-in is handed over to the browser, the dialog filled in there, as the connect form does.
  • Docs: new section "Change the address or token" in connections/custom-mcp.

Testing

  • bun run typecheck, bun run lint, bun run test pass.
  • API tests: moving on the same server keeps the token, a token alone keeps the query, another origin needs the token again or none, conflicts and built-in servers refused, a sign-in begun from the dialog renews the connection, the server answered without its query.
  • Web tests: only shown for a custom server, only what changed is sent, removing the token sends null.
  • Tried in Chrome against a local MCP server: moving to a new path with a new token, the refusal on another origin, a token the server turns down.

Open workspace in Conductor

…on, its settings and activity kept

* PUT /api/orgs/:org/connections/:id/server moves a custom MCP connection to another address, another token, or both, after asking the server there for its tools; a server that asks for a sign-in has it begun, and the callback renews this connection (`fromConnection` in connect-flow.ts) rather than making a new one
* the address left out keeps the stored one, its query too; the token left out keeps the current one only while the server stays on its origin, so a token is never sent to another server unasked; null drops it
* an address another of the person's connections has, or a built-in service's server, is turned down
* GET …/server answers the address without its query, which may hold a key, and how it is signed in to, for the dialog
* the connection page has a pencil opening the edit dialog; the desktop app hands a sign-in over to the browser as the connect form does
* docs: Change the address or token
@hkonsti
hkonsti force-pushed the hkonsti/mcp-server-editing branch from e6b234f to 2646516 Compare November 25, 2026 22:48
@hkonsti
hkonsti merged commit 0b6adbd into main Nov 25, 2026
3 checks passed
hkonsti added a commit that referenced this pull request Nov 25, 2026
 and #384 left (#390)

* read MCP credentials only in the shape they have now; the old shapes 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

* connect a custom server and move one on its page through one step; withMcpSignIn 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
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