> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/technical-guide/integration/mcp-server.md).

# MCP Server

Connect any MCP-compatible AI assistant or agent to your Open Loyalty program with the hosted MCP connector and run your loyalty program in plain language.

**Talk to your loyalty program.** The Open Loyalty MCP connector plugs your AI straight into your Open Loyalty instance through the **Model Context Protocol (MCP)**, the open standard for connecting AI to tools and data. It works with any AI assistant, agent or IDE that supports MCP. Ask a question or describe an outcome, and your AI finds the right tools and calls them for you: members, points, rewards, campaigns, tiers, segments, analytics and more.

No scripts, no dashboards to stitch together, no API calls to hand-write. Just ask.

* 🚀 **Ready in minutes.** Open Loyalty hosts the connector, so there is nothing to install, update or run. Add one URL to your AI client and sign in.
* 🔐 **Secure by design.** Your API key is checked against your instance and stored encrypted. Your AI client only ever receives short-lived tokens, never the key itself.
* ⚡ **Always up to date.** New tools and fixes reach you automatically the moment Open Loyalty ships them.
* 🧠 **Built for agents.** Every tool is described for AI, so your AI can chain lookups, analytics and changes together and correct its own mistakes along the way.

***

## 🛠️ Get connected

Everything you need to connect is on the official connector page:

{% hint style="success" %}
👉 [**mcp.openloyalty.io**](https://mcp.openloyalty.io/) — the official setup guide for the Open Loyalty MCP connector: the connector URL, setup instructions, and how your data is handled.
{% endhint %}

Always follow the instructions on [mcp.openloyalty.io](https://mcp.openloyalty.io/). It is kept in step with the connector itself, so it is the one place that is guaranteed to be current.

To sign in, you need your Open Loyalty API URL and an API key. To create a key, see [Access Token (API Key)](https://help.openloyalty.io/technical-guide/authentication/access-token-api-key.md).

{% hint style="info" %}
The connector works directly against your Open Loyalty API, so treat the API key with the same care as an admin password. Delete the key in Open Loyalty to cut off access at any time.
{% endhint %}

***

## 🧩 What your AI can do for you

| Area                               | What you can ask for                                                                                |
| ---------------------------------- | --------------------------------------------------------------------------------------------------- |
| **Members**                        | Find, create and update members, check balances, tiers and activity                                 |
| **Points and wallets**             | Add, spend, transfer and review points across wallet types                                          |
| **Rewards**                        | Browse the catalogue, create rewards, issue and redeem coupons                                      |
| **Campaigns**                      | Draft, review and activate campaigns, check their performance                                       |
| **Segments**                       | Build audiences from behaviour and see how many members qualify                                     |
| **Tiers, badges and achievements** | Inspect tier structures, member progress and earned badges                                          |
| **Transactions and custom events** | Look up purchases, returns and custom events for any member                                         |
| **Analytics**                      | Get member, points, tier, campaign and referral statistics in seconds                               |
| **Operations**                     | Work with stores, webhooks, imports, exports, languages and channels                                |
| **Interactive views**              | Open dashboards, member profile cards, a rewards catalogue and a campaign builder right in the chat |

***

## ✨ Try it

Once you are connected, ask your AI to list a few members or fetch program analytics to confirm everything works. Then go further:

* "List the top 10 members by points balance in the default store."
* "Create a campaign that grants double points to the lapsed-60-days segment this weekend, then show it to me before activating."
* "Add 500 points to member `<id>` and read back the new wallet balance."
* "Which tier has the lowest retention this quarter? Use program analytics."
* "Build a segment of members with no purchase in 60 days and tell me how many qualify."

{% hint style="warning" %}
**Human in the loop.** Treat write actions (create, spend, publish) as proposals. Review the AI's plan before it commits changes to a live program.
{% endhint %}

***

## 👉 Links

* Official connector setup: [mcp.openloyalty.io](https://mcp.openloyalty.io/)
* Questions or problems: <support@openloyalty.io>
* Open Loyalty: [openloyalty.io](https://openloyalty.io)
* MCP protocol: [modelcontextprotocol.io](https://modelcontextprotocol.io)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.openloyalty.io/technical-guide/integration/mcp-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
