mcp-servers

Add a remote MCP server for the signed-in user and connect to it.

Add a remote MCP server for the signed-in user and connect to it. Servers that require OAuth return an authUrl: a signed-in Kody consent page the user opens and confirms before Kody sends them to the provider; other servers connect immediately. Pass bearerToken for servers that authenticate with a static Authorization header instead of (or in addition to) OAuth. Connected server tools become kody.mcp["server-name"].tool_name(...) capabilities. When OAuth fails with origin or redirect URI errors, the remote authorization server must allow Kody's oauthClientOrigin, oauthCallbackUrl, and oauthClientMetadataUrl (CIMD client_id) when present.

Org permission: integration:create.

post/v1/mcp-servers

Request

  • Base URL: https://api.kody.codes
  • URL: https://api.kody.codes/v1/mcp-servers
  • Auth: HTTP bearer

Request body

namestring required

Short kebab-case name for the server (lowercase letters, numbers, dashes). Used as kody.mcp["name"] in execute code.

urlstring required

The remote MCP server endpoint URL. Must be https (http is only allowed for localhost during development).

bearerTokenstring

Optional static credential for Authorization. Bare tokens are sent as Bearer <token>; values that already include an auth scheme (Bearer, token, etc.) are sent as-is. Stored only in the per-user MCP client hub, never returned later.

Response

Success.

idstring required
namestring required
urlstring required
statestring required
toolCountinteger required
authUrlstring nullable required
errorstring nullable required
oauthClientOriginstring required
oauthCallbackUrlstring required
oauthClientMetadataUrlstring nullable required
nextStepstring required

Changes

No recorded changes to this operation across all 2 revisions of this API.