Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

I asked Claude about this and it suggested:

This is almost certainly one of two things:

  1. 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.
  2. 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.