Skip to main content

// developers

Drive your whole store from your own AI.

Magistry exposes the same tool registry its own assistant uses — as a REST API and as a remote MCP server. Every tool is tagged read, auto_write or propose_write, a propose_write lands as an approval card, and every call is scoped to exactly what you granted.

app.magistry.io/api/v1 MCP at /api/mcp API version 1 · 365-day notice

// auth

Two ways in. One safety model.

API keys for scripts and servers, OAuth 2.1 for MCP clients. Whichever you pick, writes follow the same rules as the rest of Magistry: a propose_write waits for an operator, and auto-apply is something you switch on per credential.
scripts · servers

API key

Minted on the Developers page (Settings → Developers), scoped at creation — ads:read, catalog:write, or the read / write / admin bundles. Sent as a Bearer token on every call.

Authorization: Bearer mag_sk_live_…

No store yet? “Try the API on demo data” on the same page gives you a mag_sk_sbx_ key on a private copy of the demo shop for 7 days. Reads return real-shaped data; writes answer with what they would do and change nothing.

mcp clients

OAuth 2.1

The MCP server ships a full authorization server with PKCE. Clients register with a Client ID Metadata Document (dynamic client registration still works until its announced sunset). On connect you pick the store and the scopes — the client never sees more than you granted. Bearer API keys work here too.

https://app.magistry.io/api/mcp
writes

Approval-gated writes

Writes are either auto_write or propose_write. A propose_write returns an approval card the operator confirms in the dashboard. Auto-apply is opt-in, per credential, in Settings → Developers. Writes that hand authority back (releasing the kill switch, turning automation on, declaring ownership of a field) always wait for the operator, whatever auto-apply says. Stopping is immediate.

"status": "proposed", "applied": false

// the tool registry

One registry. Magistry's tools are your tools.

Every tool is invoked the same way: POST /api/v1/tools/{tool}. Each one is tagged read, auto_write or propose_write — the full catalog, with schemas, lives on your Developers page and in the OpenAPI document. A few examples:
READ

get_store_overview

Revenue, spend, profit, open approvals — the same overview the dashboard renders.

POST /api/v1/tools/get_store_overview
READ

query_products

Catalog state — lifecycle, tiers, cost confidence, per-product performance.

POST /api/v1/tools/query_products
READ

get_orders_summary

Order and revenue rollups over any window, per store.

POST /api/v1/tools/get_orders_summary
READ

query_performance

Daily performance series — spend, revenue, ROAS across channels.

POST /api/v1/tools/query_performance
PROPOSE_WRITE

propose_discount

Draft a discount campaign. Lands as an approval card the operator confirms.

POST /api/v1/tools/propose_discount
PROPOSE_WRITE

shopify_update_variant_price

Reprice a variant on Shopify. Approval-gated unless auto-apply is opted in.

POST /api/v1/tools/shopify_update_variant_price

// examples

curl it, or hand it to your AI.

The REST surface is one POST per tool with a Bearer key. The MCP server is the same registry over Streamable HTTP — connect Claude, Cursor, or any MCP client and your AI reads, analyses, and proposes against your live store.
restPOST
curl -X POST \
  https://app.magistry.io/api/v1/tools/query_performance \
  -H "Authorization: Bearer mag_sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "window_days": 30 }'

# writes go through the same shape —
# a propose_write returns an approval card
# ("status": "proposed", "applied": false)
# that the operator confirms in the dashboard
curl -X POST \
  https://app.magistry.io/api/v1/tools/propose_discount \
  -H "Authorization: Bearer mag_sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "product_ids": ["…"], "discount_percent": 15,
        "reason": "Clear winter stock" }'
mcpStreamable HTTP
# Claude Code
claude mcp add --transport http magistry \
  https://app.magistry.io/api/mcp

// claude.ai → Settings → Connectors →
//   Add custom connector →
//   https://app.magistry.io/api/mcp
// OAuth picks your store + scopes on connect.

// scopes

Grant exactly what the integration needs.

Scopes are fine-grained per resource + action, with read / write / admin bundles when you want the short version. Rate limits are 120 requests per minute per credential and store by default, higher on some plans, and a 429 carries Retry-After.
ScopeCoversNotes
readEvery read toolBundle — full reporting surface, no writes
writeEvery write toolBundle — implies read; propose_write tools still need approval
adminEverything on your stores, including settingsBundle — for trusted internal integrations only
ads:read · catalog:write · …One resource, one actionFine-grained — per resource + action, mix freely per key

// connect your ai

Works with the AI you already use.

The MCP endpoint speaks standard Streamable HTTP, so anything that speaks MCP can drive your store — with the store and scope selection you approved, and nothing more.
Claude (claude.ai)Custom connector

Add the /api/mcp URL as a custom connector. OAuth walks you through store + scope selection.

app.magistry.io/api/mcp
Claude Codeclaude mcp add

One command adds the remote server over HTTP — it is in the example on this page.

app.magistry.io/api/mcp
CursorMCP settings

Point Cursor's MCP settings at the remote endpoint and your editor can query the store mid-task.

app.magistry.io/api/mcp
Any MCP clientStreamable HTTP

MCP revisions 2026-07-28 and 2025-06-18. OAuth 2.1 with a Client ID Metadata Document, or a Bearer API key.

app.magistry.io/api/mcp

// reference

The spec is the source of truth.

No hand-written docs that drift. The OpenAPI document is generated from the live tool registry, and the Developers page in your dashboard shows the exact catalog your credentials can reach.

OpenAPI document

The full REST surface — every tool, every input schema, every response shape — is published as an OpenAPI document. Point a generator or an agent at it and go.

GET https://app.magistry.io/api/v1/openapi.json

The Developers page

Settings → Developers in the dashboard is where keys live: mint and revoke API keys, pick scopes, browse the full tool catalog with its read / auto_write / propose_write tags, and opt a credential into auto-apply.

  • Mint scoped keys (mag_sk_live_…)
  • Full tool catalog, tagged per tool
  • Auto-apply opt-in, per credential

// events · versioning

Hear about it when it happens. Keep working when we change.

Subscribe to events instead of polling, and build on a contract that only grows.

Webhooks

CloudEvents 1.0, signed with ES256 under Standard Webhooks and verifiable against our published JWKS. Delivery is at-least-once: dedupe on the event id. Failed deliveries retry with backoff, and a 410 unsubscribes. Published today: order created and refunded, approval requested, decided and expired, and a field overwritten outside Magistry. Each event type needs the scope that covers it.

POST https://app.magistry.io/api/v1/subscriptions

Versioning

Version 1 changes additively only. A read never becomes a write, and a scope change counts as breaking. Anything we remove is announced at least 365 days ahead with Deprecation and Sunset headers on the affected calls, and listed in the changelog.

GET https://app.magistry.io/api/v1/changelog.json
public documents · no key needed
https://app.magistry.io/api/v1/openapi.json      OpenAPI 3.1, every operation
https://app.magistry.io/api/v1/asyncapi.json     AsyncAPI 3.0, every event
https://app.magistry.io/api/v1/changelog.json    changes + deprecations
https://app.magistry.io/.well-known/jwks.json    webhook + token keys

// developers

The same tools Magistry uses. In your hands.

One registry powers the dashboard assistant, the MCP server, and the REST API — same scopes, same approval model, same audit trail as everything else in Magistry.

Bearer API keys · OAuth 2.1 + PKCE · Signed webhooks · 365-day deprecation notice