https://retellai.com/?utm_source=discord&utm_medium=seo logo
how can I pass query params in mcp server
# ❓・ai-evy-support
c
@AI Evy how can I pass query params in mcp server?
a
Thanks for tagging me @classic.connect. I'll look through relevant sources and get back to you shortly.
### Answer You can pass query parameters to your MCP server in Retell AI by configuring them during the MCP setup process [(1) ]() . When setting up an MCP Node in Conversation Flow, you can define query parameters that Retell includes in the request URL to your MCP Server Endpoint . Similarly, for Single/Multi Prompt agents, you can define query parameters to include in the request URL that Retell appends to your MCP Server Endpoint [(2) ]() . The query parameters can include dynamic variables from your conversation [(3) ]() . For example, you can pass user inputs like age, zip code, or order number using dynamic variables . In the API configuration, query parameters are structured as key-value pairs [(4) ]() [(5) ]() [(6) ]() [(7) ]() :
Copy code
json
"query_params": {
  "index": "1",
  "key": "value"
}
[(4) ]() , [(5) ]() , [(6) ]() , [(7) ]() This allows you to pass structured data from the conversation context to your external MCP server through URL parameters [(1) ]() [(2) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
I am using single prompt flow and setting query params in the UI but when the agent is making tool calls using my mcp server then these params are not being passed
@AI Evy
a
Thanks for the follow-up, @classic.connect. I'll get back to you soon.
### Answer For single/multi prompt agents, you can configure query parameters in the MCP setup process [(1) ]() . The documentation shows you can define query parameters to include in the request URL that Retell appends to your MCP Server Endpoint . From the setup steps, you need to: 1. Add MCP to your agent by connecting to the MCP server 2. Set query parameters (optional) - you can define query parameters to include in the request URL that Retell appends to your MCP Server Endpoint 3. Select the MCP tool from the list of available tools The guide also mentions that you can pass user inputs like age, zip code, or order number using query parameters with dynamic variables [(2) ]() . If the query parameters aren't being passed despite configuring them in the UI, this could be a configuration issue. The documentation indicates that query parameters should be included in the request URL to your MCP server endpoint [(1) ]() . Check out these potentially useful sources: [MCP]() , [Connect any AI Voice Agent to MCP with Retell AI MCP Node (Guide) | Retell AI]() Visit [Contact Sales]() or [) if you need further assistance with this configuration issue.
​ To learn more, see the sources I considered: [[1] MCP](https://docs.retellai.com/build/single-multi-prompt/mcp) [[2] Connect any AI Voice Agent to MCP with Retell AI MCP Node (Guide) | Retell AI](https://www.retellai.com/blog/connect-any-ai-voice-agent-to-mcp-with-retell-ai-mcp-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy can I not use mcp in chat completion api?
a
Thanks for the follow-up, @classic.connect. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific information about MCP support in Retell AI's chat completion API. The documentation I have access to covers MCP implementation in two main contexts: 1. Conversation Flow agents - where MCP nodes are used to call tools on your MCP server [(1) ]() 2. Single/Multi Prompt agents - where you can add MCP by connecting your agent to the MCP server The API documentation shows MCP configuration within conversation flows, where you can define MCP servers with headers, query parameters, and timeout settings [(2) ]() [(3) ]() :
Copy code
json
"mcps": [
  {
    "name": "<string>",
    "url": "<string>",
    "headers": {
      "Authorization": "Bearer 1234567890"
    },
    "query_params": {
      "index": "1",
      "key": "value"
    },
    "timeout_ms": 123
  }
]
[(2) ]() However, the sources don't specifically address whether MCP can be used directly with a chat completion API endpoint outside of these agent contexts [(1) ]() [(2) ]() [(4) ]() . Check out these potentially useful sources: [MCP Node]() , [Create Conversation Flow]() Visit [Contact Sales]() or [) for clarification on MCP support in chat completion APIs. Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] MCP Node](https://docs.retellai.com/build/conversation-flow/mcp-node) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[3] Update Conversation Flow](https://docs.retellai.com/api-references/update-conversation-flow) [[4] Connect any AI Voice Agent to MCP with Retell AI MCP Node (Guide) | Retell AI](https://www.retellai.com/blog/connect-any-ai-voice-agent-to-mcp-with-retell-ai-mcp-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Appreciate the feedback! Feel free to ask me again with additional guidance or context.