API & MCP
Everything a person can do on Erasure-Coding Playground, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://erasurecodingplayground.usefulweb.site/api/v1/calculate– run Erasure-Coding PlaygroundGET https://erasurecodingplayground.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Erasure-Coding Playground
Splits your text or bytes into k data shards, adds m Reed–Solomon parity shards computed over GF(256), lets you drop any shards and reconstructs the original from any k survivors. Shows the generator and decoding matrices, the shard bytes in hex, and compares storage overhead and fault tolerance with replication and RAID-5 style XOR parity.
| Field | Type | Default | Description |
|---|---|---|---|
data (required) | textarea | "Hello, erasure coding!" | Data. Up to 4,096 bytes. Text is encoded as UTF-8. |
encoding | select (text, hex) | "text" | Data is |
k | integer | 4 | Data shards (k) |
m | integer | 2 | Parity shards (m) |
lost | text | — | Lost shards. Shards to delete before reconstruction: D1…Dk (data), P1…Pm (parity) or numbers 1…k+m. Leave empty to only encode. |
Example request
RS(4,2): lose two data shards
curl -X POST https://erasurecodingplayground.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"data":"Hello, erasure coding!","encoding":"text","k":4,"m":2,"lost":"D1, D3"}'
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://erasurecodingplayground.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
erasure_coding_playground - Local stdio connector:
node src/mcp-stdio.ts --tool=erasure-coding-playground
{
"mcpServers": {
"erasure-coding-playground": { "type": "http", "url": "https://erasurecodingplayground.usefulweb.site/mcp" }
}
}