Simulation environment MCP errors for Single-Prompt Agents - tool response 'not connected'

I built an MCP server using the official typescript SDK to expose a tool to my Retell agents. I am able to connect and establish sessions.

In the UI chat/voice test interface and in production there are no issues with the MCP handshake and extracting dynamic variables from the responses, however there is an issues with MCP tools in the Simulation environment/test runne.

Test id: test_job_ccef7f93000a
Agent id: agent_eb6e4b956b4ac772e4120fccf5

Test:

{
   "name":"Normal Flow - Printer Offline Issue",
   "dynamic_variables":{
      "assigned_tech":"John Martinez",
      "ticket_number":"T20231222-0145",
      "transfer_phone":""
   },
   "metrics":[
      "Ticket created successfully",
      "User received ticket number",
      "Proper issue categorization",
      "Clear next steps provided",
      "Call completed under 3 minutes"
   ],
   "user_prompt":"[Calling from +15555551234] Hi, my name is Alex Johnson. I'm calling because my office printer on the second floor has been offline since this morning. I've tried turning it off and on again but it's still not showing up on the network. The model is HP LaserJet Pro and it's the one next to the break room. We have several documents that need to be printed urgently for a client meeting this afternoon. Can you help me get this resolved?",
   "creation_timestamp":1734883200000,
   "user_modified_timestamp":1734883200000,
   "type":"simulation",
   "tool_mocks":[
      {
         "output":"{\"status\":\"success\",\"ticket_id\":\"12345\",\"ticket_number\":\"T20231222-0145\",\"assigned_tech\":\"John Martinez\",\"transfer_phone\":\"+17734699726\"}",
         "input_match_rule":{
            "type":"any"
         },
         "type":"mcp",
         "tool_name":"createTicket"
      }
   ],
   "llm_model":"gpt-4.1-mini"
}

Retell Conversation:

Agent: Creating your ticket now.

Tool Invocation: createTicket
tool_call_id: bc147b96b4241315

{
  "contactName": "Alex Johnson",
  "contactPhone": "+15555551234",
  "contactEmail": "alex.johnson@example.com",
  "preferredContactMethod": "phone",
  "title": "HP LaserJet Pro printer offline - second floor break room",
  "issueDescription": "HP LaserJet Pro printer located next to the break room on the second floor has been offline since this morning. User has tried restarting the printer but it's still not showing up on the network. No error lights or messages displayed on the printer itself. Other devices on the second floor are connecting to the network without issues. User needs this resolved urgently for client meeting this afternoon - no reliable workaround available as other printers are too far or busy. Work is currently blocked.",
  "ticketType": "2",
  "priority": "1",
  "externalID": "playground",
  "execution_message": "Creating your ticket now."
}

Tool Result
tool_call_id: bc147b96b4241315
"Not connected"

MCP Server logs:

> @layer7systems/autotask-mcp-retell@0.1.0 dev
> tsx src/index.ts

[dotenv@17.2.3] injecting env (10) from .env.development -- tip: ⚙️  specify custom .env file path with { path: '/custom/path/.env' }
[11:06:01.068] INFO (56344): Loaded IP addresses from whitelist
    count: 3
    file: "/Users/richardalvarez/Dev/layer7-systems/autotask-mcp-retell/.whitelist"
[11:06:01.072] INFO (56344): MCP server created with tool registered
    toolName: "createTicket"
[11:06:01.072] INFO (56344): MCP server instance created
[11:06:01.074] INFO (56344): MCP server started
    port: 3000
    auth: "enabled"
    ipWhitelist: "enabled (3 IPs)"
    autotaskConfigured: true
[11:07:00.585] INFO (56344): Incoming HTTP request
    method: "POST"
    path: "/mcp"
    sessionId: "none"
    authorization: "present"
[11:07:00.600] INFO (56344): MCP request received
    method: "initialize"
    sessionId: "none"
    id: 0
