> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loyalty.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP overview

> Query LoyaltyDog from Claude, Cursor, Windsurf, and other Model Context Protocol clients.

The LoyaltyDog MCP server exposes our REST API as a set of structured tools any [Model Context Protocol](https://modelcontextprotocol.io/) client can call. It's an HTTP wrapper around the LoyaltyDog API — no direct database access — and can be pointed at development, staging, or production.

## What you can do

Once connected, an AI assistant can answer natural-language questions about your loyalty data:

* "Show me the top ten loyalty programs by active customers this month."
* "List gift cards issued in the last 24 hours."
* "What's the wallet-pass install rate for program XYZ?"
* "Create a new customer record for [ada@example.com](mailto:ada@example.com) in program ABC."

The MCP server enforces the same authentication and program-isolation rules as the underlying REST API — it cannot reach data your token does not own.

## Architecture

```
┌──────────────┐   MCP   ┌──────────────┐   HTTPS  ┌──────────────────┐
│ AI assistant │ ───────▶│ MCP server   │ ───────▶│ LoyaltyDog API   │
│ (Claude, …)  │         │ (local proc) │          │ api.loyalty.dog  │
└──────────────┘         └──────────────┘          └──────────────────┘
                              │
                              └── bearer token from env
```

The server runs as a local process started by your AI client. Your bearer token never leaves your machine except in outbound calls to the LoyaltyDog API.

## Tool surface

The MCP server is **read-only** — it covers listing, getting, and searching the high-traffic parts of the API:

* **Loyalty programs** — `list_programs`, `get_program`
* **Customers** — `search_customers`, `get_customer`
* **Loyalty transactions** — `get_customer_transactions`
* **Wallet passes** — `list_passes`, `get_pass`
* **Gift cards** — `list_gift_cards`, `get_gift_card`, `get_gift_card_transactions`
* **System** — `get_system_health`

There are no create, update, issue, redeem, or reporting tools. For writes — creating or updating customers, issuing or redeeming gift cards, regenerating wallet passes, generating reports, and so on — hit the REST API directly. See the [API reference](/api-reference).

## Next steps

<CardGroup cols={2}>
  <Card title="Install the server" icon="terminal" href="/mcp/installation">
    Clone, configure, and run the MCP server locally.
  </Card>

  <Card title="Connect a client" icon="plug" href="/mcp/clients">
    Wire up Claude Desktop, Claude Code, Cursor, or Windsurf.
  </Card>
</CardGroup>
