mcp-helper

v0.3.4
@vulcan-energy/mcp-helper Checked 4 hours ago Published 12 days ago

Vulcan Home Energy Model tools for AI assistants over MCP (Claude Code, Codex, Claude Desktop, Cursor).

A Model Context Protocol (MCP) server that gives AI assistants (Claude Code, Codex, Claude Desktop, Cursor and other MCP clients) Vulcan's Home Energy Model (HEM) tools. Everything runs on your machine: models and results are not sent to Vulcan. The helper speaks MCP over stdio with --stdio; your assistant starts it. Point --workspace at your workspace folder. With Vulcan Pro, ask your assistant to sign in to Vulcan. It calls vulcan_sign_in, which gives you a link to usevulcan.app/connect and a short code.

Summary extracted from the README.

Vulcan MCP Helper

A Model Context Protocol (MCP) server that gives AI assistants (Claude Code, Codex, Claude Desktop, Cursor and other MCP clients) Vulcan's Home Energy Model (HEM) tools. Everything runs on your machine: models and results are not sent to Vulcan.

Free needs no account: parameters, geometry CSV validation and conversion, automatic thermal bridges, and single-model runs with headline and FHS results (the same rule as the Vulcan app's Free plan). Vulcan Pro adds scenario batches, weather and parameter variations, model comparison and cost metrics. A Pro tool called without Pro returns a normal result with status: "requires_pro", the reason, and how to unlock it, so your assistant can explain rather than retry.

Prerequisites

  • Node.js 22.19 or later (the geometry and thermal-bridge tools run the Vulcan Community CLI, which needs it)
  • A Vulcan workspace folder (the folder you open as a workspace in the Vulcan app). Validation and thermal-bridge tools work on any geometry CSV; vulcan_list_parameters lists the workspace's CSVs.
  • Google Chrome, for models pinned to a HEM target (the first use downloads and verifies the target)

Set up your assistant

The helper speaks MCP over stdio with --stdio; your assistant starts it. Point --workspace at your workspace folder.

Claude Code

claude mcp add vulcan -- npx -y @vulcan-energy/mcp-helper --stdio --workspace /path/to/workspace

Codex (~/.codex/config.toml)

[mcp_servers.vulcan]
command = "npx"
args = ["-y", "@vulcan-energy/mcp-helper", "--stdio", "--workspace", "/path/to/workspace"]

Claude Desktop (claude_desktop_config.json) and Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "vulcan": {
      "command": "npx",
      "args": ["-y", "@vulcan-energy/mcp-helper", "--stdio", "--workspace", "/path/to/workspace"]
    }
  }
}

Vulcan Pro

With Vulcan Pro, ask your assistant to sign in to Vulcan. It calls vulcan_sign_in, which gives you a link to usevulcan.app/connect and a short code. Open the link, check the code matches, and approve; the assistant calls vulcan_sign_in again and Pro tools unlock straight away, with no restart. The token is saved in the workspace's vulcan-mcp-config.json. Call vulcan_sign_in again to renew it. The code in progress is kept under ~/.vulcan/sign-in (readable by you only), so it survives a restart of the assistant or helper; approve the code you were shown. If vulcan-mcp-config.json is a symlink, the token is written through it only when it points inside the workspace or at another vulcan-mcp-config.json; any other link is replaced by a regular file.

Alternatively, open Vulcan → Profile → Integrations → MCP, click Generate Config, and save vulcan-mcp-config.json in the workspace root:

{
  "workspace": ".",
  "license_token": "<license-token>"
}

The helper reads it from the workspace (or --config <path>). The token lasts seven days and is verified locally, offline, at startup and on every Pro call; access can therefore outlive a plan change by up to seven days. When it expires, Free tools keep working and Pro tools say how to renew. A token that is malformed, or issued for Analyst only, stops the helper with the reason instead of quietly running Free.

Treat vulcan-mcp-config.json as a secret: do not commit it or share its token. It is written readable by your user only on macOS and Linux; on Windows it takes the workspace folder's permissions, so keep the workspace private.

Local HTTP (Pro)

Clients that connect by URL can use the local HTTP server instead of stdio. It needs the Pro token, sent as a Bearer credential, so that a web page cannot call the helper through your browser:

vulcan-mcp-helper --config /path/to/vulcan-mcp-config.json --port 5000
{
  "mcpServers": {
    "vulcan": {
      "url": "http://127.0.0.1:5000/mcp",
      "headers": { "Authorization": "Bearer <license_token from vulcan-mcp-config.json>" }
    }
  }
}

CLI options: --stdio, --workspace <dir> (default VULCAN_WORKSPACE, else the current folder), --config <path>, --port <port> (HTTP only; default 5000 or HELPER_PORT), --version, --help.

Available Tools

