API & MCP

Everything a person can do on The Compatibility Engine, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

The Compatibility Engine

Three deterministic checks: (1) USB-C charging – the real maximum power from charger, cable and device per the USB Power Delivery rules; (2) software versions – whether versions satisfy an npm-style semver range (^, ~, x-ranges, hyphen ranges, ||); (3) PC builds – CPU socket, RAM generation, slots and power-supply headroom.

Inputs of The Compatibility Engine
FieldTypeDefaultDescription
modeselect (charging, semver, pc)"charging"What do you want to check?
chargerWnumber—Charger maximum output. Charging mode.
chargerPdbooleantrueCharger supports USB Power Delivery (USB PD)
chargerEprbooleanfalseCharger supports PD 3.1 EPR (above 100 W)
deviceWnumber—Device maximum charging input
devicePdbooleantrueDevice charges via USB PD
deviceEprbooleanfalseDevice supports PD 3.1 EPR
cableselect (usb-c-3a, usb-c-5a, usb-c-epr)"usb-c-3a"USB-C cable
rangetext—Required version range. Semver mode. npm syntax.
versionslist—Installed / candidate versions (one per line)
cpuSockettext—CPU socket. PC mode.
boardSockettext—Motherboard socket
ramTypeselect (DDR3, DDR4, DDR5)"DDR5"RAM type
boardRamTypeselect (DDR3, DDR4, DDR5)"DDR5"Motherboard RAM type
ramModulesinteger—RAM modules
boardSlotsinteger—Motherboard RAM slots
cpuWnumber—CPU power (TDP/PPT)
gpuWnumber—Graphics card power
otherWnumber75Everything else
psuWnumber—Power supply rating
headroomPercentnumber30Desired PSU headroom

Example request

140 W laptop on a 100 W charger

curl -X POST https://compatibilityengine.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"charging","chargerW":100,"chargerPd":true,"deviceW":140,"devicePd":true,"deviceEpr":true,"cable":"usb-c-3a"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "compatibility-engine": { "type": "http", "url": "https://compatibilityengine.usefulweb.site/mcp" }
  }
}