Skip to the main content
POST0 units (free)No API key required

POST /mcp

Model Context Protocol over JSON-RPC 2.0.

Server: https://gridforge-engine.fly.dev · Operation ID: mcp · TS SDK: client.mcpCall()

Behaviour & Evidence Boundary

One POST endpoint, protocol version 2025-06-18. initialize, tools/list and tools/call. The transport is open: 14 tools are listed and each keeps its own tier, so gridforge_qualify and gridforge_estimate answer without a key and every other tool is refused with JSON-RPC error -32001 until a key is sent. A batch holds at most 10 messages. The Idempotency-Key header applies to tools/call. The tool names, schemas and unit weights are the operations in this document (see x-gridforge-mcp-tool).

Call via cURL, TypeScript SDK & Python CLI

cURL (HTTPS JSON)
bash
curl -sS -X POST "https://gridforge-engine.fly.dev/mcp" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"gridforge_qualify","arguments":{"contracted_MW":12,"firm_capacity_MVA":14,"current_site_peak_MW":7.4,"current_it_load_MW":4.9,"busway_ampacity_A":400,"tapoff_max_A":63,"plant_supply_C":6,"positions_available":180,"platform":"gb300_nvl72","objective":"max_compute","client":"Reference Project (synthetic)","reference":"REF-EU-01/DH-02","site_name":"Reference Colocation Campus","metro":"Frankfurt","country":"DE","hall_id":"DH-02"}}}'
TypeScript SDK — client.mcpCall()
ts
import { GridForgeClient } from "@timetopower/gridforge-sdk";

const client = new GridForgeClient();
const result = await client.mcpCall("gridforge_qualify", {
  "contracted_MW": 12,
  "firm_capacity_MVA": 14,
  "current_site_peak_MW": 7.4,
  "current_it_load_MW": 4.9,
  "busway_ampacity_A": 400,
  "tapoff_max_A": 63,
  "plant_supply_C": 6,
  "positions_available": 180,
  "platform": "gb300_nvl72",
  "objective": "max_compute",
  "client": "Reference Project (synthetic)",
  "reference": "REF-EU-01/DH-02",
  "site_name": "Reference Colocation Campus",
  "metro": "Frankfurt",
  "country": "DE",
  "hall_id": "DH-02"
});
console.log(result);
Python stdlib CLI (gridforge)
bash
gridforge mcp --target claude

Request Contract & Input Schema

OpenAPI 3.1 Request JSON Schema
json
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "jsonrpc",
        "method"
      ],
      "properties": {
        "jsonrpc": {
          "type": "string",
          "const": "2.0"
        },
        "id": {
          "type": [
            "string",
            "integer",
            "null"
          ]
        },
        "method": {
          "type": "string",
          "description": "initialize, tools/list, tools/call, ping, or a notification."
        },
        "params": {
          "type": "object"
        }
      }
    },
    {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          },
          "method": {
            "type": "string",
            "description": "initialize, tools/list, tools/call, ping, or a notification."
          },
          "params": {
            "type": "object"
          }
        }
      }
    }
  ]
}

Response Schema, Headers & Error Codes

Responses carry X-GridForge-Schema: gridforge/api/1, x-request-id, metering headers (X-GridForge-Units, X-GridForge-Units-Month, X-GridForge-Units-Remaining), rate-limit headers (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset), and RFC 9745/8594 Deprecation / Sunset headers when applicable. POST calls accept Idempotency-Key up to 150 characters.

OpenAPI 3.1 200 Response Schema
json
{
  "type": [
    "object",
    "array"
  ]
}
Error codes returned by POST /mcp
StatusCondition
400the body is not valid JSON or not a JSON object, or the Idempotency-Key is longer than the limit
401a metered route was called without a key, or with one the engine does not accept
402the key's monthly allowance or cap is spent; the call was refused and not charged. Buy more, do not retry
409the requested action conflicts with current readiness or state (for example require_rfq_ready on an architecture that is not yet RFQ-ready)
422the input is too thin or invalid, or an Idempotency-Key was reused with a different body; nothing was solved
429the per-client request rate limit was exceeded; wait and retry (the limit is rate_limit_per_minute at /v1/version)
503paid endpoints are not configured on that deployment, or a charge could not be recorded durably

