The best free JQ REST and MCP server in the world

Your guide to jq for AI assistants, REST clients, and Zapier workflows.

Operated by Craftsman Founder LLC, maintained by Lucas Carlson. Privacy & data handling · Measured MCP status · Public docs & issues · MCP Registry record

Quick Navigation

Base URL

https://thejqapi.com

Start here · Recommended for AI assistants

MCP Server

The best free JQ REST and MCP server in the world puts JSON filtering, extraction, and transformation in your AI workflow. Connect over Streamable HTTP, pass your JSON and a jq expression, and get structured results. No local installation or MCP session management required.

https://thejqapi.com/mcp

Quick install

Cursor and VS Code open a prefilled install prompt. For Claude Code and other clients, choose your app in the MCP Install chooser for the right command or configuration.

Powered by MCP Install by API Commons. No token is required to start. Add an Authorization: Bearer YOUR_UUID header in your client settings for the 1,000-call daily UUID quota.

Client configuration

For Codex, add the server with one command:

codex mcp add jq-api --url https://thejqapi.com/mcp

Or use this configuration in clients that accept mcpServers JSON:

{
  "mcpServers": {
    "jq-api": {
      "url": "https://thejqapi.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_UUID" }
    }
  }
}

Tool: process_json

Pass the same input, filter, and processing options as the REST API. Results include success, result, rawResult, results, stdout, jqVersion, and executionTime as structured data and JSON text. See jq options or URL/upload inputs.

{
  "input": { "name": "Alice", "age": 30 },
  "filter": ".name"
}

Authorization is optional unless the service requires a token. Anonymous clients get 100 calls per day; UUID bearer tokens get 1,000. MCP tool calls and REST requests share the same quota. Connecting and listing tools do not use processing quota.

The server is stateless and requires no session ID. jq failures and quota exhaustion are returned as MCP tool errors. Quota details are included in the tool result metadata.

URL and upload inputs

POST /process and MCP process_json accept exactly one of input, url, or upload_id, plus filter and options. Documents are limited to 5 MiB; JSON request envelopes to 8 MiB.

{"url":"https://registry.npmjs.org/jq-wasm/latest","filter":".name"}

URLs must use public HTTPS on port 443, without credentials. Private networks and self-fetching are blocked. Each redirect is validated, with at most three redirects and a 10-second download deadline. Caller authorization headers and cookies are never forwarded. Direct URL queries do not store their document. Use raw_input or input_stream for text or JSON streams.

Upload a local JSON file once

curl https://thejqapi.com/uploads \
  -H 'Content-Type: application/json' --data-binary @data.json
# Or: curl https://thejqapi.com/uploads -F file=@data.json

The request body is raw JSON, not an input wrapper. The response contains success, upload_id, expires_at, and size_bytes. The secret ID is reusable for 15 minutes. Anyone holding it can query or delete the data. Store it privately. There is no upload listing or raw-download endpoint.

curl https://thejqapi.com/process \
  -H 'Content-Type: application/json' \
  -d '{"upload_id":"YOUR_UPLOAD_ID","filter":".name"}'
curl -X DELETE https://thejqapi.com/uploads/YOUR_UPLOAD_ID

REST and MCP upload operations

Each upload and processing attempt uses one call from the existing shared REST/MCP quota. Deletion and discovery are free. URL/upload references keep source documents out of the model context; only query results are returned.

Expired references return 410, missing/deleted uploads 404, oversize inputs 413, and unavailable storage 503. MCP reports structured tool errors. Expiration blocks access after 15 minutes; physical cleanup runs every five minutes with a one-day R2 lifecycle fallback. See data handling.

Upload metadata and remaining quota

MCP get_upload takes upload_id. REST GET /uploads/{upload_id} returns the same metadata: success, available, status (available/missing/expired), expires_at, expires_in_seconds, and size_bytes. It does not read document contents or refresh expiration. Missing, deleted, and expired uploads return a successful metadata response with available:false and size_bytes:null. Processing still returns 404 for missing uploads or 410 for expired uploads.

