I tried to add mcp-server-hello-world as new tool to Databricks Assistant
I successfully deployed this server as App
It works smoothly in the playground
But when I try to add this Custom MCP server to the Databricks Assistant I got error:
I added some logging info in the server app.py to see more details
Additionally I added CORS Configuration
combined_app.add_middleware( CORSMiddleware, allow_origins=["*"], # Allow all origins allow_credentials=True, allow_methods=["*"], # Handles OPTIONS, POST, GET allow_headers=["*"], )
Based on assistant log observation :
"It's a protocol incompatibility:
Playground client: Sends mcp-session-id header → fastmcp recognizes session → works
Assistant client: Doesn't send mcp-session-id header → fastmcp creates new session → fails with 400
Playground (working):
First POST → Creates session bd0d742b... → 200 OK
Second POST → "Session already exists, handling request directly" → 202 Accepted
Third POST → Works fine
Assistant (failing):
First POST → Creates session 47d80107... → 200 OK
Second POST → Creates NEW session 401be9da... → 400 Bad Request ❌
"
Did somebody try to add this server as Databricks assistance tool?
I tried to add mcp-server-hello-world as new tool to Databricks Assistant
I successfully deployed this server as App
It works smoothly in the playground
But when I try to add this Custom MCP server to the Databricks Assistant I got error:
I added some logging info in the server app.py to see more details
Additionally I added CORS Configuration
combined_app.add_middleware( CORSMiddleware, allow_origins=["*"], # Allow all origins allow_credentials=True, allow_methods=["*"], # Handles OPTIONS, POST, GET allow_headers=["*"], )Based on assistant log observation :
"It's a protocol incompatibility:
Playground client: Sends mcp-session-id header → fastmcp recognizes session → works
Assistant client: Doesn't send mcp-session-id header → fastmcp creates new session → fails with 400
Playground (working):
First POST → Creates session bd0d742b... → 200 OK
Second POST → "Session already exists, handling request directly" → 202 Accepted
Third POST → Works fine
Assistant (failing):
First POST → Creates session 47d80107... → 200 OK
Second POST → Creates NEW session 401be9da... → 400 Bad Request ❌
"
Did somebody try to add this server as Databricks assistance tool?