# Snipcart MCP

> Snipcart MCP Server connects your headless e-commerce backend directly to your AI agent. It lets you list orders, check inventory, track customer history, and update fulfillment statuses—all without leaving your code editor or dashboard. Manage the entire back office using natural language prompts.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** headless-commerce, shopping-cart, order-fulfillment, inventory-tracking, rest-api, webhooks

## Description

You're gonna connect your whole Snipcart back end straight into your agent via MCP. This means you can manage everything that happens on your storefront—from checking stock levels to changing an order status—without ever leaving your code editor or dashboard. You handle the entire back office using natural language prompts, period.

**Customer History and Details**

Need to know who bought what? First off, you can run `list_customers` to pull a full list of every single buyer in the store. If you zero in on one account, `get_customer_details` grabs all their stored info. This lets your agent verify purchase history or check contact data for any specific user.

**Order and Fulfillment Management**

When an order comes through, you don't wanna wait for a dashboard update. You can use `list_orders` to get a list of every e-commerce order Snipcart processed. If you need the deep dive on one purchase—the item breakdown, the total cost, everything—you run `get_order_details`. Once that order is ready to ship, you don't have to manually click anything; you use `update_order_status` to change its status instantly, like moving it from 'Processed' straight to 'Shipped'.

**Catalog and Recurring Billing**

For inventory, you can get a full list of every product configured for sale using `list_products`. This gives your agent the current catalog view. For recurring revenue, things are just as clean. You run `list_subscriptions` to see all active and inactive billing cycles. If you need specific details on one subscription—like when it renews or what plan they're on—you call `get_subscription_details`. This keeps your billing visible right where your code runs.

**Promotions, Discounts, and Inventory Checks**

Want to check if a coupon is legit? You use `list_discounts` to see every active discount code or marketing promotion available. It spits out a record of what's running in the store. Combining these tools lets you validate product availability while simultaneously checking promotions. For example, you can ask your agent to list all products and verify if 'FALLSALE20' is an approved coupon.

This setup eliminates context switching. You don't jump from your code editor over to a separate admin dashboard just to check if a discount script worked or confirm a customer address. Everything happens in place. Your AI client uses these tools to read data, create records, and make changes across the entire Snipcart ecosystem based on what you prompt it with.

## Tools

### get_customer_details
Pulls all stored details for a single customer account.

### get_order_details
Retrieves the complete breakdown and data for one specific order token.

### get_subscription_details
Gets detailed information about a single recurring subscription.

### list_customers
Provides an exhaustive list of all customers who have purchased from the store.

### list_discounts
Shows a record of every active discount code and marketing promotion.

### list_orders
Generates a list containing all e-commerce orders placed in Snipcart.

### list_products
Lists every product configured and available for sale in the catalog.

### list_subscriptions
Outputs a list of all active and inactive recurring subscriptions.

### update_order_status
Changes the status (e.g., 'Shipped') for an existing order token.

## Prompt Examples

**Prompt:** 
```
Find out what product was sold in our most recent completed order.
```

**Response:** 
```
Scanning your orders using `list_orders`... 🔍

The last order (Token: `SNIP-9923`) belongs to Alice Smith.
**Items Bought**:
- 1x 'Stark Industries T-Shirt' (Price: $29.99)
- 2x 'Enamel Logo Pin' (Price: $10.00 each)

**Total Transaction**: $49.99 (Paid & Processed).
```

**Prompt:** 
```
I need to mark invoice SNIP-8910 as Shipped, please update the order status.
```

**Response:** 
```
Status change request triggered via the `update_order_status` action hook. 

✅ Invoice **SNIP-8910** has been successfully transitioned to the **Shipped** state. E-mail triggers from your backend should process automatically to the buyer.
```

**Prompt:** 
```
Output a markdown list of all active products and their prices we are offering on Snipcart.
```

**Response:** 
```
Based on my scan of `list_products`, here is your current live inventory:

- **Space Rocket Figurine** - $45.00 (`id: spc-rckt`)
- **Moon Boots Replika** - $115.00 (`id: mn-bts-rep`)
- **Galactic Coffee Mug** - $22.50 (`id: glc-co-mug`) 

Inventory checks indicate no products are currently marked as out of stock.
```

## Capabilities

### Retrieve Customer Details
Fetch all available data points for one specific customer using `get_customer_details`.

### List All Customers
Pull a full list of every registered buyer in the store via `list_customers`.

### Check Order History
Retrieve detailed information for one or multiple orders using `get_order_details` and `list_orders`.

