- Explore MCP Servers
- mcp-sap-commerce
Mcp Sap Commerce
What is Mcp Sap Commerce
mcp-sap-commerce is a Model Context Protocol (MCP) server that integrates with SAP Commerce Cloud’s OCC APIs, enabling natural language interactions with product data through Claude.
Use cases
Use cases include enabling customers to search for products using natural language, retrieving detailed product information, checking stock levels, managing shopping carts, and providing personalized shopping experiences.
How to use
To use mcp-sap-commerce, you can interact with its APIs to perform product searches, retrieve product details, check stock availability, and manage shopping cart operations using natural language queries.
Key features
Key features include product search, advanced search with filters, detailed product information, stock availability checks, category browsing, promotion information, product reviews, personalized product suggestions, cart management, health monitoring, and performance analytics.
Where to use
mcp-sap-commerce can be used in e-commerce platforms, retail websites, and applications that require natural language processing for product data interactions.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Sap Commerce
mcp-sap-commerce is a Model Context Protocol (MCP) server that integrates with SAP Commerce Cloud’s OCC APIs, enabling natural language interactions with product data through Claude.
Use cases
Use cases include enabling customers to search for products using natural language, retrieving detailed product information, checking stock levels, managing shopping carts, and providing personalized shopping experiences.
How to use
To use mcp-sap-commerce, you can interact with its APIs to perform product searches, retrieve product details, check stock availability, and manage shopping cart operations using natural language queries.
Key features
Key features include product search, advanced search with filters, detailed product information, stock availability checks, category browsing, promotion information, product reviews, personalized product suggestions, cart management, health monitoring, and performance analytics.
Where to use
mcp-sap-commerce can be used in e-commerce platforms, retail websites, and applications that require natural language processing for product data interactions.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
SAP Commerce MCP Server
This Model Context Protocol (MCP) server integrates with SAP Commerce Cloud’s OCC APIs to enable natural language interactions with product data through Claude.
Features
- Product Search: Search through products using natural language queries
- Advanced Search: Filter products by category, price range, and more
- Product Details: Get detailed information about specific products
- Stock Availability: Check product stock levels and availability
- Categories: Browse and search products by categories
- Promotions: Get information about active promotions
- Reviews: Access product reviews and ratings
- Product Suggestions: Get personalized product recommendations
- Cart Management: Full shopping cart operations support
- Health Monitoring: Real-time service health tracking
- Performance Analytics: Historical performance analysis and insights
Tools Available
-
search-products: Basic product search with pagination support- Parameters:
query: Search query stringcurrentPage: (Optional) Page numberpageSize: (Optional) Results per page
- Parameters:
-
search-products-advanced: Advanced product search with filters- Parameters:
query: (Optional) Search query stringcategoryCode: (Optional) Category code filterminPrice: (Optional) Minimum price filtermaxPrice: (Optional) Maximum price filtersort: (Optional) Sort ordercurrentPage: (Optional) Page numberpageSize: (Optional) Results per page
- Parameters:
-
get-product-details: Get detailed product information- Parameters:
productCode: Product code/SKU
- Parameters:
-
check-product-availability: Check product stock levels- Parameters:
productCode: Product code/SKUlocation: (Optional) Warehouse/store location code
- Parameters:
-
get-categories: Browse product categories- Parameters:
categoryId: (Optional) Specific category ID
- Parameters:
-
get-products-by-category: Get products in a category- Parameters:
categoryId: Category IDcurrentPage: (Optional) Page numberpageSize: (Optional) Results per pagesort: (Optional) Sort order
- Parameters:
-
get-promotions: Get promotion information- Parameters:
promotionId: (Optional) Specific promotion ID
- Parameters:
-
get-product-reviews: Get product reviews- Parameters:
productCode: Product code/SKU
- Parameters:
-
get-product-suggestions: Get product recommendations- Parameters:
productCode: Reference product code/SKUmaxResults: (Optional) Maximum number of suggestions
- Parameters:
-
create-cart: Create a new shopping cart- Parameters: None
-
get-cart: Get cart details- Parameters:
cartId: Cart ID to retrieve
- Parameters:
-
add-to-cart: Add a product to cart- Parameters:
cartId: Cart IDproductCode: Product code/SKUquantity: (Optional) Quantity to add (default: 1)
- Parameters:
-
update-cart-entry: Update product quantity in cart- Parameters:
cartId: Cart IDentryNumber: Entry number in cartquantity: New quantity
- Parameters:
-
remove-from-cart: Remove a product from cart- Parameters:
cartId: Cart IDentryNumber: Entry number to remove
- Parameters:
-
get-order-status: Check order status- Parameters:
orderId: Order ID
- Parameters:
-
get-order-history: View order history- Parameters:
userId: User ID
- Parameters:
-
check-service-health: Get current service health status- Parameters: None
-
analyze-performance: Get historical performance insights- Parameters: None
Configuration
The server can be configured using environment variables:
# SAP Commerce Cloud Configuration SAP_COMMERCE_URL=https://your-commerce-url/occ/v2 SAP_COMMERCE_SITE=your-site-name SAP_COMMERCE_TIMEOUT=10000 SAP_COMMERCE_VALIDATE_SSL=false # OAuth2 Authentication (optional) SAP_COMMERCE_CLIENT_ID=your-client-id SAP_COMMERCE_CLIENT_SECRET=your-client-secret # Logging Configuration LOG_LEVEL=info # debug, info, warn, or error
Setup
-
Install dependencies:
npm install -
Build the project:
npm run build -
Start the server:
npm start
Claude Integration Example Queries
- “Search for all products related to ‘hacendado’”
- “Find electronics products under $500”
- “Get details for product with code ‘ABC123’”
- “Check stock availability for product ‘XYZ789’”
- “Show me all products in the ‘electronics’ category”
- “What promotions are currently active?”
- “Show me reviews for product ‘ABC123’”
- “Suggest products similar to ‘ABC123’”
- “Create a new shopping cart”
- “Add 2 units of product ‘ABC123’ to my cart”
- “Update the quantity of item 1 in my cart to 3”
- “Remove item 2 from my cart”
- “Show me my cart details”
- “What’s the status of order ‘ORD123456’?”
- “Show me my order history”
- “Check the current health status of the service”
- “Analyze performance for the last 12 hours”
- “Show me performance insights”
- “Get cache hit rates for today”
Development
The project includes VS Code integration through .vscode/mcp.json for easy debugging and development. Make sure to update the configuration with your SAP Commerce instance details.
Running in Development Mode
For development, you can use:
npm run dev
This will start TypeScript in watch mode, recompiling on changes.
Performance Monitoring
Real-time Health Checks
The server includes real-time health monitoring with metrics for:
- API latency
- Error rates
- Cache hit rates
- Service status (healthy/degraded/unhealthy)
Historical Analysis
Performance data is stored and analyzed with:
- 24-hour historical trends
- P95 latency tracking
- Error rate patterns
- Cache efficiency metrics
- Automated performance insights
Logging
Logs are stored in the logs directory with automatic rotation:
- Error logs:
logs/error-YYYY-MM-DD.log - Combined logs:
logs/combined-YYYY-MM-DD.log - Health metrics:
logs/health-YYYY-MM-DD.log
Logs are automatically rotated daily and kept for 30 days.
Error Handling
The server includes comprehensive error handling for common SAP Commerce API issues:
- Invalid product codes
- Network connectivity problems
- Authentication errors
- API rate limiting
- Invalid category or promotion IDs
- Price range validation
- Sorting parameter validation
- Cart operation failures
Authentication
The server supports OAuth2 client credentials flow for authenticated requests to SAP Commerce. Configure the client ID and secret in the environment variables to enable authenticated requests.
Token Management
- Automatic token refresh handling
- Buffer time for token expiration (5 minutes)
- Graceful fallback for authentication failures
Caching
The server implements intelligent caching with:
- 5-minute TTL for product data
- Automatic cache invalidation
- Cache hit rate monitoring
- Eviction policies for memory management
Cart Session Management
The server maintains cart sessions for anonymous users with the following features:
- Automatic cart creation
- Persistent cart ID tracking
- Cart entry management
- Cart totals calculation
- Product availability validation
Security Notes
- SSL certificate validation can be disabled for development using
SAP_COMMERCE_VALIDATE_SSL=false - For production, ensure proper SSL certification and authentication are configured
- Store sensitive credentials (client ID/secret) in environment variables, never in code
- Regular security audits recommended for production deployments
- Cart IDs should be treated as sensitive information
Performance Optimization
The server includes several performance optimization features:
- Automatic request retries with exponential backoff
- Response caching for frequently accessed data
- Request batching and throttling
- Performance monitoring and alerting
- Historical performance analysis
- Automated performance insights and recommendations
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










