Skip to main content
POST
/
api
/
v1
/
mcp
/
agents
/
{agent_id}
/
servers
Create Mcp Server
curl --request POST \
  --url https://agent-studio.thena.ai/api/v1/mcp/agents/{agent_id}/servers \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "auth_config": {
    "client_id": "your_client_id",
    "type": "oauth2"
  },
  "health_check_url": "https://api.salesforce.com/mcp/health",
  "name": "Salesforce MCP",
  "url": "https://api.salesforce.com/mcp"
}'
{
  "agent_id": "123e4567-e89b-12d3-a456-426614174001",
  "auth_config": {
    "client_id": "our_dynamically_registered_client_id",
    "type": "oauth2"
  },
  "created_at": "2023-01-01T00:00:00Z",
  "health_check_url": "https://api.salesforce.com/mcp/health",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "last_health_check": "2023-01-01T00:00:00Z",
  "name": "Salesforce MCP",
  "status": "connected",
  "updated_at": "2023-01-01T00:00:00Z",
  "url": "https://api.salesforce.com/mcp"
}

Authorizations

x-api-key
string
header
required

Path Parameters

agent_id
string
required

Body

application/json

Model for creating an MCP server configuration.

name
string
required

Display name of the MCP server

url
string
required

URL of the MCP server

agent_id
string<uuid>
required

ID of the agent

auth_config
object | null

Authentication configuration for the MCP server

tool_discovery_endpoint
string | null
default:/tools

The endpoint path for tool discovery, defaults to /tools

health_check_url
string | null

URL for health check endpoint

Response

Successful Response

Model for an MCP server configuration.

name
string
required

Display name of the MCP server

url
string
required

URL of the MCP server

id
string<uuid>
required

Unique identifier for the MCP server

agent_id
string<uuid>
required

ID of the agent this MCP server belongs to

created_at
string<date-time>
required

When the MCP server was configured

updated_at
string<date-time>
required

When the MCP server was last updated

auth_config
object | null

Authentication configuration for the MCP server

tool_discovery_endpoint
string | null
default:/tools

The endpoint path for tool discovery, defaults to /tools

health_check_url
string | null

URL for health check endpoint

status
string
default:disconnected

Connection status: 'connected', 'disconnected', 'error'

last_health_check
string<date-time> | null

Timestamp of the last health check

is_enabled
boolean
default:true

Whether the MCP server is enabled for use by the agent

deleted_at
string<date-time> | null

Timestamp when the server was soft-deleted

token_expires_at
string<date-time> | null

The timestamp when the OAuth access token expires

I