Skip to main content

MCP Tool (voice)

The MCP Tool turns your voice agent into an MCP client. The agent connects to an external MCP server during the call, discovers its tools, and uses them in-flight — for custom business logic, proprietary APIs, or third-party integrations without writing custom tool code.
This page is about the MCP client side — your voice agent consuming external MCP servers mid-call. Looking for the other direction? thinnestAI is itself an MCP server that Claude Desktop, ChatGPT, and Cursor can talk to. See MCP Server.

How It Works

Caller: "Can you check my loyalty points balance?"
Agent: "Let me look that up for you."
-> Agent calls mcp_call with tool_name="get_loyalty_balance"
-> MCP server processes the request and returns the balance
Agent: "You have 2,450 loyalty points, which is worth $24.50 in rewards."

Configuration

{
  "mcpServerEnabled": true,
  "mcpServerUrl": "https://mcp.your-company.com",
  "mcpServerApiKey": "mcp_key_...",
  "mcpAutoDiscoverTools": true,
  "mcpAllowedTools": ["get_loyalty_balance", "create_ticket", "lookup_order"],
  "mcpTimeout": 10000
}
SettingTypeDefaultDescription
mcpServerEnabledbooleanfalseEnable MCP integration
mcpServerUrlstringMCP server URL
mcpServerApiKeystringAPI key for authentication
mcpAutoDiscoverToolsbooleantrueAuto-discover available tools from the server
mcpAllowedToolsstring[][]Allowlist of tool names (empty = allow all)
mcpTimeoutinteger10000Timeout in milliseconds

LLM Tool

Tool name: mcp_call Call any tool on the connected MCP server.
Parameters:
  tool_name: string (name of the MCP tool to call)
  parameters: string (JSON object of parameters)

Returns: JSON result from the MCP server
If the tool is not in the allowlist:
Returns: "Tool 'tool_name' is not in the allowed tools list."

Security

  • Allowlist: Use mcpAllowedTools to restrict which MCP tools the agent can call
  • Authentication: The mcpServerApiKey is sent as a Bearer token in the Authorization header
  • Timeout: Configurable per-call timeout prevents hanging calls

Example — Create Agent with MCP Integration

curl -X POST https://api.thinnest.ai/v1/agents \
  -H "Authorization: Bearer $THINNESTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Loyalty Program Agent",
    "model": "gpt-4o",
    "instructions": "You help callers with their loyalty program. Use the mcp_call tool to check balances, redeem points, and look up order history. Available tools: get_loyalty_balance, redeem_points, lookup_order.",
    "voiceEnabled": true,
    "transcriber": { "provider": "deepgram", "model": "nova-2-conversationalai" },
    "voice": { "provider": "deepgram", "voiceId": "aura-2-thalia-en" },
    "mcpServerEnabled": true,
    "mcpServerUrl": "https://mcp.your-company.com",
    "mcpServerApiKey": "mcp_key_...",
    "mcpAutoDiscoverTools": true,
    "mcpAllowedTools": ["get_loyalty_balance", "redeem_points", "lookup_order"],
    "mcpTimeout": 10000
  }'