We need assiatnt id in the mcp tool call header has anyone done this. This is what we got from support but it did not work
Hi Sean,
Good news — you can already include the Assistant ID in MCP tool call headers using variable substitution. The assistant.id value is available in the runtime context and can be injected into your request headers with Liquid-style syntax.
Here’s how to configure it:
{
"type": "mcp",
"server": {
"url": "https://your-mcp-server.com",
"headers": {
"X-Assistant-Id": "{{assistant.id}}"
}
}
}
This will automatically populate the X-Assistant-Id header with the active assistant’s ID during tool calls.
Let me know if you’d like an example showing this in a live MCP request or confirmation of it appearing in your request logs.
Best,
Kyle
Vapi Support Team