Skip to content

MCP servers

The rules the Hub applies to MCP servers and Installations. To add one, see Add a remote MCP server. For packaged servers, see MCP server packages.

FieldRule
Idhub: and the name in lowercase with dashes, such as hub:docs-search, for a server added on the Hub. A packaged server’s id is its package name.
URLStarts with https:// or http://, with no user name, password or #fragment. Plain http:// to a host other than localhost or a loopback address is marked Unencrypted http.
Header secretsAt most 10. Each has a title, a header, a value template holding {value} exactly once, and a key of letters, digits and underscores starting with a letter.
Refused headersThose the Gateway sets itself, such as Host, Content-Type and Mcp-Session-Id: The Gateway sets Host itself: use another header.
RuleDetail
One per RepoA Repo has at most one Installation of each MCP server.
AccessCreating, editing or deleting an Installation needs access on GitHub to every Repo it lists.
GlobalOn in every Repo, new ones included. Only the Hub’s Owner can create, edit or delete a global Installation, or edit, upgrade or delete its MCP server. A server has at most one.
OverrideA Repo’s own Installation of a server takes the place of its global one on that Repo.
Turn offAnyone with access to a Repo can turn a global Installation off and on for it.
ValuesWrite-only, one line of plain characters, at least 4 long. Saving with a field empty keeps its value.

A value is entered for one server and header, so an edit that would send it elsewhere clears it on every Installation. The dialog lists whose values it clears, and its button says Save and clear values.

EditValues
URL to another scheme, host or portAll cleared.
URL to another path on the same serverKept.
Header secret removed, or its key or header changedThat secret’s values cleared.
Header secret’s title or template changedKept.

For an OAuth server, the same URL changes, or a change of Sign-in, disconnect every Installation and drop its client, with Save and disconnect.

As a Session starts or wakes, the Hub sends each of its Installations’ servers an MCP initialize request, and waits up to HUB_MCP_SERVER_CHECK_TIMEOUT_MS (default 5 seconds).

ResultThe Session
A header secret has no valueDoesn’t start: Docs needs a value for API key.
The server answers 401 or 403Doesn’t start: Docs's MCP server refused its credential (401).
The Hub can’t decrypt the valuesDoesn’t start: The Hub could not read Docs's header secret values: check HUB_SECRETS_KEY.
An OAuth Installation isn’t connectedDoesn’t start: Docs isn't connected to its account.
No answer in time, unreachable, or another errorStarts, with a warning in its conversation.

While a Session runs, an Installation whose server refuses it shows as an error in the conversation, and the Session keeps its other servers. See Troubleshooting.

The Hub connects an OAuth Installation as the MCP authorization spec describes:

StepStandard
Find the authorization serverProtected Resource Metadata (RFC 9728)
Read its metadataRFC 8414, or OpenID Connect discovery
Register as a clientDynamic Client Registration (RFC 7591), or a client entered by hand
Sign inAuthorization code with PKCE (S256)
Ask for a token for the server aloneResource indicators (RFC 8707)
  • Callback URL: <HUB_PUBLIC_URL>/auth/mcp/callback. Changing HUB_PUBLIC_URL makes the Hub register again at the next Connect, and ask again for a client entered by hand.
  • Addresses: the server and every address it names must be https://, or http:// to localhost or a loopback address. The Hub follows no redirects.
  • Time limit: a sign-in must finish within 10 minutes, in the same browser.
  • Tokens: kept encrypted on the Hub, refreshed before they expire or when the server refuses one. The Gateway adds Authorization: Bearer <token> to each request, and holds request bodies up to 4 MiB so it can resend one after a refresh.
  • Client authentication: HTTP Basic, else in the request form, or as a public client, as the authorization server’s metadata allows.

A Repo’s page lists its Installations under MCP servers, and below them a Change log: who created, edited or deleted an Installation, who set its values, which edits cleared values, and who connected or disconnected an OAuth Installation. A change to a global Installation appears in every Repo’s log. The log never holds a value.

kndl is an independent project. It is not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic, PBC. About kndl