Magento MCP Server
Magento MCP Server + Data Fetcher
Python tools to:
Fetch Magento store data from the CLI (
app.py)Expose Magento tools to Claude via MCP (
server.py)
Both share the same REST client in magento_client.py.
Setup
cd magento-mcp
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txtCopy .env.example to .env and fill in your store details:
MAGENTO_URL=https://your-store.com/rest/V1
ACCESS_TOKEN=your_integration_access_tokenMagento Integration Token
Magento Admin → System → Extensions → Integrations
Add New Integration
API tab: set Resource Access = All (or at least Catalog → Products)
Activate and copy the Access Token
Put that token in
.envasACCESS_TOKENRequired on Magento 2.4.4+:
Admin → Stores → Configuration → Services → OAuth → Consumer Settings
Set Allow OAuth Access Tokens to be used as standalone Bearer tokens = Yes
Then run:php bin/magento cache:flush
Without step 6, Magento returns:
The consumer isn't authorized to access Magento_Catalog::products
even when the integration has full API access.
CLI data fetching
python app.py products --limit 10
python app.py products --search shirt
python app.py product WJ12
python app.py orders --limit 5 --status processing
python app.py order 12
python app.py customers
python app.py categoriesAdd --json on list commands for raw Magento JSON.
MCP server for Claude Desktop
Install dependencies (see Setup above).
Open Claude Desktop config:
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the server (update the paths):
{
"mcpServers": {
"magento": {
"command": "C:\\Users\\Etech\\Desktop\\magento-mcp\\.venv\\Scripts\\python.exe",
"args": ["C:\\Users\\Etech\\Desktop\\magento-mcp\\server.py"],
"cwd": "C:\\Users\\Etech\\Desktop\\magento-mcp"
}
}
}Restart Claude Desktop.
Ask Claude things like:
"List the latest Magento products"
"Show pending orders"
"Get product details for SKU WJ12"
Available MCP tools
Tool | Purpose |
| List / search products |
| Product by SKU |
| Create simple product |
| Update price |
| Update product name |
| Update name and/or price |
| Delete by SKU |
| List / filter orders |
| Order by ID |
| List customers |
| Customer by ID |
| Category tree |
Project layout
magento-mcp/
magento_client.py # Shared Magento REST client
server.py # MCP server for Claude
app.py # CLI data fetcher
.env # Your secrets (do not commit)
.env.example # Template
requirements.txt