To read the JSON itself, call process_json with upload_id and filter .. Uploads are immutable; create a new upload to change the document. Modules are supplied as filenames mapped to source in options.modules for each processing call; no module upload or management is needed.

MCP get_quota takes no arguments. REST GET /quota returns success, tier (anonymous/uuid), limit, used, remaining, and reset_at (next midnight UTC). Both use the request IP or UUID bearer header configured in your client. No IP address or UUID is returned.

curl https://thejqapi.com/quota -H 'Authorization: Bearer YOUR_UUID'
curl https://thejqapi.com/uploads/YOUR_UPLOAD_ID

Metadata checks, quota checks, deletion, and discovery do not consume processing quota. Checks remain available after quota exhaustion. Invalid IDs are rejected; storage failure returns success:false, error, and status:503. Quota values are snapshots and do not reserve calls against concurrent requests.

Prepaid private access with x402

An optional pass costs 2 USDC for 30 days of unlimited jq queries, with zero application query logs. Every renewal is a separate purchase; the service cannot initiate a recurring charge. Purchases are live with native USDC on Base mainnet. Free access remains available. Check GET /pricing for current availability and payment requirements.

Browser checkout & private MCP setup → Generate or reuse a secret UUID, save it, connect a Base browser wallet, and pay once. Copy ready-to-use settings for Codex, Claude Code, Cursor, or VS Code. No wallet support is required in the MCP client after payment. Never share your wallet recovery phrase.

Free queries already keep JSON, filters, results, and source URLs out of application logs. Pass queries additionally skip IP/UUID daily counters and REST/MCP/Zapier source analytics, and remove the daily query cap. Hosted processing still sends data to Cloudflare.

REST: create or resume an order with POST /access/purchases and body {}, using your secret UUID bearer header. POST to its returned checkout_url to receive an x402 v2 HTTP 402 challenge in PAYMENT-REQUIRED. An x402-capable wallet client signs exactly 2 USDC and retries that URL with PAYMENT-SIGNATURE. Success returns a PAYMENT-RESPONSE receipt and expires_at. GET /access/purchases/{purchase_id} recovers status. Keep the purchase ID and check pending payments; do not send a second payment.

Same-request REST upgrade: add X-JQ-Payment: pass and your saved UUID bearer token to a processing or upload request. Inactive access returns a standard x402 402 challenge. Keep the header on the signed retry; the confirmed pass activates before processing, without free-tier tracking. This buys 30 days for 2 USDC, not a single query. Active passes never charge again. A 202 means settlement is pending and processing has not run: check the returned purchase ID without another payment.

MCP: call purchase_access with no arguments, or an optional purchase_id to resume an existing order. A payment challenge is returned as a structured tool error. The client retries with the signed payload in request _meta["x402/payment"]; the receipt arrives in response _meta["x402/payment-response"]. An active pass returns access status without charging again. Wallet support and a spending policy explicitly permitting 2 USDC are required to purchase; ordinary MCP clients can use a UUID after payment without wallet support.

Paid UUIDs automatically reject queries after expiry; they never silently fall back to tracked free access. A separate keyed-hash privacy preference survives billing cleanup. UUID queries also fail closed if private access cannot be verified. Keep X-JQ-Privacy: required persistently to protect new or mistyped unpaid keys too. GET /access/status checks access, expiry, and privacy_required for the bearer UUID without consuming calls, including after expiry. GET /quota and get_quota report tier:paid, unlimited:true, expires_at, privacy:zero_application_query_logs, and auto_renew:false. Allowance/count fields are null because pass query activity is not recorded. The 5 MiB document limit, 15-minute upload lifetime, and execution limits apply.

Minimal billing/access records and explicitly requested uploads are retained separately. USDC transfers are public; Cloudflare can process network and security metadata under its own policies. Explicit uploads are accessible for 15 minutes; physical deletion can be delayed by cleanup. Paying does not make hosted processing anonymous or local. See the precise privacy commitment.

