Recommended for setting up a local Saleor instance for development and testing
Supports environment variable configuration for connecting to Saleor instances
Interacts with Saleor's GraphQL API to access e-commerce data
Used for dependency management and packaging of the MCP server
Provides testing capabilities for validating the MCP server functionality
Serves as the foundation for the MCP server implementation, providing the runtime environment
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Saleor MCP Servershow me the latest products in my store"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Saleor MCP Server
A Model Context Protocol (MCP) server for Saleor. This server enables an MCP client to interact with Saleor e-commerce data including products, orders, customers, and more.
π Features
-Product Management: Query and browse Saleor products with rich formatting
Related MCP server: MCP Toolkit
π Prerequisites
Required Software
Python 3.10 or higher
python --version # Should be 3.10+Poetry (recommended) or pip
# Install Poetry curl -sSL https://install.python-poetry.org | python3 - # Or via pip pip install poetryClaude Desktop
Download from claude.ai/desktop
Required Services
Running Saleor Instance
Local development server
πͺ Setting Up Saleor
You need a running Saleor instance to connect to. Choose one of these options:
Option 1: Local Development (Recommended for Testing)
Follow the official Saleor documentation to set up a local instance:
π Saleor Developer Documentation
Quick Start with Docker:
# Clone Saleor
git clone https://github.com/saleor/saleor-platform.git
cd saleor-platform
# Start with Docker Compose
docker-compose up -d
# Access at http://localhost:8000/graphql/Detailed Setup Guides:
π³ Docker Setup
π Local Python Setup
βοΈ Saleor Cloud
β‘ Quick Start
1. Clone and Install
# Clone the repository
git clone https://github.com/yourusername/saleor-mcp-server.git
cd saleor-mcp-server
# Install dependencies
poetry install
# Or with pip
pip install -r requirements.txt
pip install -e .2. Configure Environment
# Copy environment template
cp .env.example .env
# Edit configuration
nano .env # or your preferred editorRequired Configuration (.env):
# Saleor API Configuration
SALEOR_API_URL=http://localhost:8000/graphql/
SALEOR_EMAIL=your-email@example.com
SALEOR_PASSWORD=your-password
# Optional: Advanced Settings
LOG_LEVEL=INFO
TOKEN_REFRESH_THRESHOLD=300
SERVER_NAME=saleor
DEFAULT_PRODUCT_LIMIT=20
MAX_PRODUCT_LIMIT=1003. Test the Connection
# Test your configuration
poetry run python scripts/test-tools.py
# Or test the server directly
TEST_MODE=true poetry run bm-mcpExpected output:
π§ͺ Testing Saleor connection...
β
Connection successful!
π¦ Testing product query...
β
Found 3 products
β’ Product Name (ID: ...)
π All tests passed!4. Test with MCP Inspector
# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector
# Test your server
npx @modelcontextprotocol/inspector poetry run bm-mcpThis opens a web interface at http://localhost:5173 where you can:
Test the connection
Call the
get_productstoolSee formatted responses
π₯οΈ Claude Desktop Setup
1. Find your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude.desktopconfigWindows:
%APPDATA%\Claude\claude.desktopconfigLinux:
~/.config/Claude/claude.desktopconfig
2. Add the server configuration:
Option A: Using Poetry (Recommended)
{
"mcpServers": {
"saleor": {
"command": "poetry",
"args": ["run", "bm-mcp"],
"cwd": "/full/path/to/saleor-mcp-server",
"env": {
"SALEOR_API_URL": "http://localhost:8000/graphql/",
"SALEOR_EMAIL": "your-email@example.com",
"SALEOR_PASSWORD": "your-password"
}
}
}
}Option B: Direct Script
{
"mcpServers": {
"saleor": {
"command": "/full/path/to/saleor-mcp-server/.venv/bin/bm-mcp",
"args": []
}
}
}3. Restart Claude Desktop
After updating the configuration, restart Claude Desktop completely.
π§ͺ Testing
Command Line Testing
# Test imports and configuration
poetry run python -c "from bm_mcp.main import main; print('β
Import successful')"
# Test with environment flag
TEST_MODE=true poetry run bm-mcp
# Test specific tools
poetry run python scripts/test-tools.pyInteractive Testing
# Start MCP Inspector
npx @modelcontextprotocol/inspector poetry run bm-mcp
# Test in Claude Desktop
# Ask: "Show me products from my store"
# Ask: "Get the latest products from my Saleor instance"Usage Examples
Once configured, you can ask Claude questions like:
"Show me the latest products in my store"
"What products do I have available?"
Available Tools
get_products: Retrieve products with optional filteringParameters:
limit,channel,category_idReturns: Formatted product list with names, prices, availability
π οΈ Development
Project Structure
saleor-mcp-server/
βββ bm_mcp/
β βββ client/ # Saleor API client
β βββ config/ # Configuration management
β βββ formatters/ # Data formatting
β βββ tools/ # MCP tool implementations
β βββ utils/ # Utilities and helpers
β βββ main.py # Entry point
βββ scripts/ # Testing and utility scripts
βββ tests/ # Unit tests
βββ .env.example # Environment template
βββ README.mdAdding New Tools
Create tool class in
bm_mcp/tools/Inherit from appropriate base class
Register in
main.pyAdd tests in
tests/
Running Tests
# Run unit tests
poetry run pytest
# Run with coverage
poetry run pytest --cov=bm_mcp
# Test specific functionality
poetry run python scripts/test-tools.pyπ§ Troubleshooting
Common Issues
Connection Errors
# Verify Saleor is running
curl http://localhost:8000/graphql/
# Test credentials
poetry run python scripts/test-connection.pyImport Errors
# Reinstall dependencies
poetry install --sync
# Check Python version
python --version # Should be 3.10+Claude Desktop Issues
# Check logs
tail -f ~/Library/Logs/Claude/mcp-server-saleor.log
# Verify config syntax
cat ~/Library/Application\ Support/Claude/claude.desktopconfig | python -m json.toolDebug Mode
# Enable debug logging
LOG_LEVEL=DEBUG poetry run bm-mcp
# Test mode with verbose output
TEST_MODE=true LOG_LEVEL=DEBUG poetry run bm-mcpGetting Help
License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
Anthropic for the Model Context Protocol
Saleor for the excellent e-commerce platform
The open-source community for inspiration and tools
π€ Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes
Add tests for new functionality
Run the test suite (
poetry run pytest)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request