feat: register external MCP servers as custom apps - #107
Conversation
ReviewMust fix
Should fix
Client identity / parity
Product model: Custom App, not "Connectors"Model an external MCP server as an App, same as native apps — no separate Connectors concept.
Transport / SSEWorkbench
|
Re-review @
|
…back scope, safeFetch transport
|
@barockok ready for another pass — re-review items addressed: New bugs
Remaining / minor
Carried over (unchanged): no-auth servers and non-DCR manual client — OAuth + DCR only, per the original spec. Also fixed: deleting a custom app no longer leaks its raw |
|
Approving. Tested end-to-end locally at Non-blocking notes (follow-up)
|
What
Register an external MCP server (HTTP streamable, OAuth 2.1) as a per-user custom app, modeled as an App beside the native apps. Its tools surface through workbench's own
search_tools/execute_tools.Why
Workbench connects to SaaS integrations but not arbitrary MCP servers. A custom app exposes a third-party MCP server's tools to agents, through this app only.
Changes
custom_appstable + store; OAuth 2.1 discovery (401WWW-Authenticate→ protected-resource →authorization_servers) and RFC 7591 dynamic client registration from a base URL; PKCE token exchange + refresh (honoursclient_secret_basic/_post, defaults toclient_secret_basic).tools/list+tools/call, namespacedappName__tool; SSE fallback for legacy servers, tool-call timeout, per-user session cache.search_tools/get_tool_schema/execute_tools/list_integrations; args pass through unvalidated (JSON Schema, no zod).custom: true), "New custom app" CTA, connect through the/connect/:integrationhandshake, AppDetail lists remote tools + Delete app./c→/c/,/authorizeexact-match) so SPA routes aren't forwarded to the server;encryption.tskey computed lazily (no load-timeconfigread).How to test
npm run test(server + portal suites pass).search_tools.Not in this PR
connect()for custom apps (portal-only).client_id/client_secretfallback when DCR is unsupported.Screenshot