API & MCP
Everything a person can do on Ohmforge Voltage Divider Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://ohmforgevoltagedivider.usefulweb.site/api/v1/calculate– run Ohmforge Voltage Divider CalculatorGET https://ohmforgevoltagedivider.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Ohmforge Voltage Divider Calculator
Solves any one unknown of a two-resistor voltage divider (Vout, Vin, R1 or R2), optionally with a load resistance on the output. Returns currents, the power in each resistor, the output (Thevenin) resistance and how far the load pulls the output down, checks the result with Ohmforge's DC simulator and lists the closest standard E-series resistor pairs with their error.
| Field | Type | Default | Description |
|---|---|---|---|
solveFor | select (vout, vin, r1, r2) | "vout" | Solve for |
vin | number | 12 | Input voltage Vin. Ignored when you solve for Vin. |
vout | number | — | Output voltage Vout. Target output; ignored when you solve for Vout. |
r1 | text | "10k" | R1 (top, Vin to Vout). Engineering notation: 4.7k, 4k7, 1M. Ignored when you solve for R1. |
r2 | text | "4.7k" | R2 (bottom, Vout to ground). Ignored when you solve for R2. |
rload | text | — | Load resistance (optional). Resistance connected from Vout to ground, e.g. the input of the next stage. Empty = no load. |
series | select (E6, E12, E24, E48, E96, E192) | "E24" | Standard resistor series |
Example request
12 V with 10k / 4.7k
curl -X POST https://ohmforgevoltagedivider.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"solveFor":"vout","vin":12,"r1":"10k","r2":"4.7k","series":"E24"}'
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://ohmforgevoltagedivider.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
ohmforge_voltage_divider - Local stdio connector:
node src/mcp-stdio.ts --tool=ohmforge-voltage-divider
{
"mcpServers": {
"ohmforge-voltage-divider": { "type": "http", "url": "https://ohmforgevoltagedivider.usefulweb.site/mcp" }
}
}