I asked Claude about this and it suggested:
This is almost certainly one of two things:
- Docker isn't staying alive. If the server is configured to run via
docker run --rm -i ... (stdio transport), the container exits the moment there's no active stdio session, and some MCP clients don't reliably restart it. Check docker ps -a right after the disconnect — if the container shows Exited, that's your issue. Try switching the client config to keep the container running persistently (docker run -d + docker exec wrapper, or a restart: unless-stopped policy if you're using docker-compose) instead of relying on --rm -i per-call. - Context/token exhaustion killing the session. Each of the 35 tool calls this server exposes returns fairly verbose IDF/output data back into the conversation. If you're running a long back-and-forth (multiple simulations, big result dumps), you can blow through the context window, and the client-side connection drops as a side effect rather than the server actually crashing. Try: (a) using a smaller/cheaper model for routine calls and only switching up for complex reasoning, (b) asking the assistant to summarize/discard large tool outputs instead of keeping full IDFs in context, and (c) checking whether the server has a
max_tokens or response-truncation setting you can lower.
Also worth checking: run the server manually outside the MCP client (docker run -it ... uv run python -m energyplus_mcp_server.server or the local Python equivalent) and watch stdout/stderr directly — that'll tell you immediately whether it's a server-side crash vs. a client giving up on the connection.
how are you using the MCP server? I have tried it with Claude, and have gotten that error when the docker was not open or not running.
I also tried with Claude. After running some tests, I ran out of tokens. They were supposed to reset at 10 PM the next day, but when I tried again, I got an error like that.
With Claude, I usually select Haiku 4.5 as the model - this gives generally good results with far fewer tokens than Sonet.
& I used the web version of Claude to help me get the EnergyPlus MCP installed using docker.
Overall, I found the EnergyPlus MCP to be less useful than the AI Agent that is integrated into EP3, so I am using the EP3 agent and have not continued with EnergyPlus MCP