API Reference

Submit AI tools to MagicBox.Tools programmatically via REST API, CLI, or MCP

MagicBox.Tools is agent-native: you (or your AI agent) can submit tools, track submission status, and search the directory programmatically.

Authentication

Create an API key at Settings → API Keys, then pass it as a Bearer token:

curl -H "Authorization: Bearer mb_live_..." https://magicbox.tools/api/v1/sites

The key is shown only once at creation time. Keys can be revoked anytime from the same page.

Submit a tool

curl -X POST https://magicbox.tools/api/v1/sites \
  -H "Authorization: Bearer mb_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Tool",
    "url": "https://mytool.com",
    "plan": "basic"
  }'
FieldRequiredDescription
nameyesTool display name (2-100 chars)
urlyesTool website URL
emailnoContact email for review notifications; defaults to your account email
plannobasic (default) / featured / pro, see below

Plans

PlanPriceWhat you get
basic$15.9 one-timeStandard listing
featured$19.9 one-timeFeatured badge + priority placement
pro$29.9/moSponsor slot (subscription)

If you have an active member subscription with remaining daily quota, the submission is queued directly and returns 201:

{
  "site_id": "xxxxxxxx-...",
  "status": "queued",
  "via": "membership",
  "quota": { "used_today": 1, "daily_limit": 1 }
}

Otherwise the API returns 402 Payment Required with a Stripe checkout link:

{
  "site_id": "xxxxxxxx-...",
  "status": "pending_payment",
  "plan": "basic",
  "checkout_url": "https://checkout.stripe.com/c/pay/...",
  "expires_at": "2026-01-02T00:00:00.000Z",
  "reason": "no_membership"
}

Open checkout_url in a browser to pay. After payment the submission is queued automatically under the same site_id. The link expires in 24 hours; re-posting the same URL returns the same pending record (idempotent).

Track a submission

curl -H "Authorization: Bearer mb_live_..." \
  https://magicbox.tools/api/v1/sites/{site_id}

Status flow:

pending_payment → queued → crawling → pending_review → live

                        crawl_failed          rejected
StatusMeaning
pending_paymentWaiting for payment; response includes checkout_url
queuedQueued for crawling
crawlingBeing crawled and processed
crawl_failedCrawl failed permanently — contact support
pending_reviewCrawled, waiting for editorial review
livePublished; response includes live_url
rejectedRejected by review

GET /api/v1/sites lists up to 100 of your submissions (unpaid pending submissions are only visible via GET /api/v1/sites/{site_id}).

Errors

All errors share one shape:

{ "error": { "code": "already_submitted", "message": "..." } }
HTTPCodeMeaning
400invalid_request / invalid_jsonValidation failed
401unauthorizedMissing or invalid API key
402Payment required (not an error — includes checkout_url)
404not_foundSubmission not found or not yours
409already_submittedURL or name already exists; error.site_id present if it is yours
429rate_limitedSlow down (submit: 10/min, read: 60/min)

CLI

The CLI is not yet published to npm — coming soon. Use the REST API or MCP server below in the meantime.

npx magicbox-tools-cli login              # paste your API key once
npx magicbox-tools-cli submit https://mytool.com --name "My Tool" --plan featured --open
npx magicbox-tools-cli status https://mytool.com
npx magicbox-tools-cli list

--open opens the checkout link in your browser automatically when payment is required.

MCP Server

Connect your AI agent (Claude Code, Cursor, etc.) to the MagicBox MCP server over streamable HTTP:

claude mcp add --transport http magicbox https://magicbox.tools/api/mcp/mcp \
  --header "Authorization: Bearer mb_live_..."
ToolAuthDescription
submit_siteAPI keySubmit a tool (same flow as the REST API)
get_site_statusAPI keyCheck one of your submissions
search_toolsnoneSearch the directory
get_toolnoneGet details of a listed tool

The Authorization header is optional for read-only tools — without it your agent can still search the directory.