[11:07:00.602] INFO (56344): Initializing new session
[11:07:00.602] INFO (56344): Connecting transport to MCP server
[11:07:00.603] INFO (56344): Handling initialize request
[11:07:00.605] INFO (56344): Session initialized - transport stored
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
[11:07:00.876] INFO (56344): Incoming HTTP request
    method: "POST"
    path: "/mcp"
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
    authorization: "present"
[11:07:00.877] INFO (56344): MCP request received
    method: "notifications/initialized"
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
[11:07:00.878] INFO (56344): Handling request with existing transport
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
    method: "notifications/initialized"
[11:07:01.065] INFO (56344): Incoming HTTP request
    method: "GET"
    path: "/mcp"
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
    authorization: "present"
[11:07:01.065] INFO (56344): SSE connection request
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
    activeSessions: 1
[11:07:01.065] INFO (56344): New SSE stream establishing
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
[11:07:01.166] INFO (56344): Incoming HTTP request
    method: "POST"
    path: "/mcp"
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
    authorization: "present"
[11:07:01.167] INFO (56344): MCP request received
    method: "tools/list"
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
    id: 1
[11:07:01.167] INFO (56344): Handling request with existing transport
    sessionId: "943105e7-5906-4f09-a52f-8d264407484e"
    method: "tools/list"

Verified behavior:

  • MCP Handshake happens when a test is run.
  • Tool execution fails and mock function responses for MCP tools are not being used at runtime.
  • The format for MCP responses is not made explicit in the documentation (MCP Node - Retell AI). Following the MCP specification, I should be able to respond with structuredContent to Retell along with a systems message. Right now, I send stringified JSON objects using the text response type.

Preventing me from being able to unit test my agents without unintended mock API calls. And even if I wanted to run tools with my live MCP server, it seems as though the test runner cannot connect and execute them properly!

Hope this helps and we can solve it.

1 Like

I’m experiencing the exact same issue and I’m honestly surprised this is still unresolved months later.

I’m running a German restaurant voice agent with an MCP server that handles reservations (search, create, update, cancel) via tools like searchReservationsByPhone, getDaySlots, createReservation, etc. Everything works flawlessly in production calls, in the UI chat test, and in the voice test interface. The MCP handshake completes, tools execute correctly, dynamic variables are extracted — zero issues.

But the moment I try to use LLM Simulation Testing or Batch Testing, every single MCP tool call returns “Not connected”. Every. Single. One.

Just like @richardalvarezl7s described:

  • The MCP handshake does happen when a test is run
  • Tool execution fails regardless
  • Mock function responses for MCP tools are completely ignored at runtime
  • Dynamic variables are correctly set (current_time_Europe/Berlin, current_calendar_Europe/Berlin, user_number) — I’ve triple-checked

I also tried setting up Custom Function Mocks via the test case editor (the “Custom Function Mocks” tab), but the mock dropdown only seems to recognize custom webhook functions, not MCP tools. So there’s literally no way to mock MCP tool responses in simulation.

This effectively makes the entire simulation and batch testing feature useless for anyone using MCP — which Retell actively promotes as the recommended integration method. We can’t run automated test suites, we can’t validate agent behavior across scenarios, and we can’t do regression testing when we update prompts. The only option left is manually testing every flow via the chat interface or making real calls, which completely defeats the purpose of having a simulation environment.

MCP is clearly the future of tool integration and Retell has invested heavily in promoting it. But shipping a testing framework that doesn’t support the primary integration method is a significant gap. This should be a top priority fix.

Could someone from the Retell team please acknowledge this and provide a timeline? Even a simple “we’re aware and it’s on the roadmap” would help. Right now, the silence on this thread is concerning.

For reference:

  • Agent type: Single-prompt
  • MCP server: Custom (Node.js, hosted externally)
  • All tools work perfectly in production and manual testing
  • Simulation returns “Not connected” for every MCP tool call
  • Custom Function Mocks tab does not list MCP tools
1 Like