Worked Example (examples/intake/reference_hall.json)

SYNTHETIC REFERENCE DATA

SYNTHETIC REFERENCE DATA — every request and response in this file was generated deterministically by running the real GridForge Python engine against examples/intake/reference_hall.json. Not a measurement of any customer asset.

Synthetic Request — POST /mcp
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "gridforge_qualify",
    "arguments": {
      "contracted_MW": 12,
      "firm_capacity_MVA": 14,
      "current_site_peak_MW": 7.4,
      "current_it_load_MW": 4.9,
      "busway_ampacity_A": 400,
      "tapoff_max_A": 63,
      "plant_supply_C": 6,
      "positions_available": 180,
      "platform": "gb300_nvl72",
      "objective": "max_compute",
      "client": "Reference Project (synthetic)",
      "reference": "REF-EU-01/DH-02",
      "site_name": "Reference Colocation Campus",
      "metro": "Frankfurt",
      "country": "DE",
      "hall_id": "DH-02"
    }
  }
}
Real Engine Output (Synthetic Hall) — POST /mcp
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "0 racks as found, 28 after relief. Binds first on Rack feed / tap-off rating. No defensible date: not declared: transformers, UPS (reliefs they would need are neither priced nor timed). Calibration: uncalibrated."
      }
    ],
    "structuredContent": {
      "platform": {
        "id": "gb300_nvl72",
        "name": "NVIDIA GB300 NVL72",
        "rack_kW": {
          "value": 135,
          "low": 132,
          "high": 142,
          "unit": "kW",
          "evidence": "E0_ASSUMPTION",
          "label": "GB300 NVL72 rack TDP",
          "model": "input@0.1",
          "digest": "e6476e7cd728"
        },
        "gpus_per_rack": 72
      },
      "as_found": {
        "racks": 0,
        "racks_evidence": "E0",
        "it_load_kW": {
          "value": 0,
          "low": 0,
          "high": 0,
          "unit": "kW",
          "evidence": "E0_ASSUMPTION",
          "label": "deployable IT load",
          "model": "envelope.it_load@0.1",
          "digest": "7878bb4e6931"
        },
        "binding_constraint": "Rack feed / tap-off rating",
        "domain": "electrical",
        "basis": "platform needs 205 [174–236] A (E0) per rack; installed tap-offs rated 63 A (E5). The tap-off rating is compared at 100% of its rating, with no continuous-load derating (the busway is derated to 0.8)"
      },
      "after_relief": {
        "racks": 28,
        "racks_evidence": "E0",
        "architecture": "Full DLC, grid only",
        "then_binds_on": "Firm supply (grid import + behind-the-meter)",
        "sets_the_date": null,
        "sets_the_date_reason": "No defensible date: not declared: transformers, UPS (reliefs they would need are neither priced nor timed).",
        "date_basis": "none",
        "date_evidence_class": null,
        "date_binding_item": null,
        "date_label": "no date: a lead time on the path is missing"
      },
      "first_three_constraints": [
        {
          "name": "Rack feed / tap-off rating",
          "domain": "electrical",
          "relief": "Higher-rated tap-off units (and busway if ampacity does not allow)"
        },
        {
          "name": "Residual air load removal per rack",
          "domain": "thermal",
          "relief": "Add in-row cooling or rear-door heat exchangers for the residual air load"
        },
        {
          "name": "Achievable facility water temperature",
          "domain": "thermal",
          "relief": "Adiabatic assist plus trim chiller on the high-temperature loop"
        }
      ],
      "intake": {
        "completeness": 0.29,
        "required_inputs_missing": 4,
        "can_issue_a_study": false,
        "gaps": [
          {
            "path": "hall.net_white_space_m2",
            "input": "Net white space",
            "unit": "m2",
            "required": false,
            "assumed": "2,000 [1,400–2,600] m2 (E0)",
            "why_it_binds": "Caps rack count where positions are not yet counted.",
            "how_to_get_it": "Floor plan."
          },
          {
            "path": "hall.floor_loading_kPa",
            "input": "Hall design floor loading",
            "unit": "kPa",
            "required": true,
            "assumed": "12 [8–15] kPa (E0)",
            "why_it_binds": "A 1.4 t rack against a 12 kPa design is a gate, not a margin.",
            "how_to_get_it": "Structural record drawings; a survey if the building changed hands."
          },
          {
            "path": "hall.aisle_pitch_m",
            "input": "Installed aisle pitch",
            "unit": "m",
            "required": false,
            "assumed": "2.4 [2.04–2.76] m (E0)",
            "why_it_binds": "Sets floor area per rack, and so the floor-loading figure per square metre.",
            "how_to_get_it": "Floor plan or a site walk."
          },
          {
            "path": "site.design_drybulb_C",
            "input": "Summer design dry bulb",
            "unit": "degC",
            "required": false,
            "assumed": "32 [30–36] degC (E0)",
            "why_it_binds": "Decides whether dry coolers alone can hold the loop.",
            "how_to_get_it": "Nearest TMY station."
          },
          {
            "path": "transformers",
            "input": "Transformer schedule",
            "unit": "-",
            "required": true,
            "assumed": "not evaluated: treated as no limit, so the rack count is an upper bound (E0)",
            "why_it_binds": "Often the schedule driver: transformer lead times are long and vary by type. Enter the quoted figure if you have one.",
            "how_to_get_it": "Single-line diagram and transformer nameplates."
          },
          {
            "path": "ups",
            "input": "UPS schedule",
            "unit": "-",
            "required": true,
            "assumed": "not evaluated: treated as no limit, so the rack count is an upper bound (E0)",
            "why_it_binds": "GPU racks present step loads, not just steady load.",
            "how_to_get_it": "UPS nameplate, topology and remaining design life."
          }
        ],
        "warnings": [
          "Busway: neither hall.occupied_positions nor hall.rack_positions was supplied, so the occupied positions are an assumption (E0) from the library default total of 400 positions, not a count of anything in your hall. Reading that total less your 180 free positions as occupied (220 positions), at their 8 kW design density, would draw 1,760 kW, more than the 1,290 kW the declared busway can carry. busway_ampacity_A is read as the installed total and existing load is not subtracted, so check whether the figure you gave is the whole hall's busway, and give hall.occupied_positions and hall.rack_positions (a full intake takes both) so this check runs on counts rather than an assumption.",
          "project.reference names 'REF-EU-01'/'DH-02', but the document's site.id and hall.id are 'SITE-1'/'DH-02'. The deliverable carries both, so check which hall this intake describes.",
          "No transformer schedule supplied: transformer capacity is not evaluated and may be the true binding constraint.",
          "No UPS schedule supplied: the load is treated as unprotected.",
          "No behind-the-meter options declared: where the grid binds, the study can only report that it binds."
        ],
        "recommended_engagement": "4 required inputs are missing. That is too thin for a full Capacity & Density Envelope Study yet. The next step is the Density Screen: it names the binding constraint and lists every input still needed, and its fee credits against the Capacity & Density Envelope Study when the data arrives."
      },
      "calibration": {
        "state": "uncalibrated",
        "statement": "Model accuracy against instrumented sites has not been established: 0 reconciled observations across 0 sites, covering 0 of 3 model outputs. Every figure in this report is modelled. The uncertainty ranges shown come from input uncertainty propagated through the model, not from the difference between this engine's predictions and site data — no such difference has been recorded yet.",
        "observations": 0,
        "observations_total": 0,
        "observations_without_source_ref": 0,
        "sites": 0,
        "halls": 0,
        "keys_asserted": 3,
        "keys_with_site_observations": 0,
        "keys_calibrated": 0,
        "coverage": 0,
        "keys": [],
        "uncalibrated_keys": [
          "constraint.rack_feed_tapoff.racks",
          "envelope.racks",
          "envelope.it_load_kW"
        ]
      },
      "notice": "Directional screening read. Modelled from the inputs supplied, against library defaults for everything not supplied. It is not a bankable number, not a design, and not a measurement of this asset. Capital cost, programme duration, the full constraint ladder and the scenario comparison are part of the paid engagement.",
      "figures_not_supplied": []
    },
    "isError": false
  }
}