Loyalty.lt

AI agent for partners

Point your own AI assistant at your Loyalty.lt account and let it run the day-to-day work

AI agent for partners

A partner can hand their own AI assistant a key to their Loyalty.lt account. The assistant then does what the partner does in the portal: opens shops, issues cards, looks up a customer's balance, drafts a campaign, checks the invoice. No integration work, no API client to write — the assistant speaks MCP and the server translates.

This is not the same thing as the docs MCP server. That one gives a coding assistant the documentation. This one gives an assistant your live account.

Getting a key

The partner creates it themselves, in the portal: partners.loyalty.lt → AI agentas (MCP).

  • Only the account owner can create or revoke a key. Staff see the list.
  • The key looks like lmcp_… and is shown once. We store only its hash, so a forgotten key is replaced, never recovered.
  • An optional expiry date is part of the form. A key with no expiry stays valid until it is revoked.
  • A key can be revoked at any moment and stops working immediately.

Connecting

The server speaks Streamable HTTP. One endpoint, one header:

POST https://mcp.loyalty.lt/mcp
Authorization: Bearer lmcp_…

Claude Code

claude mcp add --transport http loyalty-lt https://mcp.loyalty.lt/mcp --header "Authorization: Bearer lmcp_…"

Claude Desktop and Claude.ai

Claude Desktop reads claude_desktop_config.json — ~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows. Restart the app after editing.

{
  "mcpServers": {
    "loyalty-lt": {
      "url": "https://mcp.loyalty.lt/mcp",
      "headers": { "Authorization": "Bearer lmcp_…" }
    }
  }
}

On claude.ai the same server is added under Settings → Connectors → Add custom connector, with the address and the Authorization header.

Cursor

The same JSON, in .cursor/mcp.json inside the project — or ~/.cursor/mcp.json to have it everywhere.

opencode

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "loyalty-lt": {
      "type": "remote",
      "url": "https://mcp.loyalty.lt/mcp",
      "enabled": true,
      "headers": { "Authorization": "Bearer lmcp_…" }
    }
  }
}

opencode.json in the project, or ~/.config/opencode/opencode.json globally.

ChatGPT

Settings → Connectors → Create. Enter the server address, pick API key authentication and paste the lmcp_ key; ChatGPT sends it as the Authorization header.

The token is resolved per request. Two partners hitting the same server never see each other's data: the key decides the partner, and every call is scoped to that partner by the API itself, not by the MCP server.

What the agent can do

45 tools, grouped by what a partner actually does in a week:

AreaTools
Overviewdashboard_summary
Shopsshops_list, shop_create, shop_update
Loyalty cardscards_list, card_detail, card_issue
Customerscustomers_search, customer_detail, customer_points_balance
Transactionstransactions_list, transaction_detail
Couponscoupons_list, coupon_issue, coupon_verify, coupon_redeem, coupon_stats
Offers and productsoffers_list, offer_create, offer_stats, products_list, product_detail
Gamesgames_list, game_stats
SMSsms_campaigns_list, sms_campaign_create, sms_stats, sms_usage
Emailemail_campaigns_list, email_campaign_create, email_campaign_send, email_campaign_test, email_stats
Pushpush_campaigns_list, push_campaign_create, push_campaign_send, push_campaign_estimate, push_stats
Billingbilling_plan, billing_current_month, billing_invoices, billing_invoice_detail
Staffstaff_list, staff_invite
API keysapi_credentials_list

api_credentials_list returns keys, never secrets — a secret is shown once, at creation, in the portal.

Example prompts

The agent reads plain language and picks the tools itself.

How did this week go? Show new customers, transactions and points.
Find the customer with the email jonas@pavyzdys.lt and tell me their points balance.
Issue this customer a 10% discount coupon valid for two weeks and give me the code.
Draft an SMS campaign for customers who haven't bought in 60 days and tell me what it will cost.
How much has this month cost so far, and what plan am I on?

Things worth knowing before you let it loose

Writes are real. coupon_redeem burns a coupon. email_campaign_send and push_campaign_send deliver to real customers and count against the plan quota. sms_campaign_create with save_as_draft: false is the send — it goes to moderation and then bills. Tool descriptions say so, but an agent acting unattended should be told which of these it may use.

Nothing is idempotent yet. No partner endpoint accepts an idempotency key, so a retried send is a second send. Until that changes, let the agent send once and check *_stats rather than retrying blind.

Recording a purchase is not here. Points are earned through the Shop API with X-API-Key / X-API-Secret, from the till or the webshop — not through an MCP token. The agent can read transactions, not create them.

Security model

One key equals one partner account, with the same reach as the person who created it. Treat it like a password: not in email, not in a repository, not pasted into a chat with a third party. When an agent is retired, revoke its key — the list in the portal shows when each key was last used, which is the quickest way to spot one nobody needs any more.

The key cannot manage keys. An agent calling the token endpoints with its own key gets 403 — issuing and revoking stays with a signed-in human.

On this page