### Update Fulfillment Status
Change the status of an existing order (e.g., from 'Processed' to 'Shipped') using `update_order_status`.

### Manage Inventory and Products
Get a full list of products available for sale or check recurring billing cycles with `list_products` and `list_subscriptions`.

### Review Discounts & Promotions
See all active discount codes, promotions, and their status using `list_discounts`.

## Use Cases

### Validating a New Headless Checkout
A developer needs to test the full checkout flow. They use `list_products` to confirm pricing, then simulate an order using the 'Test' key, and finally call `get_order_details` to ensure all line items show up correctly before committing code.

### Handling a High-Priority Customer Inquiry
A support agent receives an email from a user. They use the agent to run `list_customers` to verify the account exists, then call `get_customer_details` and `list_orders` simultaneously to compile a full purchase history for the client.

### Processing Outbound Shipments
A fulfillment worker receives a batch of items ready to ship. Instead of manually updating statuses, they prompt the agent to find the relevant order token via `list_orders`, then execute `update_order_status` to mark it as 'Shipped'.

### Auditing Marketing Campaigns
A founder needs to know if a new coupon code is working. They call `list_discounts` to check the status of all promotions, and then use `get_subscription_details` to see how many customers are currently using that specific discount.

## Benefits

- Automate fulfillment tracking. You can call `list_orders` to pull a list of recent purchases, then use `get_order_details` to find the specific items bought for a single client.
- Handle complex inventory checks. Running `list_products` gives you immediate visibility into all SKUs and their current prices without visiting the admin panel.
- Manage customer data fast. Instead of navigating forms, simply run `get_customer_details` with an email to pull entire account histories.
- Control order flow directly. Use `update_order_status` when an item ships or is processed; this action triggers backend updates automatically.
- Track revenue streams. Run `list_discounts` and `list_subscriptions` together to audit how many promotions are active and what recurring billing cycles are running.

## How It Works

The bottom line is you get access to your e-commerce back office from anywhere, without needing to log into a separate dashboard.

1. Supply your Snipcart Secret API Key (use a Test key first).
2. Prompt your AI client to execute a task, like 'Show the details for order SNIP-123' using the appropriate tool.
3. The agent runs the query and returns structured data directly into your code editor or chat window.

## Frequently Asked Questions

**How does list_orders work with Snipcart?**
It pulls a comprehensive list of all e-commerce orders placed through your store. This is useful for getting an overview or finding the token ID needed to run `get_order_details` on a specific transaction.

**Can I use get_customer_details for more than just name and email?**
Yes, it pulls all stored customer data. You can retrieve total order history alongside basic profile info, making it useful for support agents needing a full client view.

**What is the difference between list_products and get_product_details?**
`list_products` gives you an index of all available items in your catalog. You use `get_product_details` only if you already know a specific product ID and need its full data record.

**How do I change an order status using update_order_status?**
You must first identify the order token via `list_orders`, then provide that token, along with the desired new status (like 'Shipped'), to the agent.

**When using `list_orders`, how do I ensure my API calls are running in a test environment?**
You must specify the 'Test' mode when supplying your Snipcart Secret API Key. The tool will then pull dummy data, allowing you to practice order workflows without touching live transactions.

**What information does `get_subscription_details` provide about billing cycles?**
It gives the full breakdown of recurring payments for a user's subscription. You get details like the current plan ID, the next renewal date, and the total cost associated with the cycle.

**If I run `list_customers` and no users match my criteria, what response should I expect?**
The tool returns an empty array or a standardized 'no results' message. This means there are no customers matching your search parameters; it doesn't indicate an error.

**How can I use `list_discounts` to validate if a coupon code is still active?**
Run the `list_discounts` tool first. The output gives you all currently live codes and their expiration dates, confirming which promotions are available for checkout.

**Can I progress an order to 'Shipped' natively inside Cursor?**
Yes! Provide the order token context to the AI (or ask it to fetch recent orders) and instruct: 'Mark order SNIP-1234 as Shipped'. The agent will call the `update_order_status` endpoint, and your Snipcart dashboard will instantly sync up the new status.

**Can the AI distinguish my test vs live orders?**
The distinction entirely relies on which Secret API Key you supply. Snipcart has dedicated keys for 'Live' mode and 'Test' mode. Whichever key is saved in your credential injection config governs the space the AI operates within.

**How do I check a customer's total spending history using LLMs?**
Tell your AI to 'Look up the customer John Doe in Snipcart and fetch their details'. The agent first polls `list_customers` for the user directory ID, and then passes the match to `get_customer_details` to return their detailed transaction history completely synthesized for you.