Model Context Protocol (MCP) Integration
Model Context Protocol (MCP) Integration
Model Context Protocol (MCP) Integration
The Model Context Protocol (MCP) integration allows your Vapi assistant to dynamically access tools from MCP servers during calls. This enables your assistant to:
This powerful integration allows your assistant to leverage a wide range of tools without requiring individual integrations for each service.
Vapi also provides its own MCP server that exposes Vapi APIs as callable tools. See the Vapi MCP Server documentation to learn how to use it with Claude Desktop or custom applications.
Before you can use the MCP integration, you need to:
First, you need to obtain an MCP server URL from your chosen provider:
For Zapier MCP, visit https://mcp.zapier.com/mcp/?client=vapi? to generate your MCP server URL. This URL should be treated as a credential and kept secure.
To generate your Make MCP Server URL (also known as MCP Token), navigate to your Make profile > API Access tab > Tokens > Add token. See Obtaining MCP Token documentation for detailed instructions. This URL should be treated as a credential and kept secure.
After obtaining your MCP server URL, create and configure the tool:
serverUrl: The URL of your MCP serverThe MCP server URL should be treated as a credential and kept secure. It will be used to authenticate requests to the MCP server.
Now, add the MCP tool to your assistant:
The MCP integration follows these steps during a call or chat session:
X-Call-Id/X-Chat-Id header to identify the call or chatVapi uses multiple MCP sessions throughout a single conversation to ensure consistent behavior across both calls and chat interactions. Each tool execution creates a separate connection to the MCP server, allowing for isolated and reliable tool execution. All tool invocations include the X-Call-Id/X-Chat-Id header to identify the specific call or chat.
The MCP tool itself is not meant to be invoked by the model. It serves as a configuration mechanism for Vapi to fetch and inject the specific tool definitions from the MCP server into the model’s context.
The tools available through MCP are determined by your MCP server provider. Different providers may offer different sets of tools.
MCP requests from Vapi include identifying headers to help with context and debugging:
X-Call-Id: Included in requests during voice calls to identify the specific callX-Chat-Id: Included in requests during chat interactions to identify the specific chatX-Session-Id: Included in requests during chat interaction if the chat is part of a sessionThis tool uses the following configuration options:
Required:
server.url: The URL of your MCP server (e.g., https://mcp.zapier.com/api/mcp/s/********/mcp)Optional:
server.headers: Custom headers to include in requests to the MCP servermetadata: Additional configuration options for the MCP connection
protocol: Communication protocol to use. Options are:
"shttp" (default): Uses Streamable HTTP protocol"sse": (deprecated) Uses Server-Sent Events protocolThe server URL should be treated as a credential and kept secure. It will be used to authenticate requests to the MCP server.
Here’s how the MCP tool can be used in your assistant’s configuration:
If you need to use Server-Sent Events protocol instead:
The Make MCP Server provides access to the Make scenarios you select, allowing you to provision them as Custom Tools through MCP.
Make Cloud MCP allows you to build simple or complex Custom Tools using business logic to access the most important apps in your business tech stack. Check the full list in the Make app gallery.
Zapier offers an MCP server that provides access to thousands of app integrations:
Zapier MCP provides access to over 7,000+ apps and 30,000+ actions without requiring complex API integrations.
Composio also offers an MCP server for integration:
serverUrlContext Overflow Warning: Some MCP server tool calls (eg: GitHub API queries) may return large amounts of data. This can exceed model context limits, affecting assistant performance and potentially causing failures, especially with models like GPT-4o.
Best Practices: