Skip to main content
The MCP server lives in the core_api/mcp directory of the LoyaltyDog core API repository. It’s a Python process you start locally via your AI assistant’s MCP config.

Prerequisites

  • Python 3.11 or later
  • A LoyaltyDog API token (see Authentication)
  • An MCP-capable client: Claude Desktop, Claude Code, Cursor, Windsurf, or any other MCP host

Install

git clone https://github.com/loyaltydog/core_api.git
cd core_api/mcp
pip install -r requirements.txt

Configure

The server reads two environment variables:
VariablePurposeExample
LOYALTYDOG_API_URLBase URL for the v2 API (no trailing slash)https://api.loyalty.dog/api/v2
LOYALTYDOG_API_TOKENBearer token for API authenticationeyJhbGc…
You can set them inline in your MCP client config (recommended — see the client setup guide) or via a local .env:
cp .env.example .env
# Edit .env and fill in your values

Sanity-check the server

You can start the server manually to verify your token works:
LOYALTYDOG_API_URL="https://api.loyalty.dog/api/v2" \
LOYALTYDOG_API_TOKEN="your_token_here" \
python3 -m server
If the process starts without authentication errors, you’re ready to wire it into a client.

Next steps

Connect a client

Step-by-step config for Claude Desktop, Claude Code, Cursor, and Windsurf.