Skip to content

Commit cd5ba7e

Browse files
committed
Updated mcp tools doc
1 parent 671e9a5 commit cd5ba7e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

fern/tools/mcp.mdx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,17 @@ Now, add the MCP tool to your assistant:
6464

6565
## How MCP Works
6666

67-
The MCP integration follows these steps during a call:
68-
69-
1. When a call starts, Vapi connects to your configured MCP server using **Streamable HTTP** protocol by default
70-
2. The MCP server returns a list of available tools and their capabilities
71-
3. These tools are dynamically added to your assistant's available tools
72-
4. The assistant can then use these tools during the call
73-
5. When a tool is invoked, Vapi sends the request to the MCP server
74-
6. The MCP server executes the action and returns the result
67+
The MCP integration follows these steps during a call or chat session:
68+
69+
1. 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
70+
2. The assistant can then use these tools during the interaction
71+
3. **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-Id` header to identify the call or chat
72+
4. The MCP server executes the action and returns the result
73+
5. This process repeats for every tool invocation, meaning **multiple MCP sessions are created per call or chat**
74+
75+
<Note>
76+
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.
77+
</Note>
7578

7679
<Note>
7780
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.

0 commit comments

Comments
 (0)