Repository navigation
Add an MCP server by its address from Connections - #1517
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 12, 2026 18:45
A person can now add any remote MCP server OpenBot doesn't list, by URL, from Connections (Add server), and give it to Bots like any other app. The add-by-URL screen went away in #97 when the admin Plugins page was rebuilt; the endpoint stayed. This brings the flow back for everyone, not only admins. OpenBot asks the server, with no credential, how it is reached. A normal reply adds it and lists its tools. A 401 with an OAuth challenge follows the MCP authorization spec: protected resource metadata (RFC 9728), authorization server metadata (RFC 8414 / OpenID), dynamic client registration (RFC 7591), PKCE S256 and the resource parameter (RFC 8707), all through the MCP TypeScript SDK's own client/auth functions. OpenBot adds what the SDK leaves out: every address it fetches is held to the custom-server floor with no redirects followed, the metadata issuer must match, and the iss on the callback is checked (RFC 9207). Registration happens at add time, so a server that only accepts approved apps (Figma's does) is refused on the form with nothing left behind. Each person's token set is kept in the vault as an mcp_user_token; the access token is used until it nears expiry, then refreshed, so servers that never issue a refresh token work. A sign-in server reads as a catalogue user-oauth app everywhere else: owner grants, app-access state, Connections tiles. In OpenBot Desktop the sign-in returns through /desktop-return, now for Notion and Drive too. Team edition: with the MCP allowlist on, an address must be approved first. Allowlist entries may now be addresses; a server added at an approved address is approved by that entry at call time. Admins approve an address under Admin, Apps, MCP servers, or press Approve and add on the form. A key is the server's own and used by every Bot, so only an admin may give one. Personal edition has no allowlist. show_app_access now tells the model a server can be added by its URL on Connections, so a Bot no longer says it can't use one. OPENBOT_ALLOW_LOOPBACK_MCP=1 admits 127.0.0.1 for development and tests only. Tests run a real OAuth MCP server on 127.0.0.1 through the real routes: sign-in, token storage, refresh, tool listing, a Bot's call, the iss check, address refusals and the allowlist.
davidmckayv
force-pushed
the
feat/add-mcp-server-by-url
branch
from
November 12, 2026 19:04
2413fba to
a9022d0
Compare
- A server added by URL that signs people in no longer connects on a tile press in the personal edition: the tile opens its page, which offers Connect beside the switch that removes it. Before, a server whose sign-in was abandoned had no way back to that switch. - The address refusals on the person-facing route are said in the person's words (the floor's own sentences name the deployment and the token field), and a refused discovered address no longer echoes the floor's sentence. - A no-auth server's key row says nothing is sent, instead of describing a token that is never sent; a sign-in server with nobody connected says to connect to see its tools, instead of Refresh. - "Enter the full address, starting with https://." for an address that does not parse.
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
A person can add any remote MCP server OpenBot doesn't list, by its address, from Connections → Add server, and give it to Bots like any other app. Figma's and Fireflies' official servers are the motivating cases.
OpenBot asks the server, with no credential, how it is reached:
resource(RFC 8707), all through the MCP TypeScript SDK's ownclient/authfunctions. Each person then signs in in their own browser and every call runs on their token.Background
addCustomServerandPOST /servers/customhave existed since the beginning. The add-by-URL screen went away in #97, as a side effect of rebuilding the admin Plugins page into two lists; that PR kept the endpoint on purpose. It was admin-only and handled only no-auth and deployment-token servers.Design
issueror the RFC 9207isson the redirect; OpenBot does both.mcp_servers.oauth(migration 0091, generated by drizzle-kit). The server then reads as a catalogueuser-oauthapp everywhere: access resolution, owner grants (Bot owners may give it), app-access state, Connections tiles, the connect route and the callback.mcp_user_token. The access token is used until it nears expiry, then refreshed, so servers that never issue a refresh token still work.?from=desktopnow returns OAuth consents through/desktop-return, as Composio and Arcade already did (this also fixes Notion and Drive on Desktop).show_app_accessno longer leaves the model to say a server can't be used by its URL; it says the person can add it on Connections.OPENBOT_ALLOW_LOOPBACK_MCP=1admitshttp://127.0.0.1for development and tests only. Documented indocs/configuration.mdanddocs/plugins/mcp-by-url.md.Figma
Figma's remote MCP server only accepts clients in its own catalogue. Checked live: its registration endpoint answers
403 Forbiddento OpenBot, and the form says so. It works once Figma approves OpenBot as a client. Fireflies registers OpenBot and reaches its sign-in page.Tests
server/tests/custom-mcp-by-url.integration.test.ts: real routes, real store, real vault, against a real OAuth MCP server on 127.0.0.1 (server/tests/support/oauth-mcp-server.ts, built on the SDK's server). Covers discovery, registration, the consent redirect (PKCE,resource), a forgedissrefused, code redemption, the encrypted token set, tools listed as the person, the app reading ready to a Bot, a Bot's tool call, refresh after the access token lapses, a no-auth server, the address-safety refusals (regression), the non-admin key refusal and the allowlist by address.server/tests/mcp-allowlist-address.test.ts: address matching and server ids.server/tests/app-access-tool.test.ts: the Bot is told a server can be added by URL.End to end in a real browser: added the local OAuth server, signed in, and a Bot saved and listed notes through it; added
https://mcp.deepwiki.com/mcpand a Bot read a repository's wiki structure through it; Figma refused on the form; allowlist refusal and Approve and add in the team edition.Not in this PR
Found driving it end to end, fixed in the second commit