SocialHub.AIFlash
OverviewAPI ReferenceMCP GuidePortal EmbedQuick Start

MCP Integration Guide

The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools directly. Flash implements an MCP server so you can manage stores, members, coupons, and points from within Claude Desktop, Cursor, or any MCP-compatible client.

Instead of writing code, you simply ask the AI: "List all active stores" or"Award 500 points to member m_abc123" and the assistant calls the Flash MCP tool on your behalf.

Connection Configuration

Flash exposes a Streamable HTTP MCP endpoint. You need two pieces of information:

Endpoint URLhttps://your-domain.com/api/mcp
API Key HeaderX-API-Key: flash_sk_...

Create an API Key at /flash/account/api-keys. Ensure the key has the scopes needed for the tools you plan to use.

Claude Desktop Configuration

Add the following to your Claude Desktop MCP settings (claude_desktop_config.json):

{
  "mcpServers": {
    "flash": {
      "type": "streamable-http",
      "url": "https://your-domain.com/api/mcp",
      "headers": {
        "X-API-Key": "flash_sk_your_key_here"
      }
    }
  }
}

Cursor Configuration

In Cursor, go to Settings > MCP and add a new server:

{
  "mcpServers": {
    "flash": {
      "type": "streamable-http",
      "url": "https://your-domain.com/api/mcp",
      "headers": {
        "X-API-Key": "flash_sk_your_key_here"
      }
    }
  }
}

Available Tools (13)

list_stores

List all stores for the current team. Supports optional status filter, search, and pagination.

Parameters: status?, search?, limit?, offset?
get_store

Get details of a specific store by its ID.

Parameters: store_id
list_members

List loyalty program members. Supports program filter and pagination.

Parameters: programId?, limit?, offset?, status?
get_member

Get details of a specific loyalty member by ID. Returns decrypted PII fields.

Parameters: member_id
list_coupon_pools

List coupon pools. Supports status and type filters.

Parameters: status?, coupon_type?, limit?, offset?
get_dashboard_stats

Get aggregated dashboard statistics: captures, scans, capture rate, coupons, stores, plan.

Parameters: (none)
earn_points

Award loyalty points to a member. Returns transaction ID and new balance.

Parameters: member_id, amount, description?
redeem_points

Deduct loyalty points from a member (FIFO consumption).

Parameters: member_id, amount, reason
get_points_balance

Get member's current points balance and recent transaction history.

Parameters: member_id, limit?
get_member_coupons

Get a member's available (unredeemed, unexpired) coupons.

Parameters: member_id
get_member_tier

Get member's current tier, next tier upgrade requirements, and all tiers.

Parameters: member_id
get_member_receipts

Get member's receipt submission history with OCR status and points awarded.

Parameters: member_id, limit?
redeem_points_for_coupon

Redeem loyalty points for a coupon from a specified pool.

Parameters: member_id, pool_id, points_cost

Example Conversation

You: "List all active stores"
Claude: Calls list_stores with status="active"
Claude: "You have 3 active stores: Downtown Flagship, Mall Kiosk, and Airport Pop-up."