Spryker MCP Server
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Spryker MCP Server
A Model Context Protocol (MCP) server that provides seamless integration with Spryker e-commerce platform APIs. This server enables AI assistants to interact with Spryker's e-commerce functionality through standardized MCP tools.
⚠️ DEMO PREVIEW DISCLAIMER
This is a demo preview repository showcasing the capabilities of Spryker with Model Context Protocol (MCP).
This repository is intended for:
Demonstration purposes only
Showcasing Spryker-MCP integration capabilities
Development and testing environments
Educational and evaluation purposes
Do not use this in production environments. This demo version may contain:
Simplified security implementations
Incomplete error handling for production scenarios
Development-focused configurations
Limited scalability optimizations
For production implementations, please consult with Spryker's professional services team for proper enterprise-grade solutions.
Related MCP server: E-Commerce MCP Server
🚀 Features
Core Capabilities
Product Discovery & Search
Natural language product search ("Find me wireless headphones under $200")
Intelligent filtering, sorting, comparison and recommendations
Real-time inventory and pricing information
Shopping Cart Management
Add/remove items with conversational commands
Cart optimization suggestions
Support for both guest and authenticated customers
Checkout & Orders
AI-guided checkout assistance
Payment and shipping option recommendations
Order tracking and history access for authenticated customers
Support for both guest and authenticated customers
Customer Experience
Customer authentication
Guest customers supported
Technical Excellence
Multiple Transport Support: stdio, HTTP, and SSE transports for flexible integration
TypeScript: Full type safety with strict compilation settings
Modern Architecture: Clean separation of concerns with dependency injection
Robust Error Handling: Error tracking and recovery
Structured Logging: JSON-based logging with multiple levels and metadata
Configuration Management: Environment-based configuration with validation
API Resilience: Retry logic, timeouts, and graceful degradation
Testing: Unit and integration test coverage
📋 Prerequisites
Node.js: Version 18.0.0 or higher
npm: Version 8.0.0 or higher
Spryker API: Access to a Spryker Commerce OS API endpoint
🛠️ Installation & Usage
Option 1: NPX (Recommended)
Run directly without installation:
npx @spryker-sdk/spryker-mcp-serverOption 2: Global Installation
Install globally and run:
npm install -g @spryker-sdk/spryker-mcp-server
spryker-mcp-serverOption 3: Local Installation
Install in your project:
npm install @spryker-sdk/spryker-mcp-server
npx spryker-mcp-serverOption 4: Development Setup
Clone and build from source:
git clone https://github.com/spryker-sdk/spryker-mcp-server.git
cd spryker-mcp-server
npm install
npm run build
npm start⚙️ Configuration
The server uses environment variables for configuration. Create a .env file or set these variables:
Required Variables
# Spryker API Configuration
SPRYKER_API_BASE_URL=https://your-spryker-api.com
SPRYKER_API_TIMEOUT=30000
SPRYKER_API_RETRY_ATTEMPTS=3
SPRYKER_API_RETRY_DELAY=1000
# Server Configuration
MCP_SERVER_NAME=spryker-mcp-server
MCP_SERVER_VERSION=1.0.0
# Logging Configuration (optional)
LOG_LEVEL=info
LOG_FORMAT=json
# MCP Transport Configuration (optional)
MCP_TRANSPORT=stdio # Transport type: stdio, http, or sse
MCP_HTTP_PORT=3000 # HTTP port for http/sse transport
MCP_HTTP_HOST=localhost # HTTP host for http/sse transport
MCP_HTTP_ENDPOINT=/mcp # HTTP endpoint pathConfiguration Schema
All configuration is validated using Zod schemas:
SPRYKER_API_BASE_URL: Valid HTTPS URL to Spryker Glue APISPRYKER_API_TIMEOUT: Request timeout in milliseconds (default: 30000)SPRYKER_API_RETRY_ATTEMPTS: Number of retry attempts (default: 3)SPRYKER_API_RETRY_DELAY: Delay between retries in milliseconds (default: 1000)
🚀 Usage
Transport Options
The server supports three transport modes:
1. stdio Transport (Default)
Traditional standard input/output communication for MCP clients:
# Using npm scripts
npm run start:stdio
# Using the binary directly
npx spryker-mcp-server --transport stdio2. HTTP Transport
HTTP-based communication with SSE for real-time updates:
# Using npm scripts
npm run start:http
# Using the binary directly
npx spryker-mcp-server --transport http --port 3000 --host localhost
# Access endpoints:
# Health check: http://localhost:3000/health
# MCP endpoint: http://localhost:3000/mcp3. SSE Transport
Server-Sent Events for real-time web applications:
# Using npm scripts
npm run start:sse
# Using the binary directly
npx spryker-mcp-server --transport sse --port 3000 --host localhost --endpoint /mcpDevelopment Mode
npm run devProduction Mode
npm run build
npm start🛡️ MCP Integration
Claude Desktop Configuration (stdio transport)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"spryker": {
"command": "npx",
"args": ["spryker-mcp-server"],
"env": {
"SPRYKER_API_BASE_URL": "https://your-spryker-api.com"
}
}
}
}See Claude Desktop MCP Integration for more details on MCP integration with Claude Desktop.
HTTP/SSE Transport Integration
For web applications using HTTP or SSE transport:
// HTTP client example
const response = await fetch('http://localhost:3000/mcp', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'tools/list',
params: {}
})
});
// SSE client example
const eventSource = new EventSource('http://localhost:3000/mcp');
eventSource.onmessage = function(event) {
const message = JSON.parse(event.data);
console.log('Received:', message);
};VS Code MCP Extension
Add to .vscode/mcp.json:
{
"servers": {
"spryker": {
"command": "npx",
"args": ["spryker-mcp-server"]
}
}
}See VS Code MCP Extension for more details on MCP integration with VS Code.
🔧 Available Tools
The server provides 30 MCP tools for e-commerce operations:
Product Management
Product Search (
product-search) - Advanced product catalog search with filteringSearch Suggestions (
search-suggestions) - Autocomplete suggestions for a partial queryProduct Details (
get-product) - Detailed abstract product info, including its concrete variantsConcrete Product (
get-concrete-product) - Detailed concrete product (variant) info by SKUProduct Availability (
get-product-availability) - Stock for an abstract or concrete productProduct Prices (
get-product-prices) - Prices (incl. volume prices) for an abstract or concrete productProduct Reviews (
get-product-reviews) - Customer reviews and ratings
Catalog Navigation
Category Tree (
get-category-tree) - Full category tree for browsingCategory (
get-category) - Category node by ID
Authentication & User Management
Authentication (
authenticate) - Customer login and guest session creationRegister Customer (
register-customer) - Create a customer accountRefresh Token (
refresh-token) - Exchange a refresh token for a new access tokenGet Addresses (
get-addresses) - List a customer's saved addressesAdd Address (
add-address) - Add an address to the address bookUpdate Address (
update-address) - Update a saved addressDelete Address (
delete-address) - Delete a saved address
Shopping Cart Operations
Add to Cart (
add-to-cart) - Add products to authenticated customer cartsGuest Add to Cart (
guest-add-to-cart) - Add products to guest user cartsGet Cart (
get-cart) - Retrieve cart contents and totalsRemove from Cart (
remove-from-cart) - Remove items from cartsUpdate Cart Item (
update-cart-item) - Modify cart item quantitiesAdd Cart Voucher (
add-cart-voucher) - Apply a discount/voucher code (registered or guest cart)Remove Cart Voucher (
remove-cart-voucher) - Remove a discount/voucher code
Wishlists
Get Wishlists (
get-wishlists) - List wishlists, or one wishlist with its itemsCreate Wishlist (
create-wishlist) - Create a new wishlistAdd to Wishlist (
add-to-wishlist) - Add a concrete product to a wishlistWishlist to Cart (
wishlist-to-cart) - Move all wishlist items into a cart
Order Processing & Checkout
Get Checkout Data (
get-checkout-data) - Retrieve payment methods and shipping optionsCheckout (
checkout) - Process complete order checkout with payment and shippingGet Order (
get-order) - Retrieve order details and history
Product Search (product-search)
Search for products with advanced filtering capabilities.
Parameters:
q(string, optional): Search query textrangeFacets(array, optional): Range facet values for filtering (e.g., price ranges). Each object contains:name(string, required): Range facet namemin(number, optional): Minimum valuemax(number, optional): Maximum value
valueFacets(array, optional): Exact value facet filters (e.g., brands, labels). Each object contains:name(string, required): Facet namevalue(string, required): Facet value
sort(string, optional): Sort parameter name for ordering resultsipp(number, default: 20): Items per page (1-100)page(number, default: 0): Page offset for pagination (0-based)
Example:
{
"q": "laptop",
"rangeFacets": [
{
"name": "price",
"min": 500,
"max": 2000
}
],
"ipp": 10,
"page": 0
}Authentication (authenticate)
Authenticate customers and obtain access tokens, or create guest sessions.
Parameters:
username(string, optional): Customer username or emailpassword(string, optional): Customer password
Note: If username and password are not provided, a guest session token will be generated for anonymous shopping.
Product Details (get-product)
Retrieve detailed information about a specific product.
Parameters:
sku(string, required): Product SKU
Add to Cart (add-to-cart)
Add products to a customer's shopping cart.
Parameters:
customerToken(string, required): Customer access tokensku(string, required): Product SKUquantity(number, default: 1): Quantity to add
Guest Add to Cart (guest-add-to-cart)
Add products to cart for non-authenticated users.
Parameters:
token(string, required): Guest session tokensku(string, required): Product SKUquantity(number, default: 1): Quantity to add
Get Cart (get-cart)
Retrieve current cart contents and totals.
Parameters:
token(string, required): Customer access token or guest token
Remove from Cart (remove-from-cart)
Remove an item from the shopping cart.
Parameters:
token(string, required): Customer access token or guest tokencartId(string, required): ID of the cart containing the itemitemId(string, required): ID of the item to remove
Update Cart Item (update-cart-item)
Update the quantity of an item in the shopping cart.
Parameters:
token(string, required): Customer access token or guest tokencartId(string, required): ID of the cart containing the itemitemId(string, required): ID of the item to updatequantity(number, required): New quantity for the item
Get Checkout Data (get-checkout-data)
Get checkout data including payment methods, shipment methods, and customer addresses.
Parameters:
token(string, required): Customer access token or guest tokencartId(string, required): ID of the cart to get checkout data for
Checkout (checkout)
Process order checkout with payment and shipping.
Parameters:
token(string, required): Customer access token or guest tokencartId(string, required): Cart ID to checkoutcustomerData(object, required): Customer information:email(string, required): Customer email addressfirstName(string, required): Customer first namelastName(string, required): Customer last namesalutation(string, optional): Customer salutation (Mr, Mrs, Ms)
billingAddress(object, required): Billing address:firstName(string, required): First namelastName(string, required): Last nameaddress1(string, required): Primary address lineaddress2(string, required): Secondary address linezipCode(string, required): ZIP/Postal codecity(string, required): Citysalutation(string, optional): Salutationcountry(string, optional): Country ISO2 code (default: DE)company(string, optional): Company namephone(string, optional): Phone number
shippingAddress(object, required): Shipping address with same structure as billing addresspaymentMethod(object, required): Payment method information:provider(string, optional): Payment provider name (default: DummyPayment)method(string, optional): Payment method (default: invoice)
shipmentMethod(object, required): Shipment method:id(number, required): Shipment method ID
Get Order (get-order)
Retrieve order details and history.
Parameters:
token(string, required): Customer access tokenorderReference(string, optional): Specific order reference to retrieve. If not provided, returns all orders
🎯 Available Prompts
The server includes 5 prompts that provide context-aware guidance for different e-commerce scenarios. Each prompt is designed to help AI assistants understand how to effectively use the available tools.
Product Search (product-search)
Guides users through product discovery and search operations.
Parameters:
query(string, optional): Product search querycategory(string, optional): Specific product categoryprice_range(string, optional): Price range in format "min-max"brand(string, optional): Specific brand to filter by
Cart Management (cart-management)
Assists with shopping cart operations and checkout guidance.
Parameters:
action(string, required): Cart action - add, remove, view, update, or checkoutproduct_sku(string, optional): Product SKU for add/remove operationsquantity(number, optional): Quantity for add/update operationscustomer_type(string, optional): Customer type - authenticated or guest
Customer Service (customer-service)
Provides support for customer authentication and account issues.
Parameters:
support_type(string, required): Type of support needed - login, order_status, account_info, or generalusername(string, optional): Customer username or email for authenticationorder_reference(string, optional): Order reference number for order inquiries
Order Fulfillment (order-fulfillment)
Guides through the complete order process from cart to completion.
Parameters:
customer_token(string, optional): Customer authentication tokenbilling_address(object, optional): Billing address informationshipping_address(object, optional): Shipping address informationpayment_method(string, optional): Selected payment method
Product Recommendations (product-recommendations)
Generates personalized product recommendations based on preferences.
Parameters:
customer_token(string, optional): Customer authentication tokencategory_preference(string, optional): Preferred product categoriesprice_range(string, optional): Preferred price rangeoccasion(string, optional): Special occasion or contextrecently_viewed(string, optional): Recently viewed products
Using Prompts
Prompts are automatically available through the MCP protocol and provide context-aware guidance that helps AI assistants:
Understand context: Each prompt provides specific guidance for different e-commerce scenarios
Use tools effectively: Prompts explain which tools to use and how to combine them
Handle edge cases: Include guidance for error handling and alternative approaches
Provide better UX: Structured templates ensure consistent, helpful responses
🏗️ Architecture
Project Structure
src/
├── config/ # Configuration management
├── services/ # External service integrations
├── tools/ # MCP tool implementations
├── utils/ # Shared utilities
└── index.ts # Main server entry pointKey Components
Configuration (src/config/)
Environment variable validation with Zod
Type-safe configuration objects
Default value management
Services (src/services/)
SprykerApiService: HTTP client with retry logic and error handlingRequest/response transformation
Authentication management
Tools (src/tools/)
Individual tool implementations
Centralized tool registry
Input validation with Zod schemas
Utilities (src/utils/)
Structured logging with metadata support
Environment validation
Error handling utilities
🧪 Development
Code Quality
# Linting
npm run lint
npm run lint:fix
# Type checking
npm run type-check
# Testing
npm test
npm run test:watch
npm run test:coverageBuild Process
# Development build with watch
npm run dev
# Production build
npm run build
# Clean build artifacts
npm run clean🤝 Contributing
Development Setup
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureInstall dependencies:
npm installMake your changes following the coding standards
Add tests for new functionality
Run the test suite:
npm testCommit your changes:
git commit -m 'Add amazing feature'Push to the branch:
git push origin feature/amazing-featureOpen a Pull Request
Coding Standards
TypeScript with strict type checking
ESLint configuration with recommended rules
Conventional commit messages
JSDoc documentation
Good test coverage for core functionality (current: ~94%)
📚 API Reference
Spryker API Compatibility
This server is compatible with Spryker Commerce OS Glue API:
API Version: Latest stable version
Authentication: Bearer tokens
Response Format: JSON:API specification
Error Handling
All tools return standardized error responses:
{
"content": [{
"type": "text",
"text": "Error: Detailed error message with context"
}]
}📖 Changelog
Version 0.1.0 (Current)
✅ Dependency stack updated to latest majors (zod 4 with native JSON schema, TypeScript 6, ESLint 10 flat config, Jest 30); removed unused
axios; added the previously-undeclaredzod-to-json-schemausage by migrating to zod's nativez.toJSONSchema()✅ Expanded commerce coverage from 11 to 30 tools:
Richer products:
get-concrete-product,get-product-availability,get-product-prices,get-product-reviews, and concrete-variant resolution inget-productCatalog navigation:
get-category-tree,get-category,search-suggestionsCart & promotions:
add-cart-voucher,remove-cart-voucher,get-wishlists,create-wishlist,add-to-wishlist,wishlist-to-cartCustomer & orders:
register-customer,refresh-token,get-addresses,add-address,update-address,delete-address
Version 0.0.1
✅ Initial TypeScript implementation
✅ Core Spryker API integration
✅ Eleven essential MCP tools (product search, authentication, cart management, checkout, order management)
✅ Five contextual MCP prompts for e-commerce guidance
✅ Error handling and logging
✅ Configuration management with validation
✅ Multiple transport support (stdio, HTTP, SSE)
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙋♂️ Support
Getting Help
Documentation: Check this README and inline code documentation
Issues: GitHub Issues
Common Issues
Connection Errors: Verify
SPRYKER_API_BASE_URLis correct and accessibleAuthentication Failures: Ensure customer tokens are valid and not expired
Tool Not Found: Check tool registration in
src/tools/index.ts
🔧 Logging & Debugging
Dynamic Log Level Control
The server supports runtime log level changes through the MCP logging/setLevel method, allowing you to adjust logging verbosity without restarting the server.
Supported Log Levels:
debug- Detailed debugging informationinfo- General operational messages (default)notice- Significant events (mapped to info)warning- Warning conditionserror- Error conditionscritical- Critical conditions (mapped to error)alert- Alert conditions (mapped to error)emergency- Emergency conditions (mapped to error)
MCP Request Example:
{
"method": "logging/setLevel",
"params": {
"level": "debug"
}
}Enhanced Response Format: The setLevel method returns a detailed response confirming the level change:
{
"message": "Log level changed from 'info' to 'debug'",
"previousLevel": "info",
"newLevel": "debug",
"requestedLevel": "debug",
"timestamp": "2025-06-03T16:30:00.000Z"
}Response Fields:
message- Human-readable confirmation messagepreviousLevel- Log level before the changenewLevel- Log level after the changerequestedLevel- The level that was requested (may differ if invalid)timestamp- ISO timestamp when the change occurred
Claude Desktop Usage: When using with Claude Desktop, you can ask the assistant to change the log level:
"Please set the logging level to debug so I can see more detailed information"
The assistant will receive the detailed response and can inform you of the successful change.
Benefits:
Real-time debugging: Increase verbosity when troubleshooting issues
Performance optimization: Reduce logging in production environments
Flexible monitoring: Adjust detail level based on current needs
No service interruption: Changes take effect immediately
Confirmation feedback: Detailed response confirms the change was applied
Log Format
All logs are structured JSON with consistent fields:
{
"timestamp": "2025-06-03T16:30:00.000Z",
"level": "info",
"component": "SprykerMCP",
"message": "Tool executed successfully",
"metadata": {
"toolName": "product-search",
"duration": 245
}
}Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP for e-commerce: live product catalog, stock, and pricing for AI agents.
Connect e-commerce and marketing data to AI assistants via MCP.
Multi-tenant MCP gateway for AI commerce. One connection, every store.
Multi-tenant MCP gateway for AI commerce. One connection, every store.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn MCP server that enables AI agents to interact with the commercetools Composable Commerce platform. It provides tools for managing products, categories, orders, carts, and customer data through secure read and write operations.13MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage products, shopping carts, and orders in an online store through a well-defined MCP API.-
- FlicenseNot gradedqualityDmaintenanceEnables e-commerce shopping assistant capabilities including product search, cart management, payment processing, and order fulfillment via MCP tools.-
- AlicenseAqualityCmaintenanceEnables AI agents to query tenants, browse catalogue items with pricing, pull recent orders, and add products through the MCP tool-calling interface.4MIT