API & MCP
Everything a person can do on Codeharbor, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
GET https://codeharbor.usefulweb.app/api/v1/tools– catalogGET https://codeharbor.usefulweb.app/api/v1/tools/{id}– inputs, output schema, examplesPOST https://codeharbor.usefulweb.app/api/v1/tools/{id}/calculate– run a toolGET https://codeharbor.usefulweb.app/api/v1/workflows·POST https://codeharbor.usefulweb.app/api/v1/workflows/{id}/run- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Tools on Codeharbor
- Codeharbor Format & Check – Format JSON, CSS and HTML and find syntax errors in JSON, YAML, JavaScript and TypeScript.
codeharbor_format - Codeharbor Diff – Compare two texts line by line and get a unified diff with added and removed lines.
codeharbor_diff - Codeharbor Markdown Preview – Render Markdown to safe HTML with an outline, word count and heading checks.
codeharbor_markdown_preview
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://codeharbor.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
codeharbor_format,codeharbor_diff,codeharbor_markdown_preview - Local stdio connector:
node src/mcp-stdio.ts
{
"mcpServers": {
"usefulweb": { "type": "http", "url": "https://codeharbor.usefulweb.app/mcp" }
}
}