Skip to content

Create a virtual MCP connection

Request

OAuth 2.0 scope:
  • okta.resourceServers.virtualMcpServers.manage
Admin roles:
  • SUPER_ADMIN

Creates a resource connection for the virtual MCP. Only STS_ACCESS_TOKEN connections to MCP_SERVER resources are supported.

Path
virtualMcpServerIdstringrequired

ID of a virtual MCP

Example:wlp1aB2cD3eF4gH5iJ6k
Bodyapplication/jsonrequired
connectionTypestringrequired

Type of connection authentication method

Value:"STS_ACCESS_TOKEN"
resourceobjectrequired

Reference to a ResourceServersClientAuthSettings in ORN format

resourceIndicatorstring, (uri)

Optional custom resource indicator. Defaults to the resource ORN if not specified.

POST
/workload-principals/api/v1/virtual-mcp-servers/{virtualMcpServerId}/connections
curl -i -X POST \
  https://subdomain.okta.com/workload-principals/api/v1/virtual-mcp-servers/wlp1aB2cD3eF4gH5iJ6k/connections \
  -H 'Content-Type: application/json' \
  -d '{
    "connectionType": "STS_ACCESS_TOKEN",
    "resource": {
      "orn": "orn:okta:idp:00o1n8sbwArJ7OQRw406:client_auth_settings:rsc2c8xwvBn4h2Ry50g7"
    },
    "resourceIndicator": "https://mcp.example.com"
  }'

Responses

A response confirming the successful creation of the connection.

Bodyapplication/json
connectionTypestringrequired

Type of connection authentication method

Value:"STS_ACCESS_TOKEN"
idstring(ResourceConnectionId)required

Unique identifier for the resource connection. Only present for resource connections.

ornstring(ResourceConnectionOrn)required

The ORN of the resource connection

resourceobject(ManagedSTSAccessTokenResourceData)required
resourceIndicatorstring, (uri)(ResourceConnectionResourceIndicator)required

Resource indicator used when requesting tokens

statusstring(ResourceConnectionStatus)required

The status of the connection

Enum ValueDescription
ACTIVE

The agent connection is active

INACTIVE

The agent connection is inactive

Response
{ "connectionType": "STS_ACCESS_TOKEN", "id": "mcn9i0j1k2l3m4n5o6p7", "orn": "orn:okta:idp:00o1n8sbwArJ7OQRw406:connections:mcn9i0j1k2l3m4n5o6p7", "status": "INACTIVE", "resourceIndicator": "https://mcp.example.com", "resource": { "resourceType": "MCP_SERVER", "orn": "orn:okta:directory:00o1n8sbwArJ7OQRw406:resource-servers:mcp:mcp2c8xwvBn4h2Ry50g7", "name": "Code Assistant MCP Server", "mcpServerId": "mcp2c8xwvBn4h2Ry50g7", "endpointUrl": "https://mcp.example.com", "clientAuthSettings": {}, "_links": {} }, "_links": { "self": {} } }