Connect a Context MCP server
Registers an MCP server and wires its tools into the account’s voice agent. Dial probes the server’s URL to determine how it authenticates:
-
Unauthenticated or static — the connection is wired immediately and returned with
status: "connected". -
OAuth 2.1–protected — the response includes an
authorizationUrlandstatus: "pending_auth". Open that URL in a browser to grant consent; Dial completes the connection on the OAuth callback and then manages token refresh for you. The server’s authorization server must support Dynamic Client Registration (RFC 7591).
If the server is unreachable, or responds to the probe with a server error (HTTP 5xx), the request is rejected with 400 and a message naming the status Dial observed — the fault is on your server, so fix it and try again.
Authentication
Your Dial API key, sent as Authorization: Bearer sk_live_...
Request
HTTPS MCP server URL (http allowed only for localhost in development).
Extra static headers to send on every connection. For an OAuth-protected server, any Authorization header you set is ignored — Dial manages it.
Response
The created connection. For OAuth servers, authorizationUrl is present and the connection stays pending_auth until consent completes.