Usaid - Hi everyone ,I’m trying to connect to ...
Hi everyone ,
I’m trying to connect to the ThoughtSpot MCP Server from a backend Django application using the Bearer MCP endpoint: POST https://agent.thoughtspot.app/bearer/mcp
My ThoughtSpot cluster version is: 10.14.0.cl-75,
I am generating Token on the fly using the secret key ,
The token is accepted, and initialize works with HTTP 200:
event: message
data: {
"result": {
"protocolVersion": "2024-11-05",
"capabilities": {"tools": {}, "completion": {}, "resources": {}},
"serverInfo": {"name": "ThoughtSpot", "version": "1.0.0"}
}
}
But the moment I call tools/list, I consistently get: 404 Session not found
{"error":{"code":-32001,"message":"Session not found"}}
7 Replies
According to the official documentation, the bearer MCP endpoint requires two headers, not just the Authorization header. You may be missing the x-ts-host header.
Please try using the official MCP Python SDK, as it handles session management for you.
Additionally, verify the CORS and SAML configurations on your ThoughtSpot instance.
If none of the above resolves the issue, please proceed with raising a support ticket.
I believe I am using two headers
have a look in my code @Swarnika
The session id is found in server response headers. Looks like you are implementing their own mcp client and not parsing for mcp session header. If you were using the sdk, the sdk takes care of this. you may need to correct your implementation of the mcp client to handle mcp client session from headers as well.
Any reason we are not using the official sdk here?
I was able to to use the session id that mcp returned, mcp handshake was successfull , but did not return any tools.
Does MCP bearer url "https://agent.thoughtspot.app/bearer/mcp" supports the calling of tools like ping, getanswer,etc. ?
yes it does