anton333_50203
08/05/2025, 8:10 PMAI Evy
08/05/2025, 8:10 PMAI Evy
08/05/2025, 8:11 PMAI Evy
08/05/2025, 8:11 PMAI Evy
08/05/2025, 8:11 PMAI Evy
08/05/2025, 8:11 PManton333_50203
08/07/2025, 11:22 AMAI Evy
08/07/2025, 11:22 AMAI Evy
08/07/2025, 11:23 AMAI Evy
08/07/2025, 11:23 AMAI Evy
08/07/2025, 11:23 AManton333_50203
08/07/2025, 11:24 AMAI Evy
08/07/2025, 11:24 AMAI Evy
08/07/2025, 11:24 AMAI Evy
08/07/2025, 11:24 AMAI Evy
08/07/2025, 11:24 AMAI Evy
08/07/2025, 11:24 AManton333_50203
08/07/2025, 12:51 PMAI Evy
08/07/2025, 12:51 PMAI Evy
08/07/2025, 12:51 PMjson
{
"properties": {
"user": {
"name": "John Doe",
"age": 26
}
}
}AI Evy
08/07/2025, 12:51 PMproperties.user.name as a variable like user_name, and use it in follow-ups [(3) ]() .
### For Conversation Flow:
1. Add MCP Server [(2) ]() :
- Create a new MCP node in your conversation flow
- Connect to your n8n MCP server
2. Configure Node Settings :
- Set request headers (optional)
- Set query parameters (optional)
- Add MCP Tool
- Set response variables (optional)
## Step 3: Test the Integration
Based on the tutorial [(4) ]() , you can test by:
- Creating a simple agent with MCP functionality
- Testing the connection to ensure your n8n workflows trigger properly
- Verifying that responses return to your Retell agent correctly
## Common Issues to Watch For:
- Scanning Loop Issue [(5) ]() : If you get stuck in a scanning loop when adding tools, verify that your n8n MCP server endpoint is accessible and check the MCP server URL format and authentication
- Webhook Delivery [(6) ]() : In production, ensure the second webhook reaches n8n properly - you may need to split into two workflows or use a Switch node to handle different webhook types separately
The key advantage is that MCP allows your agent to call external tools mid-conversation without compromising latency, reliability, or control [(3) ]() .AI Evy
08/07/2025, 12:51 PMAI Evy
08/07/2025, 12:51 PManton333_50203
08/07/2025, 12:57 PManton333_50203
08/07/2025, 12:57 PMAI Evy
08/07/2025, 12:57 PMAI Evy
08/07/2025, 12:57 PMcheck_availability, book_appointment, etc., but they all route to the same n8n workflow endpoint.
## Single Workflow Architecture
In your n8n workflow, you would:
1. Use a Switch node to route different function calls based on the tool name or parameters sent from Retell AI
2. Handle multiple functions in branches of the same workflow
3. Return appropriate responses for each function type
This approach is supported by the community experience where users have mentioned using Switch nodes to handle different webhook types separately [(3) ]() .
## Benefits of This Approach
- **Reduced complexity**: Instead of maintaining separate workflows for each function, you have one centralized workflow
- **Better maintenance**: All your Retell AI integrations are in one place
- **Consistent error handling**: Shared error handling logic across all functions
- **Simplified authentication**: One set of headers and authentication for all tools
## Configuration in Retell AI
You would still configure each tool separately in the Retell AI dashboard (check_availability, book_appointment, etc.) , but they all point to the same MCP server URL [(2) ]() . The differentiation happens within your n8n workflow using the SwitchAI Evy
08/07/2025, 12:57 PMAI Evy
08/07/2025, 12:57 PManton333_50203
08/07/2025, 1:48 PManton333_50203
08/07/2025, 1:48 PMAI Evy
08/07/2025, 1:48 PMAI Evy
08/07/2025, 1:48 PMAI Evy
08/07/2025, 1:48 PMAI Evy
08/07/2025, 1:48 PMAI Evy
08/07/2025, 1:48 PManton333_50203
08/07/2025, 1:51 PManton333_50203
08/07/2025, 1:51 PMAI Evy
08/07/2025, 1:51 PMAI Evy
08/07/2025, 1:52 PM/list_tools endpoint returning available tools
- /call_tool endpoint for tool execution
- Proper error handling and response formats
You can test your server configuration with this command :
curl -X POST [your-replit-mcp-endpoint]/list_toolsAI Evy
08/07/2025, 1:52 PM/mcp URL endpoints . Some older MCP integrations haven't been upgraded yet to support two-way /mcp communication .
## Issue 2: MCP vs Functions - Key Differences
You're correct that you can already process data mid-conversation using functions. Here's the distinction:
MCP (Model Context Protocol) :
- Acts as a central hub that manages communication between your agent and external tools [(2) ]()
- The MCP server forwards requests to the host, gets the result, and sends it back to the agent
- This setup keeps connections secure and organized, which lets your agent access many services flexibly
Regular Functions:
- Built-in capabilities that can be called during conversations
- Process data and respond back via webhooks as you're currently doing
The main advantage of MCP is the standardized protocol for agent-to-tool communication, eliminating the N×M integration problem entirely [(3) ]() . MCP servers have shown 25% lower memory usage and 15% lower CPU utilization compared to traditional custom integration patterns .
However, if your current function-based approach is working well for your use case, MCP may not provide significant additional benefits beyond the architectural advantages.
For your tools loading issue, I'd recommend checking your MCP server endpoints and ensuring they follow the standard format outlined in the troubleshooting steps above.AI Evy
08/07/2025, 1:52 PMAI Evy
08/07/2025, 1:52 PManton333_50203
08/07/2025, 1:55 PMAI Evy
08/07/2025, 1:55 PMAI Evy
08/07/2025, 1:55 PMAI Evy
08/07/2025, 1:55 PMAI Evy
08/07/2025, 1:55 PManton333_50203
08/07/2025, 1:58 PMAI Evy
08/07/2025, 1:58 PMAI Evy
08/07/2025, 1:58 PMAI Evy
08/07/2025, 1:58 PMAI Evy
08/07/2025, 1:58 PManton333_50203
08/07/2025, 3:27 PMAI Evy
08/07/2025, 3:27 PMAI Evy
08/07/2025, 3:28 PM{{user_name}} .
## Use Case Benefits
MCP is particularly powerful because it allows your agent to access many services flexibly while keeping connections secure and organized [(4) ]() . This eliminates the N×M integratAI Evy
08/07/2025, 3:28 PMAI Evy
08/07/2025, 3:28 PMAI Evy
08/07/2025, 3:28 PManton333_50203
08/07/2025, 3:29 PMAI Evy
08/07/2025, 3:29 PMAI Evy
08/07/2025, 3:29 PMWhen user states his name and phone number, please call tool `verify_user` function.
## For Your Address Verification Use Case
Based on this pattern, for address verification you would write something like:
**Function Description**: "Call this function when the user provides their complete address (street, city, state/province, postal code) and you need to verify if the address exists and is valid."
**In Your Agent Prompt**: "When the user provides their full address including street, city, and postal code, call the verify_address function to validate the address before proceeding."
## Key Points for Effective Function Descriptions
1. Be specific about triggers - clearly state what user input or conversation state should trigger the function
2. Include context - explain what information needs to be gathered before calling the function
3. Define the purpose - make it clear what the function accomplishes
The documentation emphasizes that it's best to include in the prompt explicitly when is the best time to invoke the MCP tool , so your function descriptions should work in conjunction with your agent's main prompt to create clear trigger conditions.AI Evy
08/07/2025, 3:29 PMAI Evy
08/07/2025, 3:29 PManton333_50203
08/07/2025, 3:31 PMAI Evy
08/07/2025, 3:31 PMAI Evy
08/07/2025, 3:31 PMAI Evy
08/07/2025, 3:31 PMAI Evy
08/07/2025, 3:31 PMHuggy
08/07/2025, 11:20 PMAI Evy
08/07/2025, 11:20 PMAI Evy
08/07/2025, 11:20 PM{{user_name}} .
## MCP vs Custom Functions in Conversation Flow
Regarding the advantages of MCP over custom functions in Conversation Flow, the documentation indicates that MCP nodes are not intended for having a conversation with the user, but agents can still talk while in this node if needed .
The key architectural difference is that MCP introduces a standardized protocol for agent-to-tool communication, eliminating the N×M integration problem entirely [(2) ]() . MCP servers have shown 25% lower memory usage and 15% lower CPU utilization compared to traditional custom integration patterns .
However, you raise a valid point about HTTP streaming/SSE support limitations. The sources don't provide specific details about the technical advantages of MCP nodes over custom functions in Conversation Flow beyond the standardization benefits.
For more detailed technical comparisons and streaming capabilities:
Visit [ContaAI Evy
08/07/2025, 11:20 PMAI Evy
08/07/2025, 11:20 PManton333_50203
08/08/2025, 12:20 PMAI Evy
08/08/2025, 12:20 PMAI Evy
08/08/2025, 12:21 PMAI Evy
08/08/2025, 12:21 PMAI Evy
08/08/2025, 12:21 PMAI Evy
08/08/2025, 12:21 PManton333_50203
08/08/2025, 12:25 PMAI Evy
08/08/2025, 12:25 PMAI Evy
08/08/2025, 12:25 PMWhen user states his name and phone number, please call tool `verify_user` function.AI Evy
08/08/2025, 12:25 PMAI Evy
08/08/2025, 12:25 PMAI Evy
08/08/2025, 12:25 PManton333_50203
08/08/2025, 12:27 PMAI Evy
08/08/2025, 12:27 PMAI Evy
08/08/2025, 12:27 PMAI Evy
08/08/2025, 12:27 PMAI Evy
08/08/2025, 12:27 PMAI Evy
08/08/2025, 12:27 PManton333_50203
08/08/2025, 12:29 PManton333_50203
08/08/2025, 12:29 PMAI Evy
08/08/2025, 12:29 PMAI Evy
08/08/2025, 12:29 PMAI Evy
08/08/2025, 12:29 PMAI Evy
08/08/2025, 12:29 PManton333_50203
08/08/2025, 12:30 PMAI Evy
08/08/2025, 12:30 PMAI Evy
08/08/2025, 12:31 PMAI Evy
08/08/2025, 12:31 PMAI Evy
08/08/2025, 12:31 PManton333_50203
08/08/2025, 12:33 PMAI Evy
08/08/2025, 12:33 PMAI Evy
08/08/2025, 12:33 PMAI Evy
08/08/2025, 12:33 PMAI Evy
08/08/2025, 12:33 PManton333_50203
08/08/2025, 12:49 PMAI Evy
08/08/2025, 12:49 PMAI Evy
08/08/2025, 12:49 PM{{user_name}} .
Example response body structure:
json
{
"properties": {
"user": {
"name": "John Doe",
"age": 26
}
}
}AI Evy
08/08/2025, 12:49 PMproperties.user.name as a variable like user_name, and use it in follow-ups [(4) ]() . This allows you to capture inputs, send structured requests, and use results to personalize dialogue .
So while the default behavior might appear to send data as "query," you have control over the data transmission format through headers, query parameters, and response variable extraction based on your MCP server configuration.AI Evy
08/08/2025, 12:49 PMAI Evy
08/08/2025, 12:49 PManton333_50203
08/08/2025, 1:18 PMAI Evy
08/08/2025, 1:18 PMAI Evy
08/08/2025, 1:18 PMx-retell-signature header [(1) ]() . Make sure your MCP server is correctly handling the signature verification that Retell requires .
## Response Structure
Your MCP tool should return a properly structured response that can be parsed correctly [(2) ]() [(3) ]() . The example response structure should look like:
json
{
"properties": {
"user": {
"name": "John Doe",
"age": 26
}
}
}AI Evy
08/08/2025, 1:18 PMAI Evy
08/08/2025, 1:18 PMAI Evy
08/08/2025, 1:18 PManton333_50203
08/08/2025, 1:21 PMAI Evy
08/08/2025, 1:21 PMAI Evy
08/08/2025, 1:21 PMjson
{
"properties": {
"user": {
"name": "John Doe",
"age": 26
}
}
}
## Your Current Structure Issue
Your current JSON structure:
json
[
{
"json": {
"address_response": {{ $json.address_response }}
}
}
]
This appears to be an array containing an object, which may not match what Retell AI's MCP implementation expects. The "Cannot read properties of undefined (reading 'find') " error suggests the code is trying to call .find() on something that's undefined, likely because it's expecting a different data structure.
## Troubleshooting Steps
1. **Check MCP Server Endpoints**: Your MCP server should expose /list_tools endpoint returning available tools and /call_tool endpoint for tool execution with proper error handling and response formats [(3) ]() .
2. **Verify Response Structure**: Ensure your MCP server returns a properly structured JSON object (not an array) that matches the expected schema [(1) ]() [(2) ]() .
3. **Test Server Independently**: You can test your MCP server with this command: curl -X POST [your-mcp-endpoint]/list_tools [(3) ]() .
## Recommended JSON Structure
Try restructuring your response to match the expected format:AI Evy
08/08/2025, 1:21 PMAI Evy
08/08/2025, 1:21 PManton333_50203
08/08/2025, 1:55 PMAI Evy
08/08/2025, 1:55 PMAI Evy
08/08/2025, 1:56 PMAI Evy
08/08/2025, 1:56 PMAI Evy
08/08/2025, 1:56 PMAI Evy
08/08/2025, 1:56 PManton333_50203
08/08/2025, 2:04 PMAI Evy
08/08/2025, 2:04 PMAI Evy
08/08/2025, 2:04 PM{{booking_id}} .
## Benefits of MCP for Booking
MCP enables your agent to securely interact with external services autonomously while staying in the flow of the call . This means all your booking logic canAI Evy
08/08/2025, 2:04 PMAI Evy
08/08/2025, 2:04 PMAI Evy
08/08/2025, 2:04 PManton333_50203
08/08/2025, 4:17 PMAI Evy
08/08/2025, 4:17 PMAI Evy
08/08/2025, 4:17 PMjson
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city of the weather"
}
},
"required": [
"city"
]
}
## How Retell Sends Information
When your custom function is called, Retell sends a structured request to your endpoint with this format [(1) ]() [(3) ]() :
json
{
"call": {
"call_type": "phone_call",
"from_number": "+12137771234",
"to_number": "+12137771235",
"direction": "inbound",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"call_status": "registered",
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"opt_out_sensitive_data_storage": true
},
"name": "get_weather",
"args": {
"city": "New York"
}
}AI Evy
08/08/2025, 4:17 PMWhen user provided the city name, please get the weather for that city by calling the `get_weather` function.
So you do need to define the JSON schema for your parameters - this is how Retell understands what information to send to each tool.AI Evy
08/08/2025, 4:17 PMAI Evy
08/08/2025, 4:17 PManton333_50203
08/08/2025, 4:17 PMAI Evy
08/08/2025, 4:17 PMAI Evy
08/08/2025, 4:18 PM/list_tools endpoint [(3) ]() . Your MCP server should expose:
- /list_tools endpoint returning available tools
- /call_tool endpoint for tool execution
## MCP Server Responsibilities
Your MCP server handles the tool definitions, including:
- Tool names and descriptions
- Parameter schemas
- Input validation
- Response formatting [(2) ]()
The MCP server acts as a central hub that manages communication between your agent and external tools [(4) ]() . When the agent needs to use a tool, it asks the server, which forwards requests to the host, gets the result, and sends it back to the agent .
## Retell's MCP Configuration
In Retell's MCP node configuration, you only need to specify [(1) ]() :
1. MCP server URL
2. Timeout (default is 10,000 ms)
3. Optional custom headers like authorization tokens
4. Optional query parameters
5. Select which MCP tools to enable from those available on your server
## LLM Decision Making with MCP
The LLM makes decisions about when and how to call MCP tools based on the tool descriptions provided by your MAI Evy
08/08/2025, 4:18 PMAI Evy
08/08/2025, 4:18 PMAI Evy
08/08/2025, 4:18 PManton333_50203
08/09/2025, 12:05 PMAI Evy
08/09/2025, 12:05 PMAI Evy
08/09/2025, 12:05 PM/list_tools endpoint that returns available tools with their parameter definitions.
## Current Limitation with Dynamic Variables
From the Discord discussion, there's a known limitation with passing dynamic variables to MCP tools [(3) ]() . As one community member noted: "you can't set up dynamic variables in the call directly (not yet) , you have to use custom function, and extract it using JSON parameters" .
The issue you're experiencing where Retell sends data as "query" suggests that the variable doesn't have a value at the moment the request is sent . When a dynamic variable like {{customer_searched_name}} has no value, it gets sent literally as the string rather than the extracted value .
## Workaround Approach
Based on the community discussion, the current workaround is :
1. Use a custom function to extract the data using JSON parameters
2. Send the extracted data back to the call as a dynamic variable
3. Then use that dynamic variable in subsequent MCP tool calls
## MCP Server Responsibility
Your MCP server needs to define the parameter names and schemas that determine what variable names are expected [(2) ]() . The LLM makes decisions about wheAI Evy
08/09/2025, 12:05 PMAI Evy
08/09/2025, 12:05 PMAI Evy
08/09/2025, 12:05 PManton333_50203
08/09/2025, 1:51 PMAI Evy
08/09/2025, 1:51 PMAI Evy
08/09/2025, 1:52 PM/mcp communication format, particularly with make.com and similar platforms that still use the older SSE (Server-Sent Events) style MCP server format .
## MCP Server Endpoint Requirements
Your MCP server should expose the correct endpoints :
- /list_tools endpoint returning available tools
- /call_tool endpoint for tool execution
- Proper error handling and response formats
You can test your MCP server independently with this command :
bash
curl -X POST [your-mcp-endpoint]/list_toolsAI Evy
08/09/2025, 1:52 PM/mcp communication format rather than the older SSE style [(1) ]()
2. **Check Response Structure**: Ensure your MCP server returns properly structured JSON that matches the expected schema [(3) ]() [(4) ]() :
json
{
"properties": {
"user": {
"name": "John Doe",
"age": 26
}
}
}
3. **Test Server Endpoints**: Verify your MCP server configuration and ensure it's accessible [(1) ]()
The empty array [{}] response suggests there's a communication issue between Retell's MCP implementation and your n8n server, likely related to endpoint compatibility or response formatting.AI Evy
08/09/2025, 1:52 PMAI Evy
08/09/2025, 1:52 PManton333_50203
08/09/2025, 2:01 PMAI Evy
08/09/2025, 2:01 PMAI Evy
08/09/2025, 2:01 PM/list_tools endpoint returning available tools
- /call_tool endpoint for tool execution [(3) ]()
## Tool Definition Requirements
Your MCP server needs to properly define the tool parameters that determine what variable names and data structure are expected [(4) ]() . The LLM makes decisions about when and how to call MCP tools based on the tool descriptions provided by your MCP server .
## Query Parameters Configuration
In Retell's MCP configuration, you can define query parameters to include in the request URL that Retell appends to your MCP Server Endpoint [(1) ]() [(2) ]() . However, if these aren't properly configured or if your MCP server isn't correctly defining the expected parameters, Retell may default to sending generic "query" data.
## Troubleshooting Steps
1. **Verify MCP Server Endpoints**: Test your MCP server with this command: curl -X POST [your-mcp-endpoint]/list_tools [(3) ]()
2. **Check Tool Definitions**: Ensure your n8n MCP server proAI Evy
08/09/2025, 2:01 PM/list_tools response
3. **Server Compatibility**: Some MCP integrations haven't been upgraded to support the newer two-way /mcp communication format . N8N may need to support the current MCP protocol that Retell uses.
The "query" parameter suggests that either your MCP server isn't defining specific parameter names, or there's a compatibility issue between Retell's MCP implementation and n8n's MCP server format.AI Evy
08/09/2025, 2:01 PMAI Evy
08/09/2025, 2:01 PManton333_50203
08/09/2025, 2:28 PMAI Evy
08/09/2025, 2:28 PMAI Evy
08/09/2025, 2:28 PMAI Evy
08/09/2025, 2:28 PM/list_tools endpoint returning available tools
- /call_tool endpoint for tool execution
- Proper error handling and response formats
You can test your server with: curl -X POST [your-mcp-endpoint]/list_tools .
## Current State
Based on the community discussions, it appears that while MCP is a powerful feature in theory [(4) ]() , the practical implementation with self-hosted n8n faces several technical hurdles that the community is still working through.AI Evy
08/09/2025, 2:28 PMAI Evy
08/09/2025, 2:28 PManton333_50203
08/11/2025, 9:22 AManton333_50203
08/11/2025, 9:22 AMAI Evy
08/11/2025, 9:22 AMAI Evy
08/11/2025, 9:23 AMAI Evy
08/11/2025, 9:23 AMAI Evy
08/11/2025, 9:23 AMAI Evy
08/11/2025, 9:23 AManton333_50203
08/11/2025, 9:25 AMAI Evy
08/11/2025, 9:25 AMAI Evy
08/11/2025, 9:25 AMjson
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
]
}
]AI Evy
08/11/2025, 9:25 AMretell_llm_dynamic_variables
- Collected during workflow executions and function calls
- Added through tool responses during the conversation
The post-call analysis system can then reference these collected dynamic variables when extracting data after the call ends [(1) ]() . You need to explicitly configure which dynamic variables or data points you want included in the post-call analysis - they won't automatically appear just because they exist as dynamic variables [(3) ]() .
## Community Experience
From community discussions, there can be inconsistencies with dynamic variable capture [(4) ]() . Sometimes dynamic variables are captured in the Data tab but not used as expected in functions or analysis . The LLM will try to fill the post-call analysis variables, but there's no guarantee all fields will be populated [(3) ]() .AI Evy
08/11/2025, 9:25 AMAI Evy
08/11/2025, 9:25 AM