# Commerce.js MCP

> Commerce.js MCP gives your AI agent full control over your online store's backend. You can list products, check inventory levels, manage customer carts, generate checkout tokens, and retrieve detailed order history—all through natural conversation.

## Overview
- **Category:** ecommerce
- **Price:** Free
- **Tags:** storefront, shopping-cart, product-catalog, checkout, chec-api

## Description

This connector lets you run your entire e-commerce operation directly from your favorite chat client. Instead of logging into a dashboard and clicking through multiple tabs to find an answer or perform an action, you just ask your agent. Need to check if 'Organic Coffee Beans' are in stock? Just ask. Want to see the details for order ord_987 placed by John Doe? Done. You can list all products, filter them by category, and even walk through a full transaction cycle—creating a cart, adding items with specific quantities, generating a secure token for payment, and finally capturing the completed order. If your current system makes you manually switch between tools or copy-paste IDs, this MCP changes that. It brings those operational functions into one single conversation thread, accessible via Vinkius's catalog of connected services.

## Tools

### add_to_cart
Adds a specified item to an existing customer cart.

### capture_order
Finalizes and processes payment for a completed order.

### create_cart
Creates a new shopping cart or retrieves the ID of an existing one.

### generate_checkout_token
Creates a temporary token needed to process payments for a specific cart.

### get_order
Retrieves the complete details of a single, specified order number.

### get_product
Fetches all metadata and pricing information for one specific product ID.

### list_categories
Provides a list of the top-level categories used to organize products on the site.

### list_orders
Generates a summary list of recent orders placed through the store.

### list_products
Retrieves a paginated list of all products, optionally filtered by category name.

### update_cart_item
Changes the quantity or specific product within an existing cart item.

## Prompt Examples

**Prompt:** 
```
List the first 5 products in my store.
```

**Response:** 
```
I've retrieved your products. Your top items include 'Wireless Headphones' (prod_123) and 'Smart Watch' (prod_456). Would you like more details on any of these?
```

**Prompt:** 
```
Create a cart and add 2 units of product prod_Q123.
```

**Response:** 
```
Cart created successfully (ID: cart_abc123). I have added 2 units of 'Organic Coffee Beans' to it. The current subtotal is $30.00.
```

**Prompt:** 
```
Show me the details for order ord_987.
```

**Response:** 
```
Order ord_987 was placed by John Doe. It contains 1x 'Gaming Mouse' and is currently marked as 'Fulfilled'. Shipping was handled via Standard Delivery.
```

## Capabilities

### View and search product details
List all available products in the store or retrieve detailed metadata for a specific item using its ID.

### Manage shopping carts
Create new customer carts, add specified items, and update quantities within an existing cart.

### Process checkout transactions
Generate the necessary tokens from a finalized cart to prepare for secure payment processing and capture the order details.

### Retrieve order status and history
List recent orders or pull full, specific details on an existing order using customer information.

### Navigate product structure
Browse the store's entire category hierarchy to understand how products are organized.

## Use Cases

### A customer needs quick stock verification.
The support agent doesn't want to transfer the call. They ask their agent: 'Are there more than 50 units of prod_XYZ available?' The agent runs a product lookup and replies instantly with the current inventory count, allowing the conversation to continue without dashboard navigation.

### A developer is testing cart edge cases.
Instead of manually adding items via the UI, the dev uses their terminal: 'Create a cart for test user and add 2 units of prod_Q123.' The agent confirms the creation ID and subtotal immediately.

### An e-commerce manager needs an order history overview.
The manager asks, 'List all orders from last Tuesday.' The agent runs a list function and provides a summary table of recent orders, allowing them to spot trends or missing shipments quickly.

### A sales representative is preparing a bulk quote.
They ask the agent to 'List all products in the Smart Home category,' which returns a filtered list. They then select specific items and use the cart tools, simulating a large order without needing manual data entry.

## Benefits

- Instantly check inventory levels or order statuses without logging into the main dashboard. Just ask, and get real-time data regarding product availability or fulfillment details.
- Manage complex transactions in multiple steps: Use 'create_cart' to start, then use 'add_to_cart' and 'update_cart_item' to build the basket before finalizing anything.
- Streamline customer support. Instead of asking a user for an order number and manually looking it up, your agent can run 'get_order' immediately after they provide the details.
- Develop faster checkout logic. You can test payment flows by calling 'generate_checkout_token' and then confirming the sale with 'capture_order', all in one conversation thread.
- Understand product structure easily. Use 'list_categories' to map out your whole store hierarchy, which is perfect for writing better internal documentation or training new team members.

## How It Works

The bottom line is you get real-time operational data and actions handled through simple chat commands, without opening the main e-commerce dashboard.

1. Subscribe to this MCP and enter your Chec Public Key and Secret Key.
2. Connect it to any compatible client like Claude, Cursor, or Windsurf.
3. Start by asking your agent a question about inventory, orders, or cart contents.

## Frequently Asked Questions

**How does Commerce.js MCP help me list products?**
You can use the 'list_products' tool to get a paginated view of all your items, and you can also run 'get_product' if you already know the specific product ID you need details on.

**Can I use Commerce.js MCP to process an order?**
Yes. You first have the agent create a cart using 'create_cart', then add items, and finally run 'generate_checkout_token' before calling 'capture_order'. It handles the whole sequence.

**What is the difference between listing orders and getting an order?**
The 'list_orders' tool provides a summary view of multiple recent orders. The 'get_order' tool requires a specific ID and gives you every detail for just that one transaction.

**Does Commerce.js MCP handle inventory checks?**
Yes, the listing tools allow you to check product availability in real-time, which is crucial before building a cart or confirming an order.

**Is Commerce.js MCP only for new sales?**
Not at all. It also lets you manage existing transactions by retrieving specific order details using 'get_order' to help support teams quickly assist customers.

**Can I filter products by a specific category?**
Yes! You can use the `list_products` tool and provide a `category_id` to retrieve only the products belonging to that specific group.

**How do I view the details of a customer's order?**
Use the `get_order` tool with the specific Order ID. Note that viewing orders requires your Secret Key to be configured in the server settings.

**Can the AI help me manage shopping carts for customers?**
Absolutely. The agent can use `create_cart`, `add_to_cart`, and `update_cart_item` to build and modify shopping sessions dynamically.