Free, programmatic access to mate.tools utilities. Designed for AI agents, automation scripts and frontend apps.
curl -X POST https://mate.tools/api/v1/count-lines.php \
-H "Content-Type: application/json" \
-d '{"text":"line one\nline two\n\nline four"}'import urllib.request, json
req = urllib.request.Request(
"https://mate.tools/api/v1/count-lines.php",
data=json.dumps({"text": "line one\nline two\n\nline four"}).encode(),
headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(req) as r:
print(json.load(r)["metrics"])const res = await fetch("https://mate.tools/api/v1/count-lines.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: "line one\nline two\n\nline four" }),
});
console.log((await res.json()).metrics);fetch("https://mate.tools/api/v1/count-lines.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: "line one\nline two\n\nline four" }),
})
.then(r => r.json())
.then(console.log);| Endpoint | What it does |
|---|---|
| GET/api/v1/health.php | Liveness probe. Returns the API version and the full list of endpoints. Excluded from rate limits. |
| POST/api/v1/count-lines.php | Sixteen text metrics: lines, words, sentences, paragraphs, characters, duplicates, line endings, longest word, reading time and more. |
| POST/api/v1/base64-encode.php | Encode text to Base64. Optional URL-safe alphabet (RFC 4648 §5) without padding. |
| POST/api/v1/base64-decode.php | Decode Base64 to text. Accepts both standard and URL-safe input. Returns hex when output is not valid UTF-8. |
| POST/api/v1/hash.php | Compute hashes of a text input — defaults to MD5, SHA-1, SHA-256, SHA-384, SHA-512, CRC32, SHA3-256 and SHA3-512. |
| POST/api/v1/password.php | Generate cryptographically random passwords. Configurable length, count, character classes and ambiguous-character exclusion. Reports entropy in bits. |
| POST/api/v1/json-format.php | Validate, pretty-print, minify or analyse a JSON document. Returns a structural summary (node counts, max depth, top keys). |
| More endpoints coming. Tell us which tool you want next. | |
All endpoints (except /health.php) are subject to per-IP rate limits: 60 requests per minute and 600 requests per hour. Each response carries X-RateLimit-Limit-Minute, X-RateLimit-Remaining-Minute, X-RateLimit-Limit-Hour, X-RateLimit-Remaining-Hour and X-RateLimit-Reset headers. When exceeded the API returns 429 with a Retry-After header — back off for that many seconds.
Use mate.tools as an MCP server inside Claude Desktop, Claude Code, Cursor, Windsurf, or any other MCP-compatible client. Add to your client's config:
{
"mcpServers": {
"mate-tools": {
"command": "npx",
"args": ["-y", "@mate-tools/mcp-server"]
}
}
}
That's it. No global install, no git clone. npx fetches the latest version on first run and caches it.
npm: @mate-tools/mcp-server · Source & full install guide: /api/mcp/
For ChatGPT Custom GPT Actions, Microsoft Copilot Studio, Perplexity Spaces, or any agent framework that consumes OpenAPI:
https://mate.tools/api/openapi.json
Discoverable site manifest for crawling LLMs: https://mate.tools/llms.txt
| Base URL | https://mate.tools/api/v1/ |
|---|---|
| Methods | Most endpoints accept POST with JSON. Some allow GET for trivial probes. |
| Encoding | UTF-8 only. Bodies are JSON or application/x-www-form-urlencoded. |
| Body size | Capped at 1 MB per request. Returns 413 above that. |
| Auth | None. Anonymous traffic only. Rate limits enforced by Cloudflare. |
| CORS | Open: Access-Control-Allow-Origin: *. |
| Indexing | API responses send X-Robots-Tag: noindex. The endpoint URLs are not advertised in sitemap.xml. |
| Errors | Non-200 responses return {"error":{"code":N,"message":"...","field":"..."}}. |
.php extension on endpoint URLs is intentional. v1 routes directly to PHP-FPM with no rewrite layer in front, which keeps the API dependency-free and rock-solid. Future versions may add clean URLs.
This API is free and unlimited for honest use — automation, AI agents, personal projects, internal tooling, hobby apps and small commercial workloads are all welcome. Cloudflare protects the underlying infrastructure from abuse. Please don't:
X-Throttle-After-Ms header (when present) to back off.The path includes the major version (/v1/). Breaking changes ship under a new path. Within a major version, only additive changes (new fields, new endpoints) are permitted.