Currently I'm trying to build an AI agent which helps users on my SaaS solution to interact with the application. The Agent I'm building with Agent Builder will call MCP tools on behalf of the user who is interacting with the agent. The MCP server therefore should know which user the agent is talking with. I'm having trouble implementing this:
- Headers and Bearer token can only be "hard coded" in plain text in the Agent Builder. So can't use this as dynamic Authentication.
- The user variable you pass on when starting the ChatKit session is no where to be seen after this. This is a required variable which just doesn't seem to be used at all.
- I can't find a way to match the mcp-session-id header with the Workflow session ID
I think this use cases happens a lot so there must be a way to implement this properly that I'm just not seeing. Who has already implemented this and how?