Skip to main content
Snappy’s MCP (Model Context Protocol) Server allows AI systems - such as Microsoft Copilot, custom AI agents, or any MCP-compatible client - to send gifts through natural language interactions. Instead of building API integrations manually, your AI agent can call Snappy’s MCP tools directly to manage campaigns and send gifts on behalf of users.
This integration path is designed for AI-driven environments. If you’re building a standard programmatic integration, use the Snappy REST API instead.

Prerequisites

Before connecting an AI system to the MCP server, make sure the following are configured in your Snappy Dashboard:
  • A valid Snappy user account (username, password, and optional TOTP)
  • At least one Company and Account
  • At least one Collection configured for your Account
  • Recipients set up, or ready to be managed via API
The MCP server endpoint is provisioned by Snappy. Contact your account manager to get the URL for your environment.

How It Works

Your AI system connects to the Snappy MCP server and authenticates using user credentials. Once authenticated, it can call a set of structured tools to retrieve collections, generate personalized content, create campaigns, and send gifts - all through a standardized protocol.

Authentication

The MCP server uses session-based authentication. Call the sign-in tool with your Snappy credentials to establish a session:
Successful response:
For HTTP transport, each request must include authentication. For SSE transport, the session is maintained automatically after sign-in.
Never hardcode usernames, passwords, or TOTP codes. Use environment variables or a secrets manager. See Best Practices below.

Available Tools

Tool examples

get-account-collections

Response:

create-campaign


The Gift Sending Flow

Regardless of which AI system you’re connecting, the gifting flow follows the same sequence:
  1. sign-in - authenticate and establish a session
  2. get-account-collections - retrieve available collections
  3. create-email + create-greeting + choose-reveal - generate personalized content (these three can run in parallel)
  4. create-campaign - set up the campaign with recipients and content
  5. send-gifts - trigger the gift send

Quick Start: Adding to Your AI Agent (MCP Config)

To add Snappy to any MCP-compatible AI environment, point your MCP configuration to the Snappy server URL provided by your account manager:

Worked Example: Node.js Bot

A complete Node.js example that handles a /sendgift chat command, authenticates, generates personalized content in parallel, and creates and sends a campaign.

Error Handling

Common error scenarios

Authentication failed
TOTP required
When you see this response, prompt the user (or your secret store) for the current TOTP and re-call sign-in with the totp argument populated. Resource not found
No products available for criteria

Retry strategy

Use exponential backoff for transient failures (network errors, timeouts, 5xx). Do not retry AUTH_FAILED or NOT_FOUND.

Best Practices

Secure credentials. Never hardcode username, password, or TOTP. Pull them from environment variables or a secrets manager. When logging tool calls for observability, redact password and totp before writing. Reuse sessions. Don’t call sign-in on every request. Cache the session and refresh only when expired:
Run content generation in parallel. create-email, create-greeting, and choose-reveal are independent - call them concurrently to cut latency. Cache collections. Collection data changes infrequently. A 5-minute in-memory cache keyed by accountId is usually sufficient.

Troubleshooting

Check authentication status before debugging tool calls:
Confirm account setup if collections come back empty:
Test individual tools in isolation when narrowing down a failing flow - call get-account-collections and get-collection-products directly to verify the data exists before calling create-campaign. For additional support, contact your Snappy account manager.
Last modified on June 18, 2026