MCP servers can not be accessed via Docker and docker-compose anymore.
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
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
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, 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.
I found a solution: define an environment variable FASTMCP_HOST=0.0.0.0
This works for latest release v1.9.2
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
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.