None of the Connect to the custom MCP server examples work

smferro54epam
Databricks Partner
hi!
 
 
I have successfully deployed the app in Databricks and can use it from the playground and from a local request using a bearer token authentication and extra headers. 
 
Now I want to wrap my agent as a Responses Agent so I can use it as a subagent for a supervisor. Here. the notebook fails with different errors:
 
If I try bearer authentication:
httpx.HTTPStatusError: Client error '401 Unauthorized' for url '<mcp-app-url>/mcp' | For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401

If I try any of the other connection methods from a notebook I get:
httpx.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol.

The documentation is from August and I can see that both the mcp library and the httpx library have not changed since then. I'm also applying nest.asyncio to run from a notebook. I've run out of ideas and don't know how I can overcome this issue.
 
Best,
 
Sergio