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
POST https://compatibilityengine.usefulweb.site/api/v1/calculate– run The Compatibility EngineGET https://compatibilityengine.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
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.
| Field | Type | Default | Description |
|---|---|---|---|
mode | select (charging, semver, pc) | "charging" | What do you want to check? |
chargerW | number | — | Charger maximum output. Charging mode. |
chargerPd | boolean | true | Charger supports USB Power Delivery (USB PD) |
chargerEpr | boolean | false | Charger supports PD 3.1 EPR (above 100 W) |
deviceW | number | — | Device maximum charging input |
devicePd | boolean | true | Device charges via USB PD |
deviceEpr | boolean | false | Device supports PD 3.1 EPR |
cable | select (usb-c-3a, usb-c-5a, usb-c-epr) | "usb-c-3a" | USB-C cable |
range | text | — | Required version range. Semver mode. npm syntax. |
versions | list | — | Installed / candidate versions (one per line) |
cpuSocket | text | — | CPU socket. PC mode. |
boardSocket | text | — | Motherboard socket |
ramType | select (DDR3, DDR4, DDR5) | "DDR5" | RAM type |
boardRamType | select (DDR3, DDR4, DDR5) | "DDR5" | Motherboard RAM type |
ramModules | integer | — | RAM modules |
boardSlots | integer | — | Motherboard RAM slots |
cpuW | number | — | CPU power (TDP/PPT) |
gpuW | number | — | Graphics card power |
otherW | number | 75 | Everything else |
psuW | number | — | Power supply rating |
headroomPercent | number | 30 | Desired 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)
- Streamable HTTP endpoint:
https://compatibilityengine.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
compatibility_engine - Local stdio connector:
node src/mcp-stdio.ts --tool=compatibility-engine
{
"mcpServers": {
"compatibility-engine": { "type": "http", "url": "https://compatibilityengine.usefulweb.site/mcp" }
}
}