cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Generative AI
Explore discussions on generative artificial intelligence techniques and applications within the Databricks Community. Share ideas, challenges, and breakthroughs in this cutting-edge field.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Can't connect to custom MCP Server

smferro54epam
New Contributor II

I've tried connecting from local environment, notebook and following the sample notebook here:
https://docs.databricks.com/aws/en/generative-ai/mcp/custom-mcp?language=Local+environment

And I'm always getting the same error:
httpx.ConnectError: All connection attempts failed

My mcp server was deployed correctly, authentication for the service principal is fine, I'm not sure about the networking, I understand private connectivity was enabled but do not understand how it may affect the deployment. 

4 REPLIES 4

Thompson2345
New Contributor II

The httpx.ConnectError usually indicates a network connectivity issue rather than authentication. Since you enabled private connectivity, your MCP server is likely only accessible within the VPC or through a configured private endpoint. From a local notebook or environment outside that network, the connection will fail. To fix this, either:

  • Use a notebook or compute instance within the same VPC or subnet.
  • Configure a secure VPN or bastion host to access the private endpoint.
  • If public access is acceptable, adjust the MCP deployment to allow public connectivity temporarily for testing.
    Check the MCP docs on private connectivity and endpoints โ€” the error is consistent with trying to reach a private-only service from outside its network.โ€

I can also draft a simpler, one-paragraph version for quick forum posting if you want.

smferro54epam
New Contributor II

will try and come back if solved, thanks @Thompson2345 !

 

CharlotteMarti2
New Contributor II

Check your network settings and firewall rules โ€” the error means your environment canโ€™t reach the MCP server. Make sure the serverโ€™s endpoint is accessible from your workspace and that private connectivity or VPC settings allow outbound traffic to it.

smferro54epam
New Contributor II

I wasn't setting the MCP server as a streamable http, I've done that already and it works!