python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

MCP servers can not be accessed via Docker and docker-compose anymore.

Open Vildnex opened this issue 7 months ago • 4 comments

Since the last update to version 1.9.1, any of the Docker setups that run any MCP servers are not working anymore. This bug is because since 1.9.1, the host from line 90 in the mcp/server/fastmcp/server.py was set to be 127.0.0.1 instead of 0.0.0.0, which was in the beginning.

Is there a workaround to fix the Docker setups, or can a rollback be done to use the 0.0.0.0 again?

Currently, the only fix I found is to set all the Docker setups to use the older version 1.9.0

Vildnex avatar May 23 '25 10:05 Vildnex

I'm facing the exact same issue as my n8n workflows are no longer able to connect to the MCP server with 1.9.1

wkwi2r avatar May 26 '25 10:05 wkwi2r

im sorry but this is getting ridiculous everytime i configure a new setup either with docker or outside of it something else needs a workaround. This is not rocket science just seems that N8N is doing everything to prevent self hosting with making it extremely difficult to have a cohesive setup . Any advice on how to downgrade my containers in Docker to previous version?

liquidhair avatar May 26 '25 16:05 liquidhair

@liquidhair, if you already have the containers and images created, I would suggest just changing that line I am talking about in the issue and restarting the containers afterward. This should do the trick for you. The other option is to rebuild the images with the previous version 1.9.0, this is what I did for my case.

Vildnex avatar May 26 '25 19:05 Vildnex

I found a solution: define an environment variable FASTMCP_HOST=0.0.0.0

This works for latest release v1.9.2

wkwi2r avatar May 30 '25 05:05 wkwi2r

Using FASTMCP_HOST=0.0.0.0 is broken since #1198 (v.1.12.3) , and using this to override the host no longer works

cbcoutinho avatar Aug 14 '25 17:08 cbcoutinho

As of https://github.com/modelcontextprotocol/python-sdk/pull/1198 the SDK's FastMCP no longer pulls in configuration from environment variables. The service you implement can instead pull in configuration on its own from environment variables.

Although there is active discussion about bringing the previous functionality back here: https://github.com/modelcontextprotocol/python-sdk/pull/1244

For now, I'm going to close this issue in favour of the other discussion thread.

maxisbey avatar Sep 26 '25 14:09 maxisbey