Pay per query: 0.005 USDC

For occasional jq calls, explicitly pay 0.005 native USDC on Base per execution attempt through x402. Active 30-day passes are never charged. Use an x402 client with an authorized $0.005 maximum payment policy.

REST: send POST /process with a saved secret UUID bearer token, X-JQ-Payment: query, and Idempotency-Key: A_NEW_UUID. The 402 challenge requests exactly 5000 atomic USDC. Retry with PAYMENT-SIGNATURE, preserving the identical JSON body, key and payment mode. Generate the key once per logical query; never reuse a fixed key for different queries.

POST /process
Authorization: Bearer YOUR_SECRET_UUID
Content-Type: application/json
X-JQ-Payment: query
Idempotency-Key: A_NEW_UUID_FOR_THIS_QUERY
X-JQ-Privacy: required

{"input":{"name":"Alice"},"filter":".name"}

MCP: call process_json with normal arguments and params._meta["com.thejqapi/payment"] = {"mode":"query","idempotency_key":"A_NEW_UUID"}. The tool error contains the challenge; the signed retry adds _meta["x402/payment"]. Receipts appear in _meta.query_payment and _meta["x402/payment-response"]. Keep credentials and payment data out of tool arguments.

Payment precedes execution. Structural request validation happens first, but jq/runtime errors and remote-fetch failures after settlement are chargeable. A settled payment permits at most three identical delivery attempts within 15 minutes, including the first. Results are re-executed, never cached; remote URL content may change.

Recover without another payment: a 202 or MCP payment_status:202 means settlement is pending and no execution. Check GET /access/purchases/{idempotency_key} with the same bearer, then retry the original identical request/key when settled. Changed requests or exhausted attempts return 409; expired delivery returns 410. REST success includes X-JQ-Purchase-Id and, on settlement, PAYMENT-RESPONSE.

Per-query privacy: no JSON, filters, URLs or results are stored, and free quota/source tracking is bypassed. Each logical query retains a billing receipt and payment timestamp, plus a keyed fingerprint and bounded retry counter until its delivery window expires (cleanup every five minutes). Resolved receipts last up to 365 days; pending orders retain recovery data. The $2 pass offers the stronger absence of per-query records. Public payments can reveal timing/count; Cloudflare, payment and upload boundaries apply.

Paid UUIDs never fall back to tracked free access: use explicit per-query payments or an active pass. Upload creation uses free access or a pass; query payments cover only jq processing of inline JSON, URLs or existing upload IDs. Check live pricing for availability.

jq compatibility & options

REST and MCP run jq compiled to WebAssembly on Cloudflare Workers. Built-in filters, regex (including named captures), formats, custom functions, and supplied modules use the jq engine. Current version & option list · jq manual.

options field jq behavior
args / argjson Named string / JSON variables (--arg / --argjson)
null_input Run once with null (-n); pass input: null
slurp Collect inputs into an array (-s)
raw_input / input_stream Read a string as text lines (-R) / multiple JSON texts; choose one
raw_output / join_output Unquoted string output (-r) / no separating newlines (-j) in stdout
compact_output / sort_keys / ascii_output Compact (-c), sort keys (-S), or escape non-ASCII characters (-a) in stdout
modules Relative .jq / .json filenames mapped to contents; available only for this call
{
  "input": [1, 2, 3],
  "filter": "include \"math\"; map(scale($factor))",
  "options": {
    "argjson": { "factor": 4 },
    "modules": { "math.jq": "def scale($n): . * $n;" }
  }
}

This emits [4, 8, 12]. A normal JSON array is one input value; slurp wraps it in another array. To sum a stream, send input: "1\n2\n3", filter: "add", and options: {"input_stream": true, "slurp": true}.

Existing result and rawResult fields retain their scalar/array convention. The results array contains every emitted jq value, and stdout preserves jq formatting, whitespace, and newlines. Debug output is returned privately as stderr. jqVersion identifies the engine.

