Connect an MCP server
Starts a connection request for an MCP server URL. Discovery, browser consent, and validation happen asynchronously; poll the returned connectionRequestId until the status is terminal. When the next step belongs to a person, the response carries a handoffUrl to open.
Authorizations
MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.
Body
The MCP server URL to connect.
Omit to have the user choose in the browser; a request with no project resolves to awaiting_project rather than defaulting to one.
Disambiguates when a project already has several saved servers on this URL.
Used only if a server row is created. Ignored when an existing row is reused.
Skip deduplication and force a fresh authorization.
Response
Connection request created.
The state of one "connect this MCP server" request. Every server-connection route returns this shape, so a caller polls exactly what it created.
Public scr_… identifier. Safe to print; it is never sufficient to act on a request.
discovering, awaiting_project, awaiting_authorization, authorizing, validating, ready, failed, expired, cancelled Where the user finishes in a browser, for both awaiting_project and awaiting_authorization. Returned ONLY by the create call — the raw token behind it is minted once and never stored. Treat it as a private, single-person capability: never post it to a shared channel.