Tool Free Pro adds
vulcan_list_parameters, vulcan_view_parameter, vulcan_save_parameter ✓
vulcan_create_batch_config, vulcan_run_batch One base model, one FHS wrapper, no variations Scenario batches, weather and parameter variations
vulcan_get_batch_status, vulcan_list_batch_models, vulcan_list_csv_columns ✓
vulcan_calculate_metrics One model, no cost Model comparison, cost and tariff metrics
vulcan_merge_csv_to_json ✓
vulcan_validate_geometry_csv, vulcan_auto_thermal_bridges, vulcan_validate_thermal_bridges ✓
vulcan_run_model One call: create, run locally, wait, and return the FHS rates against their targets (pass/fail), the workspace's default metrics with units, and which source file ran Cost metrics
vulcan_compare_scenarios Every model of a batch side by side on the default metrics

Every result carries structuredContent; failures are tool errors (isError: true) with the reason. The validators run the open-source Vulcan Community CLI (@vulcan-energy/community-cli) as a separate process; from a repository checkout, build it first with npm run build --workspace @vulcan-energy/community-cli.

1. vulcan_list_parameters

List available parameter categories and their parameter IDs.

Parameters:

  • category (optional, string): Filter by category name (e.g., "base_json", "heat_source_wet", "controls")

Example:

{"category": "heat_source_wet"}

2. vulcan_view_parameter

View a specific parameter JSON snippet and documentation.

Parameters:

  • category (required, string): Parameter category (e.g., "heat_source_wet", "controls", "base_json")
  • parameter_id (required, string): Parameter ID (filename without .json extension)

Example:

{"category": "heat_source_wet", "parameter_id": "hp"}

3. vulcan_save_parameter

Create or edit a parameter with validation.

Parameters:

  • category (required, string): Parameter category
  • parameter_id (required, string): Parameter ID (filename without .json extension)
  • content (required, object): Parameter JSON content
  • markdown_content (optional, string): Optional markdown documentation

Example:

{
  "category": "heat_source_wet",
  "parameter_id": "hp_custom",
  "content": {"efficiency": 0.85, "type": "heat_pump"},
  "markdown_content": "# Custom Heat Pump\n\nDescription..."
}

4. vulcan_create_batch_config

Create a batch simulation configuration.

Parameters:

  • config_name (required, string): Configuration name (saved as {config_name}.json)
  • base_model (required, string): Base model filename (without .json extension)
  • weather_file (required, string): Weather file name (with or without .epw extension)
  • wrapper (optional, string): Model wrapper (e.g., "fhs_compliance", "passthrough")
  • parameters (required, object): Object mapping category to array of parameter IDs

Example:

{
  "config_name": "hp_vs_boiler",
  "base_model": "demo_hp_annual",
  "weather_file": "London-Gatwick-TMY",
  "wrapper": "passthrough",
  "parameters": {
    "heat_source_wet": ["hp", "gas_boiler"],
    "controls": ["standard_schedule"]
  }
}

5. vulcan_run_batch

Run a batch configuration asynchronously.

Parameters:

  • config_name (required, string): Configuration name (with or without .json extension)
  • job_id (optional, string): Custom job ID (defaults to mcp_{uuid})

Example:

{"config_name": "hp_vs_boiler"}

6. vulcan_get_batch_status

Check status/progress of a batch run.

Parameters:

  • job_id (optional, string): Job ID returned from vulcan_run_batch
  • config_name (optional, string): Configuration name (alternative to job_id)

Note: Either job_id or config_name must be provided.

Example:

{"config_name": "hp_vs_boiler"}

7. vulcan_list_batch_models

List all model names from a completed batch.

Parameters:

  • config_name (required, string): Configuration name (with or without .json extension)

Example:

{"config_name": "hp_vs_boiler"}

8. vulcan_list_csv_columns

List available columns from a CSV result file.

Parameters:

  • config_name (required, string): Configuration name (with or without .json extension)
  • model_name (required, string): Model name (e.g., "scenario_1_0")

Example:

{"config_name": "hp_vs_boiler", "model_name": "scenario_1_0"}

9. vulcan_calculate_metrics

Calculate metrics (sum, average, peak, min, cost) from results.

Parameters:

  • config_name (required, string): Configuration name (with or without .json extension)
  • model_names (required, array): Array of model names to calculate metrics for
  • metric_definitions (required, array): Array of metric definition objects:
    • id (optional, string)
    • name (optional, string)
    • column (optional, string)
    • function (optional, enum): "sum", "average", "peak", "min", "cost", "sumIf", "averageIf", "countIf"
    • comparator (optional, string): For conditional metrics (">=", "<=", ">", "<", "=")
    • threshold (optional, number): For conditional metrics
  • time_range (optional, object): Time range filter
    • start (optional, number): Start timestep
    • end (optional, number): End timestep
  • tariff_file_path (optional, string): Path to tariff CSV (required for cost metrics)
  • tariff_column_index (optional, number): Zero-based index of tariff column (required for cost metrics)

Example:

{
  "config_name": "hp_vs_boiler",
  "model_names": ["scenario_1_0", "scenario_1_1"],
  "metric_definitions": [
    {"name": "Total Electricity", "column": "Electricity", "function": "sum"},
    {"name": "Peak Demand", "column": "Electricity", "function": "peak"}
  ]
}

Example with cost metric:

{
  "config_name": "hp_vs_boiler",
  "model_names": ["scenario_1_0"],
  "metric_definitions": [
    {"name": "Energy Cost", "column": "Electricity", "function": "cost"}
  ],
  "tariff_file_path": "input/tariff_data_structured/Octopus.csv",
  "tariff_column_index": 2
}

10. vulcan_merge_csv_to_json

Convert a geometry CSV file to HEM input JSON for its HEM target (see HEM targets). The target sets the schema and the defaults.

Parameters:

  • csv_path (required, string): Path to CSV file (relative to workspace or absolute)
  • output_path (optional, string): Output JSON path (defaults to input/batch_parameters/base_json/{csv_filename}.json)
  • target_manifest, target_manifest_sha256 (optional, strings): offline override for a trusted local bundle

Example:

{"csv_path": "input/base_models/my_model.csv"}

Error Messages

Common errors and what they mean:

  • Config file not found: <path> - Config file missing. Generate it from Vulcan → Integrations → MCP
  • Invalid JSON in config file - Config file is malformed. Regenerate from Vulcan
  • Config file missing required field: workspace - Config file incomplete. Regenerate from Vulcan
  • Your Vulcan MCP token is missing - Token not in config. Generate config from Vulcan
  • Workspace directory not found: <path> - Workspace path in config is incorrect
  • Workspace missing required directory: input/batch_parameters - Not a valid Vulcan workspace or not in FSA mode
  • Your Vulcan access config has expired - Seven-day window elapsed. Ask your assistant to sign in again (vulcan_sign_in), or generate a new config in Vulcan → Profile → Integrations
  • This Vulcan access config does not include MCP - Authentic config without the mcp capability. MCP needs a Vulcan Pro seat; an Analyst-only config will not start the helper
  • This Vulcan access config was issued for a newer version of the Vulcan tools - Update with npm install -g @vulcan-energy/mcp-helper@latest
  • This system clock is too far behind the access config issue time - Correct the system clock, then restart
  • Your Vulcan access config is invalid or was signed with an unknown key - Signature not recognised. Generate a new config in Vulcan
  • WASM initialization failed - WASM files missing or corrupted. Reinstall package
  • Port argument is missing - Invalid --port usage. Use --port <number>
  • Invalid port: <value> - Port must be 1-65535

Testing

Test the server is running:

curl http://127.0.0.1:5000/health

Should return:

{"status":"running","port":5000,"version":"0.1.3","name":"vulcan-mcp-helper"}

Troubleshooting

  • Server won't start: Check Node.js version (node --version must be v20+; 22.19+ for the geometry and thermal-bridge tools)
  • Config errors: Ensure workspace is in FSA (Folder) mode, not OPFS
  • Token expired: Sign in again with vulcan_sign_in, or refresh it in Vulcan → Integrations → MCP
  • Port in use: Use --port to specify a different port
  • WASM errors: Reinstall package: npm install -g @vulcan-energy/mcp-helper

HEM targets

A CSV saved by the current app pins its HEM target in Metadata (TargetBundleId). A CSV with no TargetBundleId row, or an empty one, uses HEM:FHS 1.0.0a7, as in the app. vulcan_merge_csv_to_json, vulcan_create_batch_config and vulcan_run_batch run every CSV through its target with no extra arguments. Install Google Chrome separately: this helper packages the browser adapter and application workers, not a browser.

The first use of a target downloads it from usevulcan.app into ~/.cache/vulcan/hem-targets (about 12 MB for Rust, 75 MB for Python). Its manifest must match the SHA-256 pinned in this helper release, and every model artifact must match the manifest's size and SHA-256; nothing unverified is cached or executed. A target newer than this helper fails with an instruction to update @vulcan-energy/mcp-helper. target_manifest (an absolute path, or a path relative to the workspace) plus target_manifest_sha256 remain an optional offline override for a trusted local bundle; supplying only one fails. Missing inputs never substitute the helper's installed legacy Rust engine.

Merge uses the target's own schema and defaults. A DefaultsPath in the CSV must hold the same defaults as the target, or the merge stops with an error. vulcan_create_batch_config captures the application's exact __hem snapshot from the source CSVs and selected JSON snippets, and refuses a batch that mixes targets. weather_file is required only for a base model with no source CSV and no target marker; omit it to use the target's reference weather, or name an EPW to capture it as the app does. Run uses the saved snapshot. Target runs return started and continue in a background process; vulcan_get_batch_status reports download and calculation progress, completion and runtime errors, including browser startup failures after the initial acquisition acknowledgement. Only one target operation can own a workspace at a time. After a forcibly killed process, inspect .hem-target-active and its PID before removing a stale lock.

The adapter uses the same preparation and workers as the app. Synthetic automated checks and an a9 preparation-only Chrome probe cover this transport; full MCP calculation qualification is separate from those checks. A saved batch with no __hem snapshot still runs on the installed WASM only when no base model has a source CSV or target marker; otherwise vulcan_run_batch refuses it and asks you to create the batch again with vulcan_create_batch_config.