PrettifyPrettify
Home

API & MCP

Last updated: July 6, 2026

Turn a payload into a Prettify link, or transform data, from your own code or an AI coding tool. Two surfaces: a REST endpoint and an MCP server.

The share link (https://prettify.tools/s/…) opens the exact content in Prettify's interactive viewer: tree, table, chart, or diagram.

REST API

A single endpoint turns raw content into a share link.

POST https://prettify-api.alexi-81a.workers.dev/api/v1/view
Content-Type: application/json
Authorization: Bearer <licenseKey>   # optional; raises limits

Request

{
  "content": "{\n  \"hello\": \"world\"\n}",
  "format": "json"
}
FieldRequiredNotes
contentyesRaw document text.
formatnojson (default), yaml, csv, xml, or mermaid.
licenseKeynoAlternative to the Authorization header.

Response

{
  "url": "https://prettify.tools/s/1a2b3c4d5e6f",
  "shareId": "1a2b3c4d5e6f",
  "expiresAt": "2026-08-05T12:00:00.000Z"
}

Example

curl -X POST https://prettify-api.alexi-81a.workers.dev/api/v1/view \
  -H "Content-Type: application/json" \
  -d '{"content":"{\"hello\":\"world\"}","format":"json"}'

Limits

TierSize capRate limitLink lifetime
Anonymous128 KB5 / min + 50 / day per IP30 days
Pro (license key)10 MB60 / min per key1 year

Identical content is de-duplicated to one link. Only the origin, format, and byte size are recorded for analytics; never the content itself.

MCP server

prettify-mcp wraps the API as an MCP server, so AI coding tools can turn a payload into a link and transform data. Runnable via npx, anonymous by default.

Install

Claude Desktop: add to claude_desktop_config.json:

{
  "mcpServers": {
    "prettify": { "command": "npx", "args": ["-y", "prettify-mcp"] }
  }
}

Claude Code

claude mcp add prettify -- npx -y prettify-mcp

Cursor: add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "prettify": { "command": "npx", "args": ["-y", "prettify-mcp"] }
  }
}

Set PRETTIFY_LICENSE_KEY in the server's env to raise limits with a Pro key.

Tools

ToolPurposeReturns
prettify_viewOpen a payload in Prettifyshare link
prettify_queryRun a jq filter over the dataresult + link
prettify_convertConvert between json/yaml/csv/xmlconverted text + link
prettify_diffStructural diff (RFC 6902 JSON Patch)patch + link
prettify_infer_typesTypes from a sample (TypeScript/Go/Kotlin/Rust/JSON Schema)code

The transform tools return the data result plus a Prettify link to view it.

Privacy

Content you send to a share link is compressed and stored behind a short, content-addressed id so the viewer can load it. The link expires after the lifetime shown above. Analytics record only the origin, format, and byte size, never the content.

On this page
  • REST API
  • MCP server
  • Privacy
Prettify·Home·Open appPermalink