Repository navigation
Conversation
…ilotKit#817) A server added by URL had no catalogue entry to name a header in, so its deployment token could only ever travel as Authorization: Bearer. A vendor that reads its key from a header of its own, as Composio's consumer endpoint reads x-consumer-api-key, could not be reached at all. - mcp_servers.token_header (migration 0066), nullable; null means the Authorization: Bearer default - addCustomServer stores it (re-add keeps it unless named; empty clears it), validated as an RFC 7230 field-name token before anything is stored - refresh and call paths use the stored header when no catalogue entry exists; a catalogue entry stays authoritative wherever one exists - POST /api/plugins/servers/custom accepts tokenHeader; the app mutation input carries it (no admin UI field: the current UI has no custom-server add/edit form for it to live in)
azmi2409
requested review from
MikeRyanDev,
davidmckayv,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
October 28, 2026 05:33
This branch has not been deployed
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 changes
Fixes #817. A server added by URL had no catalogue entry to name a header in, so its deployment token could only ever travel as
Authorization: Bearer. A vendor that reads its key from a header of its own — as Composio's consumer endpoint readsx-consumer-api-key— could not be reached at all. This adds the general capability rather than special-casing any vendor hostname, and leaves OpenBot's own brokered Composio integration untouched.mcp_servers.token_header(migration 0066, generated withdrizzle-kit generate), nullable; null means theAuthorization: Bearerdefault.addCustomServerstores it: a re-add keeps the stored value unless one is named, and an empty string clears it back to the default.resolveTokenHeaderbefore anything is stored — a name with whitespace or a control character is refused, since it reaches raw HTTP.refreshTools) and the call path (callTool) send the stored header when no catalogue entry exists, viatokenHeaderForServer. A catalogue entry stays authoritative wherever one exists.POST /api/plugins/servers/customacceptstokenHeader, and the app'sCustomServerInputcarries it. No admin UI field: the current UI has no custom-server add/edit form for one to live in (the mutation exists but no screen calls it), so the header is settable through the API.How it was verified
bun teston the plugin/mcp/catalogue unit suites: 369 pass, 0 fail, including a newserver/tests/plugin-custom-server-token-header.test.tscovering header validation (rejects spaces, CRLF,/,:, non-strings), catalogue-wins precedence, and — over a real MCP connection to a mock server with a journaled request log — that a named header carries the token exactly as stored with noAuthorizationsent, and that the default still sendsAuthorization.bun run typecheck(server and app) clean;bun run typecheck:testsclean against the baseline (0 new errors).Not verified here
addCustomServerdatabase round-trip has not run against one — no Postgres is available in this environment. The column write is plain Drizzle over the generated schema, and the unit + type gates above are green, but a run against a real database is still worth a look before merge.