shopware-store-api-mcp

babenkocommerce/shopware-store-api-mcp

3.1

If you are the rightful owner of shopware-store-api-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

A Model Context Protocol (MCP) server that provides AI agents with access to Shopware Store API functionality for complete e-commerce operations.

Tools
18
Resources
0
Prompts
0

Shopware Store API MCP Server

A Model Context Protocol (MCP) server that provides AI agents with access to Shopware Store API functionality for complete e-commerce operations.

Features

  • Customer Management: Login, logout, profile management, default payment methods
  • Product Discovery: Search products, get detailed product information
  • Shopping Cart: Add/remove items, view cart contents
  • Checkout Process: Payment methods, shipping methods, addresses, order creation
  • Complete Workflow: Full e-commerce flow from product search to order completion

Quick Start

1. Installation

npm install
npm run prepare

2. Environment Configuration

Create a .env file or set environment variables:

SHOPWARE_STORE_API_URL=https://your-shopware-store.com/store-api
SHOPWARE_SALES_CHANNEL_ACCESS_KEY=your-sales-channel-access-key

3. Run the MCP Server

node dist/index.js

4. Test with MCP Client

node test_updated_checkout.mjs

Usage Examples

Basic E-commerce Workflow

  1. Search Products

    // Search for products
    await client.callTool({
      name: 'store_api_search_products',
      arguments: { search: 'laptop', limit: 10 }
    });
    
  2. Customer Login

    // Authenticate customer
    await client.callTool({
      name: 'store_api_customer_login',
      arguments: {
        email: 'customer@example.com',
        password: 'password123'
      }
    });
    
  3. Add to Cart

    // Add product to cart
    await client.callTool({
      name: 'store_api_add_to_cart',
      arguments: {
        productId: 'product-uuid',
        quantity: 2
      }
    });
    
  4. Configure Checkout

    // Set payment method for cart
    await client.callTool({
      name: 'store_api_set_cart_payment_method',
      arguments: { paymentMethodId: 'payment-method-uuid' }
    });
    
    // Set shipping method
    await client.callTool({
      name: 'store_api_set_cart_shipping_method',
      arguments: { shippingMethodId: 'shipping-method-uuid' }
    });
    
    // Set addresses
    await client.callTool({
      name: 'store_api_set_cart_addresses',
      arguments: {
        billingAddressId: 'address-uuid',
        shippingAddressId: 'address-uuid'
      }
    });
    
  5. Create Order

    // Complete the purchase
    await client.callTool({
      name: 'store_api_create_order',
      arguments: { customerComment: 'Express delivery please' }
    });
    

Available Tools

Customer Tools (4)

  • store_api_customer_login - Authenticate customer
  • store_api_customer_logout - Log out customer
  • store_api_get_customer_profile - Get customer profile
  • store_api_set_customer_default_payment_method - Set account default payment

Product Tools (2)

  • store_api_search_products - Search with filters (name, category, price, etc.)
  • store_api_get_product_details - Get detailed product information

Cart Tools (3)

  • store_api_add_to_cart - Add products to cart
  • store_api_get_cart - View cart contents and totals
  • store_api_remove_from_cart - Remove items from cart

Checkout Tools (9)

  • store_api_get_payment_methods - List available payment methods
  • store_api_set_cart_payment_method - Set payment for current cart
  • store_api_set_cart_shipping_method - Set shipping for current cart
  • store_api_set_cart_addresses - Set billing/shipping addresses
  • store_api_get_shipping_methods - List available shipping methods
  • store_api_get_customer_addresses - Get customer's saved addresses
  • store_api_create_customer_address - Create new customer address
  • store_api_create_order - Complete purchase and create order
  • store_api_get_order_details - Get order information by ID

Architecture

Customer vs Cart Context

  • Customer Tools: Manage account-level defaults (default payment method)
  • Cart Context Tools: Set temporary cart settings (current order payment/shipping)

Authentication Flow

  1. Most operations require customer authentication via store_api_customer_login
  2. Cart operations maintain session state automatically
  3. Checkout requires authenticated customer + valid cart + payment method + addresses

Integration with AI Agents

This MCP server enables AI agents to:

  • Help customers find and purchase products
  • Manage shopping carts and checkout processes
  • Handle customer account operations
  • Provide complete e-commerce assistance

All tools expose proper parameter schemas for seamless AI agent integration.