Weather files for EnergyPlus-MCP
EnergyPlus-MCP is an open-source Model Context Protocol server from Lawrence Berkeley National Laboratory that lets an AI agent load, inspect, change and run EnergyPlus models. Its simulation tool needs a weather file for the site. This page shows how the same agent gets that EPW for any site and year from EPW.tools and hands it to EnergyPlus-MCP.
How EnergyPlus-MCP takes a weather file
From its public README and source (read on 22 November 2026):
- The tool
run_energyplus_simulationtakesidf_pathandweather_file: a path to an.epwfile, or a city name for the weather files it can find itself. Without a weather file the simulation runs without one. - The README example is
"weather_file": "sample_files/USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw", a path relative to the server folderenergyplus-mcp-server. - In the Docker setup of the README the cloned repository is mounted at
/workspaceand the server starts in/workspace/energyplus-mcp-server, so a file you put intoEnergyPlus-MCP/energyplus-mcp-server/sample_files/on your disk issample_files/<name>.epwfor the server. - The README does not say that a web address is accepted, so give it a file on disk.
Step 1: run both MCP servers
Add both servers to your MCP client (Claude Desktop shown). Build the EnergyPlus-MCP image once as its README says, then replace the path and the key. The EPW.tools key comes from your EPW.tools account.
{
"mcpServers": {
"epw-tools": {
"command": "uvx",
"args": ["--from", "epwtools[mcp]", "epw-tools-mcp"],
"env": { "EPWTOOLS_API_KEY": "epw_your_key_here" }
},
"energyplus": {
"command": "docker",
"args": ["run", "--rm", "-i",
"-v", "/path/to/EnergyPlus-MCP:/workspace",
"-w", "/workspace/energyplus-mcp-server",
"energyplus-mcp-dev",
"uv", "run", "python", "-m", "energyplus_mcp_server.server"]
}
}
}
The EPW.tools server above runs on your machine, so it can write the weather file straight into the folder EnergyPlus-MCP reads. A client that takes only a remote address can use the hosted EPW.tools server at https://epw.tools/api/mcp; it returns a download link instead of a file on disk, and the file then has to be saved into that folder.
Step 2: the agent gets the EPW
Ask in plain words, for example: “Get a 2023 weather file for Denver, 39.74, -104.99, and save it to /path/to/EnergyPlus-MCP/energyplus-mcp-server/sample_files.” The agent calls the EPW.tools tool:
generate_epw(lat=39.74, lon=-104.99, year=2023, location_name="Denver",
save_to="/path/to/EnergyPlus-MCP/energyplus-mcp-server/sample_files")
The EPW, its DDY design days and its STAT summary land in that folder under one name, listed in saved_files of the answer. Any complete year from 1990 works for any coordinates, with or without a weather station nearby. For a typical year the agent calls generate_tmy; for a CMIP6 future year (2030 to 2100) generate_future_climate. Each takes the same save_to.
Step 3: the agent runs EnergyPlus with it
The agent then passes the file to EnergyPlus-MCP by its path inside the server folder:
run_energyplus_simulation(idf_path="sample_files/your_model.idf",
weather_file="sample_files/Denver_2023.epw")
Use the EPW file name from saved_files. The model keeps its own Site:Location and design days unless you change them; the DDY next to the EPW holds the design days for the same site if you want the model sized for it.
Without an MCP client: the Python client
A script, or an agent that runs Python, can use the epwtools package (pip install epwtools) and then point EnergyPlus-MCP, or EnergyPlus itself, at the file:
from epwtools import EPWClient
client = EPWClient(api_key="epw_your_key_here")
epw = client.generate(lat=39.74, lon=-104.99, year=2023, name="Denver",
out_dir="EnergyPlus-MCP/energyplus-mcp-server/sample_files")
print(epw.name) # pass "sample_files/" + this name as weather_file
client.tmy(...) and client.future(...) work the same way. Each file uses credits: what each kind of file costs.
Why an actual-year file
The weather files that come with an EnergyPlus install are typical years for a few airports. An agent that compares a model with metered energy, or studies one hot summer, needs the weather of that year at that site. EPW.tools builds it from the nearest suitable station, fills gaps from reanalysis, uses satellite sun where it is available and checks the file against the EnergyPlus format rules before download. The methodology page says how.
Frequently asked questions
Where does EnergyPlus-MCP take the weather file?
In the weather_file argument of its run_energyplus_simulation tool: a path to an .epw file the server can read. In the Docker setup of its README that is a path inside the cloned repository, for example sample_files/your_site.epw.
Can the agent get the EPW for a specific year?
Yes. The EPW.tools MCP tool generate_epw makes an actual-year EnergyPlus weather file for any coordinates and any complete year from 1990, with the DDY and STAT under the same name. generate_tmy makes a typical year and generate_future_climate a CMIP6 future year.
Is EPW.tools part of EnergyPlus-MCP?
No. EnergyPlus-MCP is an open-source project of Lawrence Berkeley National Laboratory. EPW.tools is an independent weather-file service; this page only shows how the two servers can be used side by side.
EPW.tools is independent work: it is not affiliated with or endorsed by Lawrence Berkeley National Laboratory, the authors of EnergyPlus-MCP, the U.S. Department of Energy or ASHRAE.