Fundusze Europejskie Województwo Łódzkie Unia Europejska

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 Authorization header 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.

ToolWhat it doesEffectArguments (* required)
list_gamification_levelsList all active gamification levels (tiers) for a specific merchant.read
create_gamification_levelCreate a new experience tier (Level) for a merchant.writesname*, required_points*
list_questsList all active quests for a specific merchant.read
create_questCreate a new Quest for a merchant.writesname*, description, reward_type, reward_points, status
list_gamification_tasksList tasks configured for a specific quest.readquest_id*
create_gamification_taskCreate a task for an existing quest.writesquest_id*, platform*, engagement*, description*, reward_points*
list_collectionsList all active collections for a specific merchant.read
create_collectionCreate a new Collection of Benefits for a merchant.writesname*, description, items_amount, items_price, status
add_benefit_to_collectionAdd or update a Benefit configuration for a Collection.writescollection_id*, benefit_type*, discount_type, discount_value, others
add_asset_to_collectionAdd a graphic Asset (image/video URL) to a Collection.writescollection_id*, url*
list_boardsList all active leaderboards (rankings) for a specific merchant.read
create_boardCreate a new Leaderboard (Ranking) for a merchant.writesname*, description, start_date, end_date, assignment_type, status
assign_quests_to_boardLink specific quests to a leaderboard.writesboard_id*, quest_ids*
Loyalty · customers and ledgers 9 tools

Points, cashback and benefits for named customers, plus the transaction and points ledgers.

ToolWhat it doesEffectArguments (* required)
grant_points_to_userGrant points directly to a user by email.writesuser_email*, amount*, reason, idempotency_key
grant_cashback_to_userGrant cashback (Coins) directly to a user by email.writesuser_email*, amount*, reason, idempotency_key
assign_benefit_to_userAssign a benefit (Asset) from a specific Collection to a user.writesuser_email*, collection_id*, reason, idempotency_key
list_transactionsList general transactions (e.g., PAYMENT, PURCHASE, AFTERMARKET, REDEEM) associated with the merchant.readlimit, transaction_type
get_purchase_historyRetrieve purchase history by customers within the merchant's collections.readlimit, status
get_point_historyRetrieve the loyalty points ledger/history for the merchant.readlimit, user_id
get_merchant_metricsGet aggregated analytics and metrics for the authenticated merchant.read
get_collection_analyticsGet detailed analytics for a specific collection owned by the merchant.readcollection_id*
get_mcp_historyGet the history of actions performed by the MCP agent for the authenticated merchant.readlimit
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.

ToolWhat it doesEffectArguments (* required)
list_metric_catalogDiscover 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_metricsAggregate the merchant's synced marketing/revenue data (ad platforms, shop, CRM) — the engine behind every Insights widget.readmetrics*, date_from*, date_to*, sources, granularity, dimension, compare_mode, campaign_filter, conversion_action
list_dashboardsList the merchant's Insights dashboards and the global templates that can be cloned with create_dashboard(from_template_id=...).read
get_dashboardFull definition of one dashboard, including every widget (type, title, metrics, sources, dimension, config).readdashboard_id*
create_dashboardCreate 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).writesname, description, from_template_id
update_dashboardRename a dashboard and/or change its description.writesdashboard_id*, name, description
add_widgetAdd a widget to a dashboard.writesdashboard_id*, type*, title*, metrics*, sources, dimension, campaign_filter, conversion_action, sort_by, sort_dir, row_limit
update_widgetModify an existing widget.writesdashboard_id*, widget_id*, type, title, metrics, sources, dimension, campaign_filter, conversion_action
remove_widgetRemove one widget from a dashboard (the dashboard itself stays).writesdashboard_id*, widget_id*
create_calculated_metricCreate (or overwrite) a custom metric computed from a formula over the merchant's data, usable in query_metrics and widgets like any built-in.writeskey*, name*, formula*, unit, campaign_filter
delete_calculated_metricDelete one of the merchant's own calculated metrics by key.writeskey*
Creative Studio · account, brand and library 21 tools

Model catalog and prices, brand profile, reference media, credits, storage and the creative library with approvals.

