API & MCP
Everything a person can do on pH, Buffer & Titration Curve Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://prooflinephbuffer.usefulweb.app/api/v1/calculate– run pH, Buffer & Titration Curve CalculatorGET https://prooflinephbuffer.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
pH, Buffer & Titration Curve Calculator
Three pH calculators in one. Convert between pH, pOH, [H₃O⁺] and [OH⁻]. Design or check a buffer: the pH of a weak acid and its conjugate base (Henderson–Hasselbalch next to the exact charge balance), the concentrations and grams for a target pH, the buffer capacity and the pH after adding a strong acid or base. Draw the titration curve of a strong or weak acid or base with the equivalence and half-equivalence points, the steepest point and matching indicators. Nine common buffer acids are built in. Part of the Proofline math notebook.
| Field | Type | Default | Description |
|---|---|---|---|
mode | select (convert, buffer, titration) | "convert" | Calculation |
value | text | — | Known value (convert). pH 3.2, pOH 4, H+ 1e-3 M or OH- 0.01 M. |
acid | select (custom, acetic, formic, benzoic, hf, hocl, carbonic, phosphate, tris, ammonium) | "acetic" | Buffer acid |
constant | text | — | Ka, pKa, Kb or pKb. For your own buffer acid or a weak analyte in a titration. |
acidConc | text | — | Weak acid [HA]. Buffer: give [HA] and [A⁻] for the pH, or leave both empty and give a target pH. |
baseConc | text | — | Conjugate base [A⁻] |
targetPH | number | — | Target pH (buffer recipe) |
totalConc | text | — | Total buffer concentration. Recipe: [HA] + [A⁻]. Empty: 0.1 M. |
volume | text | — | Buffer volume. Gives the amounts and grams to weigh, and is needed for additions. |
addAcid | text | — | Add strong acid. Amount of HCl (or another strong acid) added to the buffer volume. |
addBase | text | — | Add strong base |
analyte | select (strong-acid, weak-acid, strong-base, weak-base) | "weak-acid" | Sample (titration) |
analyteConc | text | — | Sample concentration |
analyteVolume | text | — | Sample volume |
titrantConc | text | — | Titrant concentration |
maxVolume | text | — | Plot up to (titrant volume). Empty: twice the equivalence volume. |
Example request
pH 3.2 as concentrations
curl -X POST https://prooflinephbuffer.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"convert","value":"pH 3.2"}'
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://prooflinephbuffer.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
proofline_ph_buffer - Local stdio connector:
node src/mcp-stdio.ts --tool=proofline-ph-buffer
{
"mcpServers": {
"proofline-ph-buffer": { "type": "http", "url": "https://prooflinephbuffer.usefulweb.app/mcp" }
}
}