MCP tools
The Model Context Protocol (MCP) integration allows your Vapi assistant to dynamically access tools from MCP servers during calls. This enables your assistant to:
- Connect to any MCP-compatible server
- Access tools dynamically at runtime
- Execute actions through the MCP server
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.
Prerequisites
Before you can use the MCP integration, you need to:
- Have access to the Vapi Dashboard
- Have an assistant created in Vapi
- Have access to an MCP server URL (e.g., from Make, Zapier, Composio, or other MCP providers)
Setup Steps
1. Obtain MCP Server URL
First, you need to obtain an MCP server URL from your chosen provider:
- Sign up for an MCP-compatible service (e.g., Make, Zapier, Composio)
- Navigate to the MCP configuration section of your provider
- Generate or copy your MCP server URL
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.
For Make MCP, create an MCP token and construct the connection URL described in Make’s documentation. Treat the token and any URL containing it as credentials.
2. Create and Configure MCP Tool
After obtaining your MCP server URL, create and configure the tool:
- Go to Dashboard > Tools page
- Click the Create Tool button
- Select MCP from the available options
- Provide a name and description explaining when it should be invoked
- Configure the tool with the following required field:
- Server URL: The URL of your MCP server
The Dashboard labels this field Server URL. In an API request, configure the same value as server.url.
The MCP server URL should be treated as a credential and kept secure. It will be used to authenticate requests to the MCP server.
3. Add Tool to Assistant
Now, add the MCP tool to your assistant:
- Navigate to Dashboard > Assistants page
- Select your assistant
- Go to the Tools tab
- In the tools dropdown, select your MCP tool
- Click Publish to save your changes
How MCP Works
The MCP integration follows these steps during a call or chat session:
- When a call or chat starts, Vapi connects to your configured MCP server using Streamable HTTP protocol by default, fetches the list of available tools, and dynamically adds them to your assistant’s available tools
- The assistant can then use these tools during the interaction
- Each time the model invokes a specific MCP tool, Vapi creates a new connection to the MCP server and sends the request with the
X-Call-Id/X-Chat-Idheader to identify the call or chat - The MCP server executes the action and returns the result
- This process repeats for every tool invocation, meaning multiple MCP sessions are created per call or chat
Vapi 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. Vapi imports the complete tool list exposed by the configured server and does not apply its own per-tool filter.
Expose only the tools the assistant needs. Large tool lists consume model context and can increase latency and timeout risk. Use the MCP provider’s access controls and least-privilege credentials to keep the tool surface focused.
Request Headers
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 session
Tool Configuration
MCP Tool
This 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 connectionprotocol: Communication protocol to use. Options are:"shttp"(default): Uses Streamable HTTP protocol"sse": (deprecated) Uses Server-Sent Events protocol
The server URL should be treated as a credential and kept secure. It will be used to authenticate requests to the MCP server.
Example Usage
Here’s how the MCP tool can be used in your assistant’s configuration:
Default Configuration (Streamable HTTP)
Custom Configuration (SSE Protocol)
If you need to use Server-Sent Events protocol instead:
Best Practices
- Protocol Selection: Use the default Streamable HTTP protocol. SSE is deprecated and should be used only when required by the server
- Dynamic Tool Awareness: Be aware that the available tools may change between calls
- Clear Instructions: Provide clear instructions in your assistant’s system message about how to handle dynamic tools
- Error Handling: Include fallback responses for cases where tools fail or are unavailable
- User Communication: Explain to users what tools you’re using and what actions you’re taking
- Security: Treat the MCP server URL as a credential and keep it secure
Example MCP Providers
Make MCP
Make MCP can expose active, on-demand scenarios as tools and can expose account-management tools when the token has the corresponding scopes.
Prepare the scenarios
Define the inputs and outputs for each scenario, then set its schedule to On demand.
Limit scenario access
Use Make’s scenarios as tools access control to expose only the scenarios the assistant needs.
Scenario access-control parameters apply to scenario tools, not management tools. A broadly scoped token can expose management tools capable of modifying Make resources. Because Vapi imports every exposed tool, broad access also increases model context, latency, and timeout risk. Grant no management scopes unless the assistant needs them.
See Connect Vapi to Make to compare MCP with API Request and Function tools.
Zapier MCP
Zapier offers an MCP server that provides access to thousands of app integrations:
- Go to https://mcp.zapier.com/mcp/?client=vapi?
- Generate your MCP server URL
- Add the URL to your MCP tool configuration
- Your assistant will now have access to Zapier’s extensive integration network
Zapier MCP provides access to over 7,000+ apps and 30,000+ actions without requiring complex API integrations.
Composio MCP
Composio also offers an MCP server for integration:
- Log in to the Composio dashboard at dashboard.composio.dev
- Select the tool you want to integrate (e.g., Gmail)
- Enable the MCP server for the selected tool by connecting your account using authentication flow
- Create a server and copy the generated URL
- Add this URL as the Server URL in the Dashboard, or as
server.urlthrough the API - Your assistant will now have access to the specific Composio tool integration
Context 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:
- Configure your MCP tools to return focused, relevant data
- Use filtering parameters when available to limit response size
- Test your integration with realistic queries before deploying
- Monitor token usage and context size during development