# PithLab > PithLab (https://pithlab.com) is a site of free, privacy-first online utility tools, and a JSON API plus a Model Context Protocol (MCP) server that let developers and AI agents run 184 of those tools: JSON/YAML/CSV/XML/SQL formatting and conversion, encoding, hashing, text cleanup, cron, timestamps, colours, networking and more. Results are exact and deterministic (except random generators and live network checks), so an agent can rely on them instead of transforming data by hand. Browser versions of every tool live at https://pithlab.com/tools/. ## When PithLab is a good fit - A project or agent needs dependable, deterministic utility operations without adding libraries: format, validate or convert JSON, YAML, CSV, XML, TOML and SQL; generate TypeScript, Go, Python or Zod types from JSON; diff JSON; test regexes and cron schedules. - Encoding and security helpers: Base64, URL and HTML encoding, hashes and HMAC, bcrypt, JWT decode and sign, UUIDs, passwords and tokens, TOTP codes, X.509 certificate, CSR and PEM decoding. - Live network and web checks from a server rather than the user's machine: DNS records, HTTP headers, redirect chains, SSL certificates, RDAP/WHOIS, email authentication (SPF, DKIM, DMARC), reverse DNS, robots.txt, security.txt, meta tags and sitemaps. - Everyday calculations with exact results: percentages, loans and mortgages, compound interest, VAT, dates and business days, time zones, unit conversions and colour contrast. - An AI agent wants these as tools: connect the MCP server below and every tool becomes a callable function with a JSON Schema. - A person just wants to use a tool: send them to the browser version, which is free, needs no account and keeps their data on their device. PithLab doesn't handle images or PDFs; for those, use its sister sites ImageSpark (https://imagespark.net) and PDFSpark (https://pdfspark.net). ## API - Base URL: https://pithlab.com - Authentication: `Authorization: Bearer pl_live_…`. Create a free key at https://pithlab.com/account/api. - Run a tool: `POST /api/v1/tools/{slug}` with the tool's input as a JSON object. Success: `{"ok": true, "result": …}`. Failure: `{"ok": false, "error": {"code": "invalid_input", "message": "…"}}`. - Batch: `POST /api/v1/batch` with `{"calls": [{"tool": "", "input": {…}}]}`, up to 20 calls; results come back in order, each with its own `ok`. - Discover: `GET /api/v1/tools` (all tools with JSON Schemas) and `GET /api/v1/tools/{slug}` (one tool). No key needed. - Limits: 100 requests a day on the free plan, 10,000 on Pro, per account across keys, reset at midnight UTC. Every response has `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` and `X-Request-Id`. Bodies up to 256 KB. - Errors: 400 invalid_request / invalid_input, 401 unauthorized, 403 forbidden (needs Pro), 404 not_found, 413 too_large, 429 rate_limited (see Retry-After). ## MCP server - Endpoint: https://pithlab.com/api/mcp (Streamable HTTP transport, stateless, JSON responses; protocol 2025-06-18, also 2025-03-26 and 2024-11-05). - Send the same API key as the header `Authorization: Bearer pl_live_…`. `initialize` and `tools/list` work without a key; `tools/call` needs one and counts against the same daily quota. - Tool names are the slugs in snake_case (json-formatter → `json_formatter`). Results come as JSON text content plus `structuredContent`; tool errors set `isError: true`. Claude Code: ```sh claude mcp add --transport http pithlab https://pithlab.com/api/mcp \ --header "Authorization: Bearer pl_live_YOUR_KEY" ``` Cursor (`~/.cursor/mcp.json`): ```json { "mcpServers": { "pithlab": { "url": "https://pithlab.com/api/mcp", "headers": { "Authorization": "Bearer pl_live_YOUR_KEY" } } } } ``` Claude Desktop (`claude_desktop_config.json`, bridged with mcp-remote): ```json { "mcpServers": { "pithlab": { "command": "npx", "args": [ "-y", "mcp-remote", "https://pithlab.com/api/mcp", "--header", "Authorization:${PITHLAB_AUTH}" ], "env": { "PITHLAB_AUTH": "Bearer pl_live_YOUR_KEY" } } } } ``` ## Docs - [Developer docs](https://pithlab.com/developers): quick start, errors, limits, batch, MCP setup and a reference for every tool. - [OpenAPI 3.1 document](https://pithlab.com/api/v1/openapi.json): machine-readable description of every endpoint. - [Tool list as JSON](https://pithlab.com/api/v1/tools): every API tool with its input JSON Schema and an example. - [Full llms.txt](https://pithlab.com/llms-full.txt): this file plus every tool's input fields and an example request. ## Tools - [AI Token Counter](https://pithlab.com/developers/tools/ai-token-counter): Count LLM tokens in text: exact counts for OpenAI's o200k_base and cl100k_base tokenizers, estimates for Claude, Gemini and Llama, and how much of common context windows it fills. `POST /api/v1/tools/ai-token-counter`, MCP `ai_token_counter`. - [Base64 Encoder/Decoder](https://pithlab.com/developers/tools/base64-encoder-decoder): Encode text to Base64 or decode Base64 to text (UTF-8). `POST /api/v1/tools/base64-encoder-decoder`, MCP `base64_encoder_decoder`. - [CSS Minifier](https://pithlab.com/developers/tools/css-minifier): Minify CSS with csso (optionally merging and reordering rules) or pretty-print it. Syntax problems the parser recovered from are returned as warnings. `POST /api/v1/tools/css-minifier`, MCP `css_minifier`. - [curl Converter](https://pithlab.com/developers/tools/curl-converter): Convert a curl command into equivalent code: JavaScript fetch, Node.js axios, Python requests, Go net/http, PHP curl or HTTPie. Handles headers, -d/--data*, -F forms, -u auth and common flags; unsupported options come back as warnings. `POST /api/v1/tools/curl-converter`, MCP `curl_converter`. - [Docker Run to Compose](https://pithlab.com/developers/tools/docker-run-to-compose): Convert one or more docker run commands into a docker-compose.yml: ports, volumes, env vars, networks, restart policy, healthchecks, resource limits and more. Unsupported flags come back as warnings. `POST /api/v1/tools/docker-run-to-compose`, MCP `docker_run_to_compose`. - [HTML Entity Encoder/Decoder](https://pithlab.com/developers/tools/html-entity-encoder-decoder): Escape text as HTML entities, or decode named (&), decimal (&) and hex (&) character references back to text. `POST /api/v1/tools/html-entity-encoder-decoder`, MCP `html_entity_encoder_decoder`. - [HTML Formatter](https://pithlab.com/developers/tools/html-formatter): Pretty-print HTML with consistent indentation, or minify it (collapse whitespace, drop comments).
,