Verified against 62 native jq examples. Each call has isolated memory and modules; local files, shell commands, and Worker secrets are unavailable. Public HTTPS URL input is supported. Native CLI filesystem/process behavior and arbitrary command-line flags are outside this JSON interface. Existing daily quotas and Cloudflare resource limits apply.

Authentication

Simple UUID-Based Authentication

No account registration required! Simply use any UUID as your API key.

  • • Generate any UUID (or use the auto-generated one on the main page)
  • • Include it in the Authorization header
  • • Each unique UUID gets 1,000 requests per day
  • • No account creation or verification needed

How to Use

Include your UUID in the Authorization header:

Authorization: Bearer 550e8400-e29b-41d4-a716-446655440000

Rate Limiting

With UUID Authentication

1,000 requests/day

Per unique UUID

Without Authentication

100 requests/day

For anonymous usage

Important Notes:

  • • Each unique UUID is tracked separately for rate limiting
  • • Rate limits reset daily at midnight UTC
  • • You can use multiple UUIDs for higher limits
  • • No verification or registration required

Need More Requests?

If you need more than 1,000 requests per day for your UUID, please contact us at contact@thejqapi.com

API Endpoints

POST /process

Process JSON data using jq filter expressions.

Request Body:

{
  "input": "JSON data to process",
  "filter": "jq filter expression",
  "options": {
    "slurp": "Read entire input as array (optional)"
  }
}

Response:

{
  "success": true,
  "result": "processed data",
  "rawResult": "stringified result",
  "executionTime": 15
}

Parameters:

input

JSON data to process

Any valid JSON value (object, array, string, number, boolean)

filter

jq filter expression

Valid jq filter syntax (required)

options.slurp

Slurp option

Read entire input as array (optional, boolean)

Examples

Extract Field from Object

Request:

curl -X POST https://thejqapi.com/process \
  -H "Content-Type: application/json" \
  -d '{
    "input": {"name": "John", "age": 30},
    "filter": ".name"
  }'

Response:

{
  "success": true,
  "result": "John",
  "rawResult": "\"John\"",
  "executionTime": 5
}

Filter Array

Request:

curl -X POST https://thejqapi.com/process \
  -H "Content-Type: application/json" \
  -d '{
    "input": [1, 2, 3, 4, 5],
    "filter": ".[] | select(. > 2)"
  }'

Response:

{
  "success": true,
  "result": [3, 4, 5],
  "rawResult": "[3,4,5]",
  "executionTime": 8
}

Transform Object

Request:

curl -X POST https://thejqapi.com/process \
  -H "Content-Type: application/json" \
  -d '{
    "input": {"firstName": "John", "lastName": "Doe"},
    "filter": "{ fullName: (.firstName + \" \" + .lastName) }"
  }'

Response:

{
  "success": true,
  "result": {"fullName": "John Doe"},
  "rawResult": "{\"fullName\":\"John Doe\"}",
  "executionTime": 12
}

Error Codes

400

Bad Request

Invalid request format, missing required fields, or invalid jq filter syntax

401

Unauthorized

Missing Authorization header when authentication is required

403

Forbidden

Required private pass is inactive or expired. No tracked free fallback; renew or explicitly pay per query.

402

Payment Required

An explicit payment needs an x402 wallet authorization. Read PAYMENT-REQUIRED for 0.005 USDC per query or the 2 USDC / 30-day pass. Processing has not run. Use X-JQ-Payment: pass to opt in on the original REST request, or use a purchase endpoint.

404

Not Found

Endpoint not found

429

Too Many Requests

Free daily quota exhausted. The response includes reset_at, Retry-After, and a structured upgrade offer linking to /pricing and private checkout. Wait until the UTC reset or choose paid access; a 429 never charges your wallet.

📖 jq Documentation

For comprehensive jq filter syntax and functions, visit the official documentation.

View jq Manual

Need higher rate limits? If you need more than 1,000 requests per day for your UUID, please contact us at contact@thejqapi.com