Developers · MCP
Loyalz MCP server
One Model Context Protocol connection that gives an AI agent your ad spend and store revenue across channels, your loyalty programme and Creative Studio — scoped to one merchant account, with a full audit trail.
Last updated 23 September 2026
Endpoint
https://api.loyalz.io/api/mcp/sse
Transport
MCP over SSE (JSON-RPC 2.0); Streamable HTTP in progress
Authentication
Bearer token from Settings → Agents API
Scope
One merchant account per token
Tools
77 (43 Creative Studio, 11 Insights, 22 loyalty)
Hosted by
Loyalz, EU infrastructure
What the server gives an agent
Most marketing MCP servers hand an assistant one ad account. Loyalz is the layer that already holds every connected ad platform next to the store's settled orders, the loyalty programme the store runs, and the creative pipeline that feeds the ads. The MCP server exposes all three through one connection, scoped to one merchant account:
- Insights — query spend, clicks, conversions, revenue, orders, POAS/ROAS and every calculated metric across Meta, Google, TikTok, LinkedIn, WooCommerce, Shopify, Sellasist and e-mail; build and edit dashboards; define custom metrics from formulas.
- Loyalty — read and shape the programme (levels, quests, tasks, benefit collections, leaderboards), grant points, cashback or benefits to a named customer, read the ledgers.
- Creative Studio — brand profile and references, concept runs for statics and video with a human review gate on prompts, ad copy, approvals, and publishing approved creatives into an existing Meta ad set as paused ads.
Prompts that work on day one
- "Compare Meta and Google spend against store revenue for the last 30 days, by week, and tell me which channel has the better POAS."
- "Add a KPI card with blended CAC to the Weekly dashboard."
- "Create a quest worth 200 points for customers who follow us on Instagram."
- "Show the three best-performing ads in our summer campaign and draft a static concept run from the winner."
Connect
You need a Loyalz merchant account and an MCP token. Tokens are created in the merchant panel under Settings → Agents API; each token is bound to one merchant and can be revoked there at any time. Send it as a Bearer header on the SSE request and on every message. Tokens in the URL are not accepted.
Claude Code
claude mcp add --transport sse loyalz https://api.loyalz.io/api/mcp/sse --header "Authorization: Bearer <token>"
Claude Desktop, Cursor, Windsurf and other mcpServers clients
{
"mcpServers": {
"loyalz": {
"type": "sse",
"url": "https://api.loyalz.io/api/mcp/sse",
"headers": { "Authorization": "Bearer <token>" }
}
}
}
Any MCP client or SDK
GET https://api.loyalz.io/api/mcp/sse
Authorization: Bearer <token>
Accept: text/event-stream
# the server advertises the messages URL in the first event;
# POST every JSON-RPC message there with the same Authorization header
After connecting, call tools/list once. The catalog below is what it returns.
Every tool takes an input object, including reads with no fields
({"input": {}}).
Claude.ai and ChatGPT connector directories
The hosted directories of Claude and ChatGPT sign users in with OAuth 2.1 and expect the Streamable HTTP transport; a static token in a header is accepted by Claude Code, Claude Desktop, Cursor, Windsurf, the SDKs and self-hosted agents, but not by those two directories. OAuth sign-in and Streamable HTTP for the Loyalz server are in progress. Until they ship, connect through a header-capable client as shown above; this page will name the directory entries the day they are live.
Authentication, tenancy and audit
- One token, one merchant. The connection context is the merchant that owns the token. No tool takes a merchant id, a user id or a "switch account" argument; to work on another account, connect with that account's token.
- Bearer only. The token travels in the
Authorizationheader of the SSE request and of every POST to the messages endpoint. Session URLs are not credentials and a session cannot outlive its token: revocation is checked again before each tool call. - Plan gates apply as in the app. Insights tools need Insights enabled on the account; Creative Studio tools need the Shark plan or higher. A gated call returns a clear refusal with the plan required, never partial data.
- Writes are idempotent. Tools that change state or spend credits take an
idempotency_key; a retried call with the same key returns the original result instead of acting twice. - Audit. Actions taken through the server are logged per merchant and readable with
get_mcp_history. Studio and publishing keep their own operation registers.
Tool catalog
77 tools · 43 in Creative Studio · generated from the server registry on 23 September 2026
read no state change writes changes data in your account spends credits charges Studio credits or reserves them
Loyalty · programme structure 13 tools
Levels, quests, tasks, benefit collections and leaderboards — the objects a loyalty programme is made of.
| Tool | What it does | Effect | Arguments (* required) |
|---|---|---|---|
| list_gamification_levels | List all active gamification levels (tiers) for a specific merchant. | read | — |
| create_gamification_level | Create a new experience tier (Level) for a merchant. | writes | name*, required_points* |
| list_quests | List all active quests for a specific merchant. | read | — |
| create_quest | Create a new Quest for a merchant. | writes | name*, description, reward_type, reward_points, status |
| list_gamification_tasks | List tasks configured for a specific quest. | read | quest_id* |
| create_gamification_task | Create a task for an existing quest. | writes | quest_id*, platform*, engagement*, description*, reward_points* |
| list_collections | List all active collections for a specific merchant. | read | — |
| create_collection | Create a new Collection of Benefits for a merchant. | writes | name*, description, items_amount, items_price, status |
| add_benefit_to_collection | Add or update a Benefit configuration for a Collection. | writes | collection_id*, benefit_type*, discount_type, discount_value, others |
| add_asset_to_collection | Add a graphic Asset (image/video URL) to a Collection. | writes | collection_id*, url* |
| list_boards | List all active leaderboards (rankings) for a specific merchant. | read | — |
| create_board | Create a new Leaderboard (Ranking) for a merchant. | writes | name*, description, start_date, end_date, assignment_type, status |
| assign_quests_to_board | Link specific quests to a leaderboard. | writes | board_id*, quest_ids* |
Loyalty · customers and ledgers 9 tools
Points, cashback and benefits for named customers, plus the transaction and points ledgers.
| Tool | What it does | Effect | Arguments (* required) |
|---|---|---|---|
| grant_points_to_user | Grant points directly to a user by email. | writes | user_email*, amount*, reason, idempotency_key |
| grant_cashback_to_user | Grant cashback (Coins) directly to a user by email. | writes | user_email*, amount*, reason, idempotency_key |
| assign_benefit_to_user | Assign a benefit (Asset) from a specific Collection to a user. | writes | user_email*, collection_id*, reason, idempotency_key |
| list_transactions | List general transactions (e.g., PAYMENT, PURCHASE, AFTERMARKET, REDEEM) associated with the merchant. | read | limit, transaction_type |
| get_purchase_history | Retrieve purchase history by customers within the merchant's collections. | read | limit, status |
| get_point_history | Retrieve the loyalty points ledger/history for the merchant. | read | limit, user_id |
| get_merchant_metrics | Get aggregated analytics and metrics for the authenticated merchant. | read | — |
| get_collection_analytics | Get detailed analytics for a specific collection owned by the merchant. | read | collection_id* |
| get_mcp_history | Get the history of actions performed by the MCP agent for the authenticated merchant. | read | limit |
Insights · marketing and revenue data 11 tools
Ad platforms (Meta, Google, TikTok, LinkedIn), the store (WooCommerce, Shopify, Sellasist), e-mail, first-party touchpoints and calculated metrics such as POAS, in one query engine. Dashboards are editable.
| Tool | What it does | Effect | Arguments (* required) |
|---|---|---|---|
| list_metric_catalog | Discover what can be charted for this merchant: connected data sources, base metric keys with synced data, built-in derived ratios (roas, cpl, cpc, ctr, ...), custom calculated metrics (formulas), and conversion action names. | read | — |
| query_metrics | Aggregate the merchant's synced marketing/revenue data (ad platforms, shop, CRM) — the engine behind every Insights widget. | read | metrics*, date_from*, date_to*, sources, granularity, dimension, compare_mode, campaign_filter, conversion_action |
| list_dashboards | List the merchant's Insights dashboards and the global templates that can be cloned with create_dashboard(from_template_id=...). | read | — |
| get_dashboard | Full definition of one dashboard, including every widget (type, title, metrics, sources, dimension, config). | read | dashboard_id* |
| create_dashboard | Create an Insights dashboard: either blank (pass a name, then add widgets with add_widget) or cloned from a global template (pass from_template_id from list_dashboards; name optionally renames the clone). | writes | name, description, from_template_id |
| update_dashboard | Rename a dashboard and/or change its description. | writes | dashboard_id*, name, description |
| add_widget | Add a widget to a dashboard. | writes | dashboard_id*, type*, title*, metrics*, sources, dimension, campaign_filter, conversion_action, sort_by, sort_dir, row_limit |
| update_widget | Modify an existing widget. | writes | dashboard_id*, widget_id*, type, title, metrics, sources, dimension, campaign_filter, conversion_action |
| remove_widget | Remove one widget from a dashboard (the dashboard itself stays). | writes | dashboard_id*, widget_id* |
| create_calculated_metric | Create (or overwrite) a custom metric computed from a formula over the merchant's data, usable in query_metrics and widgets like any built-in. | writes | key*, name*, formula*, unit, campaign_filter |
| delete_calculated_metric | Delete one of the merchant's own calculated metrics by key. | writes | key* |
Creative Studio · account, brand and library 21 tools
Model catalog and prices, brand profile, reference media, credits, storage and the creative library with approvals.
| Tool | What it does | Effect | Arguments (* required) |
|---|---|---|---|
| studio_get_config | Get Studio model catalog, prices, video types, supported durations and prompt limits. | read | — |
| studio_get_brand | Get the merchant's brand profile and talent/reference libraries. | read | — |
| studio_update_brand | Update supplied brand fields; omitted fields retain their values. | writes | idempotency_key*, name, description, tone, language, colors, typography, product_description, logo, packshots, references, talent |
| studio_upload_brand_asset | Upload JPEG/PNG/WebP brand media, at most 10 MiB, from base64 bytes. | writesspends credits | idempotency_key*, filename*, content_type*, content_base64* |
| studio_list_reference_videos | List uploaded reference clips with IDs and verified durations for supported video models. | read | — |
| studio_upload_reference_video | Upload an MP4 reference clip from base64 bytes: 2–15 seconds, at most 50 MiB. | writesspends credits | idempotency_key*, filename*, content_type*, content_base64* |
| studio_get_credits | Read available Studio credits and the fifty latest ledger entries. | read | — |
| studio_list_credit_packs | List available credit packs and checkout URLs. | read | — |
| studio_get_storage | Read used storage, quota, extra blocks and block pricing. | read | — |
| studio_set_storage_blocks | Set extra storage blocks (0–100). | writesspends credits | idempotency_key*, blocks* |
| studio_list_assets | Page/filter creatives by run, provider model ID, kind, inclusive dates and approved=1. | read | limit, offset, run, model, kind, approved, date_from, date_to |
| studio_get_asset | Get one creative's details, copy, approvals, source run/concept and edit lineage. | read | asset_id* |
| studio_upload_asset | Upload an owned library creative from base64: JPEG/PNG/WebP up to 10 MiB or MP4 up to 200 MiB. | writes | idempotency_key*, filename*, content_type*, content_base64* |
| studio_delete_assets | Delete up to 100 owned creatives and their edited descendants, including stored media where unshared. | writes | idempotency_key*, ids* |
| studio_label_asset | Stamp supplied disclosure text on an image as a new stored version. | writes | asset_id*, idempotency_key*, color*, position*, orientation*, size*, text* |
| studio_approve_assets | Approve owned creatives for use, or revoke approval. | writes | idempotency_key*, ids*, revoke |
| studio_approve_ad_texts | Approve or revoke an existing text variant by index, or all variants with all=true. | writes | asset_id*, idempotency_key*, index, all, revoke |
| studio_generate_ad_texts | Buy three ad-text variants synchronously for an IMAGE only. | writesspends credits | asset_id*, idempotency_key* |
| studio_update_ad_texts | Replace an IMAGE's complete copy pack (1–5 variants) and its approval indices without AI charges. | writesspends credits | asset_id*, idempotency_key*, variants*, approved_ad_texts |
| studio_list_products | Search/page mirrored products and read feed URL and last sync time. | read | limit, offset, search |
| studio_sync_products | Synchronously fetch the merchant's configured product feed and update its product mirror. | writes | idempotency_key* |
Creative Studio · generation runs 15 tools
Concept runs for statics and video, prompt review gates, storyboards, renders and edits. Paid steps say so in the table.
| Tool | What it does | Effect | Arguments (* required) |
|---|---|---|---|
| studio_get_winner_context | Read winning-ad copy, analysis and suggested brief. | readspends credits | idempotency_key*, ad_id*, image |
| studio_list_runs | Page Studio run history. | read | limit, offset |
| studio_get_run | Poll a run's current state, failures, prompts, steps, storyboards and results. | read | run_id* |
| studio_create_run | Create a static/video concept run, charge the concepting fee and queue CONCEPTS_PENDING work. | writesspends credits | idempotency_key*, pipeline, brief, language, brand_fidelity, winner, products, talent, packshots, references, video_type, duration_s, aspect_ratio, persona, provided_frames |
| studio_prepare_prompts | Prepare selected static concept prompts for review; may queue LLM work. | writesspends credits | run_id*, idempotency_key*, selected*, talent |
| studio_approve_prompts | Approve a PROMPTS_READY static run and queue paid images. | writesspends credits | run_id*, idempotency_key*, prompts, input_urls, model_key, variants, aspect_ratio |
| studio_start_run | Reserve credits and start selected STATIC concepts, asynchronously preparing prompts for review before rendering. | writesspends credits | run_id*, idempotency_key*, selected, quality, model_key, variants, aspect_ratio, talent |
| studio_create_own_prompt_run | Reserve image-generation credits and create a static run from your prompt and owned references, parked at PROMPTS_READY. | writesspends credits | reference_url, reference_product_id, reference_urls, reference_product_ids, idempotency_key*, prompt*, model_key, variants, aspect_ratio |
| studio_generate_concept | Buy 1–2 fresh images of one prior STATIC concept in a new run, inheriting its model and references. | writesspends credits | run_id*, idempotency_key*, concept_index*, variants |
| studio_edit_asset | Buy an image/storyboard edit as a new run/version, using up to six distinct owned references. | writesspends credits | reference_url, reference_product_id, reference_urls, reference_product_ids, asset_id*, idempotency_key*, instruction*, model_key |
| studio_create_storyboard | Buy a video storyboard round for one concept. | writesspends credits | run_id*, idempotency_key*, selected*, model_key, shot_list, mode, scene_count |
| studio_approve_storyboard | Approve the frame currently awaiting one_by_one review; resumes the already-purchased round or completes its final approval. | writes | run_id*, idempotency_key* |
| studio_replace_frame | Replace a first/last video frame with an owned image asset or upload URL at zero credits. | writes | asset_id, url, run_id*, idempotency_key*, frame* |
| studio_create_storyboard_montage | Queue a numbered storyboard sheet from a finished scenes round, with no AI credits. | writes | run_id*, idempotency_key* |
| studio_render_video | Buy an asynchronous video render from a storyboard or completed scenes. | writesspends credits | run_id*, idempotency_key*, storyboard_asset_id, from_scenes, model_key, reference_video_id, reference_image_urls, animation_prompt |
Creative Studio · publishing to Meta 7 tools
Read the connected ad account and queue approved creatives into an existing ad set. Every ad is created paused.
| Tool | What it does | Effect | Arguments (* required) |
|---|---|---|---|
| studio_list_meta_campaigns | Browse existing Meta campaigns and delivery metrics in the connected account. | read | preset |
| studio_list_meta_adsets | Browse existing ad sets and metrics for one existing campaign. | read | preset, campaign_id* |
| studio_list_meta_ads | Browse ads and metrics in one existing ad set. | read | preset, adset_id* |
| studio_prepare_meta_adset | Read Page/Instagram identities, link, CTA choices and already-published asset IDs for an existing ad set. | writes | adset_id* |
| studio_publish | Queue approved assets with approved copy into an existing Meta ad set. | writescreates ads (paused) | idempotency_key*, adset_id*, items*, link_url, cta, page_id, instagram_user_id, campaign_id, campaign_name, adset_name, dry_run |
| studio_get_publish_batch | Poll a publish batch and its asynchronous per-item states/errors. | read | batch_id* |
| studio_list_publish_batches | List the twenty most recent publish batches and their item states. | read | — |
Session 1 tools
Only for stdio runs of the server; an SSE connection is authenticated by its Authorization header.
| Tool | What it does | Effect | Arguments (* required) |
|---|---|---|---|
| authenticate | Authenticate this stdio session. | writes | token* |
What can go wrong, and what cannot
- Money. No tool moves money or changes a subscription. Studio steps marked
"spends credits" draw on prepaid credits;
studio_list_credit_packsonly returns checkout links, it never purchases. - Ads.
studio_publishcreates ads in an existing Meta ad set in a paused state; nothing goes live without a human switching it on in Ads Manager. Read tools never touch the ad account. - Customers. Granting points, cashback or benefits changes a real customer's balance and is logged with the reason you pass. Use idempotency keys.
- Data. Tool responses contain your account's marketing data, order aggregates, customer e-mails on the loyalty ledgers and creative assets. Whatever your AI client does with a tool response is governed by that client's own policy; Loyalz does not send your data to any model vendor as a side effect of a tool call.
- Limits. Studio calls that trigger vision or generation work are throttled per account; a throttled call returns a retry hint instead of failing silently.
For directory reviewers and integrators
- First-party API. The server runs on
api.loyalz.io, the same backend that serves the Loyalz merchant panel. No third-party data is proxied; every tool reads or writes the merchant's own Loyalz account. - Accounts and plans. A merchant account is required (book a demo to get one). Insights tools need Insights enabled on the account; Creative Studio tools need the Shark plan. A fully provisioned test account can be issued for review on request to majewski@loyalz.io.
- Read and write are separate tools. There is no catch-all request tool; each tool does one thing and is marked above as read, writes, or spends credits. Writes take an idempotency key.
- Side effects with money or reach. Studio generation tools spend prepaid credits.
studio_publishcreates paused ads only. Nothing moves money, changes a subscription or sends messages to customers. - Known limitations. One merchant per token; no account switching inside a session. Studio vision and generation calls are throttled per account. Ad-platform data is as fresh as the last sync (daily, with intraday syncs for the store).
- Categories. Marketing analytics · Advertising · E-commerce · Loyalty and CRM · Creative production.
Privacy, terms and support
- Privacy policy: loyalz.io/legal/privacy/
- Terms: loyalz.io/legal/terms/ and terms for brands
- Deleting your data, including Meta data: loyalz.io/legal/data-deletion/
- Support and listing questions: majewski@loyalz.io; privacy matters: privacy@loyalz.io
- Status of the server: this page is updated when the catalog changes; the current build
answers
tools/listwith 77 tools.
Changelog
- 2026-09-23 — Creative Studio (43 tools) added; authentication is header-only,
the
?token=query parameter was retired; catalog now 77 tools. - 2026-07-17 — Insights tools: metric catalog, query engine, dashboards and calculated metrics.
- 2026-06 — First public version: loyalty programme tools.
Get a merchant account Read: why one MCP for ads and the store