MCP server user authentication
# support
v
How do I add a user token to MCP server tool call when voice agent makes a call to my own mcp server?
v
To add a user token to your MCP server tool call, you can configure the tool/server with custom headers, such as:
Copy code
json
{
  "server": {
    "url": "https://your-mcp-server.com/endpoint",
    "headers": {
      "Authorization": "Bearer your-user-token"
    }
  }
}
This will include the user token in each request from the voice agent to your MCP server. For more details, see the [server authentication documentation](https://docs.vapi.ai/server-url/server-authentication). Quick question: Do you need to set a different user token for each call (per user/session), or is a static token sufficient for your use case? Sources: - [Server Authentication](https://docs.vapi.ai/server-url/server-authentication) - [Custom Tools](https://docs.vapi.ai/tools/custom-tools)
v
@Vapi Support Bot different user token for each call per user session
v
To set a different user token for each call/session, configure the
Authorization
header at the tool call level in your MCP tool configuration.
This allows you to pass a unique token per request:
Copy code
json
{
  "server": {
    "url": "https://your-mcp-server.com/endpoint",
    "headers": {
      "Authorization": "Bearer <user-session-token>"
    }
  }
}
For more details, see the [server authentication documentation](https://docs.vapi.ai/server-url/server-authentication). Clarifying question: Are you looking to set the user token dynamically via API/backend code, or do you need to configure this manually in the dashboard for each call? Sources: - [Server Authentication](https://docs.vapi.ai/server-url/server-authentication) - [Custom Tools](https://docs.vapi.ai/tools/custom-tools)
a
checking if this is resolved/solved for you?
v
nope can't pass in unique token per session on header with liquidJS
a
I see that you have two tickets open with the same request. I will close this one and respond to you on the other ticket.
v
sure
u
any update on this issue?
2 Views