CableSizeCalculatorMCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CableSizeCalculatorMCP What size cable for a 20 A, 230 V, 20 m single-phase copper flat 2C+E run in thermal insulation?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CableSizeCalculatorMCP
An experimental, offline Model Context Protocol server for AC cable-sizing calculations. It evaluates current capacity, voltage drop, selected protection constraints, and conductor thermal withstand using bundled or operator-supplied reference data.
Calculations are experimental and do not certify an installation or establish standards compliance. The bundled reference data is public domain; its numerical accuracy has not been independently validated.
Scope
The model supports single-phase and three-phase AC calculations, copper or aluminium active conductors, and separately specified earth conductor material. DC is unsupported because the model uses AC resistance and reactance data. Installation categories and insulation labels describe the model; their suitability depends on the supplied dataset's construction, conductor loading, reference conditions, and other assumptions.
Sizing evaluates every candidate against current capacity and unrounded voltage drop. Optional breaker and fault inputs enable further checks. Results and reports identify which checks were performed or omitted. A successful selection means that the requested calculations passed under the supplied assumptions; it is not a declaration of standards compliance. Network fault impedance, breaker characteristics, actual clearing times, and reference-data applicability must be established for the installation.
For single-phase copper V90 flat 2C+E cable, set cable_construction="flat_2c_earth". With installation_method="in_thermal_insulation", also set insulation_exposure to "partially_surrounded" or "completely_surrounded". For the supplied 20 A, 20 m, 230 V comparison, these select 4 mm² and 6 mm² respectively. The unenclosed-in-air profile selects 2.5 mm².
These profiles use the lower bounds of the supplied JCalc rating ranges and cover only the supplied sizes. Unsupported profile combinations are rejected, and sizing stays within the selected profile's coverage. The default "generic" construction uses the legacy ratings. Results identify the rating basis; profile selection changes current capacity, while the other checks use the dataset's impedance, earth-pairing and thermal tables.
Related MCP server: security-orchestra
Setup
Python 3.12 or later and uv are required for the development setup:
uv syncThe server loads the bundled dataset by default. To use a different dataset, set CABLESIZE_DATA_FILE to a local JSON file before starting the process:
$env:CABLESIZE_DATA_FILE = (Resolve-Path "./private-data/cable-data.local.json").Path
uv run cablesizecalculatorexport CABLESIZE_DATA_FILE=/absolute/path/to/cable-data.local.json
uv run cablesizecalculatorUse reference_data.json as the format for a custom dataset. The loader checks metadata and numerical table completeness. Restart the server after changing the dataset. An invalid override fails with a configuration error.
Tests generate a synthetic dataset to exercise the code. Those values are deliberately not electrical design references and must not be used for installation design.
MCP client configuration
Replace the paths in this example with your checkout and private data locations. Omit the env entry to use the bundled data:
{
"mcpServers": {
"cablesizecalculator": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/CableSizeCalculatorMCP",
"run",
"cablesizecalculator"
],
"env": {
"CABLESIZE_DATA_FILE": "/absolute/path/to/cable-data.local.json"
}
}
}
}Tools
size_cable: Select a candidate against the requested model constraints.calculate_voltage_drop: Calculate AC voltage drop for a given conductor and route.calculate_derating: Apply conservative temperature, grouping, and burial-depth lookups within supported ranges.check_loop_impedance: Evaluate the model's earth-fault loop constraint with resistance, reactance, and specified source impedance.check_short_circuit: Evaluate adiabatic conductor thermal withstand for specified fault conditions.get_standards_info: Describe model scope and dataset availability and provenance.generate_calculation_report: Produce an ASCII report of inputs, assumptions, candidate checks, and omitted checks.
Development
uv run pytest
uv buildLicense
The code is licensed under MIT. The bundled reference data is public domain.
Available Tools
7 toolscalculate_deratingB
Calculate model temperature, grouping and depth factors from the configured data.
ambient_temp_c denotes soil temperature for underground installations and air
temperature otherwise. None uses the dataset's reference value. Unsupported
ranges are rejected; factors between rows use conservative lookup. Installation
labels do not describe every cable construction, grouping layout or soil condition.
Inputs: depth_m, insulation, num_circuits, ambient_temp_c, +1 more. Returns: object
calculate_voltage_dropA
Calculate experimental AC voltage drop using the configured resistance/reactance data.
length_m is the one-way route length, size_mm2 must exist in the configured dataset,
and voltage is line-to-line for 3phase or phase-to-neutral for 1phase. worst_case_pf
uses the impedance magnitude instead of the specified power factor. Threshold flags
apply only to this voltage-drop model and do not establish standards compliance.
Inputs: length_m (required), size_mm2 (required), load_amps (required), phase, +5 more. Returns: object
check_loop_impedanceA
Estimate an AC earth-fault loop length limit using resistance plus reactance.
nominal_phase_voltage is phase-to-earth voltage. The external source-loop magnitude
defaults to zero and must be supplied for a realistic check. length_m enables the
route-length pass/fail comparison; without it no route check is performed. Material
is specified separately for active and earth conductors. Generic B/C/D trip
multipliers do not verify a specific device's clearing time or guarantee disconnection.
Inputs: earth_size_mm2 (required), active_size_mm2 (required), protective_device_rating_amps (required), length_m, +6 more. Returns: object
check_short_circuitA
Check experimental adiabatic thermal withstand: I^2t <= k^2S^2.
Supply the applicable fault current in kA and actual protective-device clearing
time in seconds (0 < time <= 5). The default 0.1 s is an assumption, not a device
rating. k comes from configured data and assumes the model's initial/final conductor
temperatures. This check alone does not approve an active or earth conductor.
Inputs: size_mm2 (required), fault_current_ka (required), insulation, fault_time_s, +1 more. Returns: object
generate_calculation_reportB
Generate an ASCII report of inputs, assumptions and requested experimental checks.
Parameters and assumptions match size_cable. The report identifies optional checks
as passed, failed or not requested; it does not certify standards compliance.
Inputs: load (required), length_m (required), unit, phase, +20 more. Returns: result
get_standards_infoB
Return model scope and provenance status, without reproducing reference tables.
Inputs: no named parameters. Returns: object
size_cableA
Select the smallest candidate passing all requested experimental model checks.
load/unit describe the design load; length_m is the positive one-way route length.
voltage is line-to-line for 3phase and phase-to-neutral for 1phase. DC is unsupported.
ambient_temp_c is air temperature above ground and soil temperature underground;
None uses the configured dataset's reference temperature. num_circuits and depth_m
must fall within the configured data. The model uses V90 at 75 C or X90 at 90 C.
mcb_rating_amps enables the approximate AC loop check; supply_loop_impedance_ohm
is the non-negative external source-loop magnitude (default zero is an assumption).
Supplying a nonzero source-loop magnitude requires mcb_rating_amps.
Check the actual protective device and measured supply impedance independently.
check_fault enables active AND earth adiabatic checking using fault_current_ka and
fault_time_s. The earth conditions default to those active conditions; override them
with earth_fault_current_ka and/or earth_fault_time_s for the actual earth fault.
Earth fault overrides require check_fault=True.
Omitted fault checks are reported as not requested. The earth material is independent
of the active material. An experimental selection is not an installation approval.
cable_construction="flat_2c_earth" selects a dedicated two-loaded-conductor profile
and requires phase="1phase". For in_thermal_insulation, explicitly choose
partially_surrounded or completely_surrounded; unenclosed_in_air uses none.
Unsupported construction/condition combinations are rejected without generic fallback.
The generic default preserves the existing dataset column and does not identify a
physical cable construction or insulation exposure.
Inputs: load (required), length_m (required), unit, phase, +20 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct calculation (sizing, voltage drop, derating, thermal withstand, loop impedance, report, standards provenance), but size_cable explicitly duplicates the behaviour of the individual check tools, so an agent may be unsure whether to call size_cable or the granular checks. The descriptions do clarify that the individual checks are for standalone use, keeping the overlap manageable.
All seven names follow a clean snake_case verb_noun pattern (check_short_circuit, get_standards_info, size_cable, calculate_voltage_drop, calculate_derating, check_loop_impedance, generate_calculation_report). The verb set is varied but idiomatic and predictable.
Seven tools is well-scoped for a cable sizing/verification domain, with each tool earning its place as a distinct engineering check or report generator. No filler or redundant tooling exists beyond the intentional granular/aggregate split.
The surface covers the full sizing workflow: derating inputs, voltage drop, adiabatic fault checks, loop impedance, selection, standards provenance and reporting. Minor gaps remain, such as listing/inspecting the configured cable dataset or exporting results beyond an ASCII report, but agents can work around these.
Maintenance
Related MCP Connectors
Electrical single-line and multi-line diagrams: build, check (NF C 15-100, IEC 60364), draw, PDF.
Decode cables in 71 coding systems; design, rate, check, find equivalents; drums, laying, fire.
IFC models: duct networks, circuits, pressure drop. EN 12828 vessels, EN 378, Swiss refrigerants.
Cable sizing, Part P, certificate checks and G98/G99 for UK electricians' AI assistants
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides professional-grade data center engineering calculations including cooling, power, GPU thermal optimization, UPS/battery sizing, tier classification, and commissioning workflows, compliant with ASHRAE and Uptime Institute standards.849 npm1MIT

security-orchestraofficial
FlicenseNot gradedqualityCmaintenanceProvides deterministic, standards-based calculations for data center critical power infrastructure. Enables site selection, generator sizing, UPS sizing, NFPA 110 compliance, and more via 50+ AI agents and 8 compound chains.-- AlicenseNot gradedqualityCmaintenanceEnables estimation of video surveillance, structured cabling, and low-current systems projects, providing tools for cost estimation, bill of materials, commercial proposals, and camera placement recommendations.MIT
- AlicenseNot gradedqualityBmaintenanceEnables source-preserving import and analysis of EPLAN export reports (devices, connections, PLC I/O, terminals, cables, parts, network, pages) as immutable queryable snapshots, plus inspection of DXF/PDF/DWG drawings and derivation of electrical project evidence. Works offline without EPLAN, supporting querying, duplicate/endpoint checks, revision comparison, and verified JSON export.MIT