Developers
ENPT

MCP servers

Connect your own MCP server so the avatar can use its tools during a conversation.

MCP (Model Context Protocol) is an open standard for giving AI tools it can call. If your system exposes an MCP server (for example "check order status" or "book a visit"), you register it on an avatar. During a conversation the avatar sees the tools your server offers, picks the ones it needs and uses the results in its answer.

Each server is registered for one avatar. You can register more than one server per avatar, and turn each one off without deleting it.

When to use it

  • Your system already has an MCP server, or you prefer to expose tools that way instead of configuring each call as an automation.
  • You want the avatar to read live data (stock, order status, schedules) while it answers.

The tools used in each turn appear in the mcp field of Send a message.

Register or update a server

ReferenceTechnical details

POST /api/externalAPIs/public/tolkyReasoning/mcp/save

Authentication: host token. To create, send hostId, avatarId, name and config. To update, send id and only the fields that change.

ParameterTypeRequiredDescription
idstring (UUID)To updateServer to update.
hostIdstring (UUID)To createYour account ID.
avatarIdstring (UUID)To createAvatar that uses the server.
namestringTo createName of the server.
configobjectTo createConnection: url (server address) and optional headers (for example an API key).
transportTypestringNostreamable (default, Streamable HTTP) or sse.
controlConvbooleanNoDefault false. With true, every call to your server carries the conversation ID in a conversationId header.
enabledbooleanNoDefault true. With false, the avatar stops using the server.
versionstringNoVersion label. Default 1.0.0.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/mcp/save" \
  -H "Authorization: Bearer $TOLKY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "hostId": "<your-host-id>",
    "avatarId": "0d4e8f2a-...",
    "name": "orders",
    "transportType": "streamable",
    "controlConv": true,
    "config": {
      "url": "https://mcp.example.com/mcp",
      "headers": { "Authorization": "Bearer your-server-key" }
    }
  }'
{
  "code": 201,
  "message": "Created",
  "data": {
    "mcpId": "8a3e1c5b-...",
    "hostId": "<your-host-id>",
    "avatarId": "0d4e8f2a-...",
    "name": "orders",
    "controlConv": true,
    "transportType": "streamable",
    "config": { "url": "https://mcp.example.com/mcp", "headers": { "Authorization": "Bearer your-server-key" } },
    "version": "1.0.0"
  }
}

Updates also answer 201.

List servers

ReferenceTechnical details

POST /api/externalAPIs/public/tolkyReasoning/mcp/list

ParameterTypeRequiredDescription
hostIdstring (UUID)YesYour account ID.
avatarIdstring (UUID)NoOnly servers of this avatar.
curl -X POST "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/mcp/list" \
  -H "Authorization: Bearer $TOLKY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "hostId": "<your-host-id>" }'

Returns an array with the same fields as the save response (mcpId, hostId, avatarId, name, controlConv, transportType, config, version).

Delete a server

ReferenceTechnical details

DELETE /api/externalAPIs/public/tolkyReasoning/mcp/delete/{mcpId}

Authentication: host token (required; other tokens get 400). The server is removed permanently. To pause it instead, save it with enabled: false.

curl -X DELETE "https://api.tolky.to/api/externalAPIs/public/tolkyReasoning/mcp/delete/8a3e1c5b-..." \
  -H "Authorization: Bearer $TOLKY_TOKEN"
{ "code": 200, "message": "MCP config deleted successfully", "data": {} }

Errors

ErrorsTechnical details
StatusWhen
400A required field is missing or transportType is invalid.
404The server does not exist (update or delete).
408The request took more than 60 seconds (save, delete).
500Internal error.

Previous

Knowledge base

Next

Automations