ToolWhat it doesEffectArguments (* required)
studio_get_configGet Studio model catalog, prices, video types, supported durations and prompt limits.read
studio_get_brandGet the merchant's brand profile and talent/reference libraries.read
studio_update_brandUpdate supplied brand fields; omitted fields retain their values.writesidempotency_key*, name, description, tone, language, colors, typography, product_description, logo, packshots, references, talent
studio_upload_brand_assetUpload JPEG/PNG/WebP brand media, at most 10 MiB, from base64 bytes.writesspends creditsidempotency_key*, filename*, content_type*, content_base64*
studio_list_reference_videosList uploaded reference clips with IDs and verified durations for supported video models.read
studio_upload_reference_videoUpload an MP4 reference clip from base64 bytes: 2–15 seconds, at most 50 MiB.writesspends creditsidempotency_key*, filename*, content_type*, content_base64*
studio_get_creditsRead available Studio credits and the fifty latest ledger entries.read
studio_list_credit_packsList available credit packs and checkout URLs.read
studio_get_storageRead used storage, quota, extra blocks and block pricing.read
studio_set_storage_blocksSet extra storage blocks (0–100).writesspends creditsidempotency_key*, blocks*
studio_list_assetsPage/filter creatives by run, provider model ID, kind, inclusive dates and approved=1.readlimit, offset, run, model, kind, approved, date_from, date_to
studio_get_assetGet one creative's details, copy, approvals, source run/concept and edit lineage.readasset_id*
studio_upload_assetUpload an owned library creative from base64: JPEG/PNG/WebP up to 10 MiB or MP4 up to 200 MiB.writesidempotency_key*, filename*, content_type*, content_base64*
studio_delete_assetsDelete up to 100 owned creatives and their edited descendants, including stored media where unshared.writesidempotency_key*, ids*
studio_label_assetStamp supplied disclosure text on an image as a new stored version.writesasset_id*, idempotency_key*, color*, position*, orientation*, size*, text*
studio_approve_assetsApprove owned creatives for use, or revoke approval.writesidempotency_key*, ids*, revoke
studio_approve_ad_textsApprove or revoke an existing text variant by index, or all variants with all=true.writesasset_id*, idempotency_key*, index, all, revoke
studio_generate_ad_textsBuy three ad-text variants synchronously for an IMAGE only.writesspends creditsasset_id*, idempotency_key*
studio_update_ad_textsReplace an IMAGE's complete copy pack (1–5 variants) and its approval indices without AI charges.writesspends creditsasset_id*, idempotency_key*, variants*, approved_ad_texts
studio_list_productsSearch/page mirrored products and read feed URL and last sync time.readlimit, offset, search
studio_sync_productsSynchronously fetch the merchant's configured product feed and update its product mirror.writesidempotency_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.

ToolWhat it doesEffectArguments (* required)
studio_get_winner_contextRead winning-ad copy, analysis and suggested brief.readspends creditsidempotency_key*, ad_id*, image
studio_list_runsPage Studio run history.readlimit, offset
studio_get_runPoll a run's current state, failures, prompts, steps, storyboards and results.readrun_id*
studio_create_runCreate a static/video concept run, charge the concepting fee and queue CONCEPTS_PENDING work.writesspends creditsidempotency_key*, pipeline, brief, language, brand_fidelity, winner, products, talent, packshots, references, video_type, duration_s, aspect_ratio, persona, provided_frames
studio_prepare_promptsPrepare selected static concept prompts for review; may queue LLM work.writesspends creditsrun_id*, idempotency_key*, selected*, talent
studio_approve_promptsApprove a PROMPTS_READY static run and queue paid images.writesspends creditsrun_id*, idempotency_key*, prompts, input_urls, model_key, variants, aspect_ratio
studio_start_runReserve credits and start selected STATIC concepts, asynchronously preparing prompts for review before rendering.writesspends creditsrun_id*, idempotency_key*, selected, quality, model_key, variants, aspect_ratio, talent
studio_create_own_prompt_runReserve image-generation credits and create a static run from your prompt and owned references, parked at PROMPTS_READY.writesspends creditsreference_url, reference_product_id, reference_urls, reference_product_ids, idempotency_key*, prompt*, model_key, variants, aspect_ratio
studio_generate_conceptBuy 1–2 fresh images of one prior STATIC concept in a new run, inheriting its model and references.writesspends creditsrun_id*, idempotency_key*, concept_index*, variants
studio_edit_assetBuy an image/storyboard edit as a new run/version, using up to six distinct owned references.writesspends creditsreference_url, reference_product_id, reference_urls, reference_product_ids, asset_id*, idempotency_key*, instruction*, model_key
studio_create_storyboardBuy a video storyboard round for one concept.writesspends creditsrun_id*, idempotency_key*, selected*, model_key, shot_list, mode, scene_count
studio_approve_storyboardApprove the frame currently awaiting one_by_one review; resumes the already-purchased round or completes its final approval.writesrun_id*, idempotency_key*
studio_replace_frameReplace a first/last video frame with an owned image asset or upload URL at zero credits.writesasset_id, url, run_id*, idempotency_key*, frame*
studio_create_storyboard_montageQueue a numbered storyboard sheet from a finished scenes round, with no AI credits.writesrun_id*, idempotency_key*
studio_render_videoBuy an asynchronous video render from a storyboard or completed scenes.writesspends creditsrun_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.

ToolWhat it doesEffectArguments (* required)
studio_list_meta_campaignsBrowse existing Meta campaigns and delivery metrics in the connected account.readpreset
studio_list_meta_adsetsBrowse existing ad sets and metrics for one existing campaign.readpreset, campaign_id*
studio_list_meta_adsBrowse ads and metrics in one existing ad set.readpreset, adset_id*
studio_prepare_meta_adsetRead Page/Instagram identities, link, CTA choices and already-published asset IDs for an existing ad set.writesadset_id*
studio_publishQueue 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_batchPoll a publish batch and its asynchronous per-item states/errors.readbatch_id*
studio_list_publish_batchesList 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.

ToolWhat it doesEffectArguments (* required)
authenticateAuthenticate this stdio session.writestoken*

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_packs only returns checkout links, it never purchases.
  • Ads. studio_publish creates 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_publish creates 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

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