Installation¶
idfkit-mcp is distributed on PyPI and supports stdio and Streamable HTTP transports.
Install the Package¶
Runtime Requirements¶
- Python
3.10+ - EnergyPlus installed and discoverable (required for simulation tools)
- Network access for weather station downloads (when using weather tools)
Docker Images¶
This repo provides two Docker build targets:
runtime: Small HTTP server image without EnergyPlus (run_simulationunavailable)sim: Includes EnergyPlus for full simulation support
Build Base Image¶
Build Simulation Image¶
docker build \
--target sim \
--build-arg ENERGYPLUS_TARBALL_URL=<energyplus-linux-tarball-url> \
-t idfkit-mcp:sim .
Optional integrity verification:
docker build \
--target sim \
--build-arg ENERGYPLUS_TARBALL_URL=<energyplus-linux-tarball-url> \
--build-arg ENERGYPLUS_TARBALL_SHA256=<sha256> \
-t idfkit-mcp:sim .
Architecture note:
- The tarball architecture must match the image architecture.
- On Apple Silicon, most official EnergyPlus Linux tarballs are
x86_64; build with--platform linux/amd64when using those assets or use thearm64tarball if available.
Build with Make Targets¶
make docker-build
make docker-build-sim ENERGYPLUS_TARBALL_URL=<energyplus-linux-tarball-url>
make docker-build-sim DOCKER_PLATFORM=linux/amd64 ENERGYPLUS_TARBALL_URL=<energyplus-linux-x86_64-tarball-url>
Launch the Server¶
Transport Selection¶
idfkit-mcp can run either local stdio or network HTTP transport from the same codebase.
stdio (default)¶
Streamable HTTP¶
--transport http is also accepted as a shorter alias.
Environment Variable Configuration¶
Storage Directories¶
Hosted deployments (HTTP transport, multi-replica, shared volumes) can redirect file storage away from the ephemeral container filesystem via environment variables.
IDFKIT_MCP_PUBLIC_URL¶
The public URL at which clients reach a hosted server's MCP endpoint, for example
https://server.idfkit.com/mcp. The viewers and the file_manager UI are MCP Apps, and each
host decides which origin an app may declare in _meta.ui.domain:
- ChatGPT requires a domain on a published app, and each app declares one under
idfkit.com. - claude.ai accepts only the first 32 hex characters of the SHA-256 of the public URL followed by
.claudemcpcontent.com, and does not render an app that declares anything else.
When the client identifies itself as Claude at initialize, the server replaces the domain on
resources/read with the hashed one if this variable is set, and removes it if it is unset (a
local stdio server), so the host assigns its own. The URL must match the one configured in the
client exactly, including the path and the absence of a trailing slash.
IDFKIT_MCP_UPLOAD_DIR¶
Where files dropped into the file_manager UI are stored. When unset, uploads
live in-memory on the Python process and are lost when the container restarts —
fine for stdio and single-container deployments. When set, uploads are written
to <IDFKIT_MCP_UPLOAD_DIR>/<session_id>/<filename> with a sidecar
<filename>.meta.json. Point this at a shared volume (e.g. EFS) so concurrent
replicas can all resolve load_model(upload_name=...) calls.
Cleanup: clear_session() removes the caller's scope directory. Abandoned
sessions are not swept automatically — run a periodic cleanup (e.g. delete
scopes older than 24 h) in production.
IDFKIT_MCP_SIMULATION_DIR¶
Default parent directory for EnergyPlus run output. When unset, each
run_simulation call creates a fresh temp directory. When set, each run writes
to <IDFKIT_MCP_SIMULATION_DIR>/<session_id>-<utc-timestamp>/. An explicit
output_directory argument on the tool call always wins.
IDFKIT_MCP_OUTPUT_DIRS¶
Whitelist of directories that save_model (and any other tool that writes
user-named output paths) may resolve into. Prevents a misbehaving agent from
writing outside a sanctioned area.
- Colon-separated on POSIX, semicolon-separated on Windows.
- Defaults to the current working directory when unset.
Paths that resolve outside every listed root are rejected with a ToolError,
including attempts via .. traversal or symlinks.
Log Verbosity¶
Control log output with the IDFKIT_MCP_LOG_LEVEL environment variable.
The default level is INFO.
Available levels: DEBUG, INFO, WARNING, ERROR.
At DEBUG level the server emits per-tool CALL/OK traces, idfkit core parsing
details (schema loading, IDF/epJSON parsing, validation internals), and
query/search parameters for every tool invocation.
At INFO (default) the server logs significant operations — model loads, saves,
simulation start/completion, object mutations, and weather downloads — without
the high-frequency per-call noise.
EnergyPlus Discovery¶
Simulation tools rely on idfkit's EnergyPlus discovery chain:
- Explicit path passed by calling code
ENERGYPLUS_DIRenvironment variableenergyplusexecutable onPATH- Standard install locations by OS
If simulation fails with an EnergyPlus discovery error, see Setup & Configuration.
Verify Installation Quickly¶
Use an MCP client and call:
list_object_types()new_model()- Read the
idfkit://model/summaryresource
If all three succeed, your server is healthy.