Overview
What is Magento 2 MCP Server?
A Model Context Protocol (MCP) server implementation for Magento 2 that enables AI assistants to interact with a Magento store through a standardized REST API interface. It provides secure authentication handling and type-safe TypeScript tooling, targeting developers integrating AI copilots with their Magento instances.
How to use Magento 2 MCP Server?
Install via npm install vasileuski/magento2-mcp-server. Start the server with the command magento <magento_url> <admin_api_token>, for example magento https://your-magento-store.com eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.... Then configure your MCP client (e.g., Cursor) with the same command as a tool entry.
Key features of Magento 2 MCP Server
- REST API integration with Magento 2
- Secure authentication handling for admin tokens
- Resource and tool handlers for common Magento operations
- TypeScript implementation ensuring type safety
- Built on the official MCP SDK
Use cases of Magento 2 MCP Server
- Retrieve orders, products, or customers via AI-driven queries
- Perform CRUD operations on Magento resources through chat interfaces
- Integrate Magento data into AI assistants in tools like Cursor
- Automate store administration tasks using natural language commands
FAQ from Magento 2 MCP Server
What prerequisites are required?
Node.js v18 or higher, npm v8 or higher, a Magento 2 instance with REST API access, and an admin API access token from Magento.
How do I install and start the server?
Install via npm install vasileuski/magento2-mcp-server. Start with magento <magento_url> <admin_api_token> from the command line.
What API operations are supported?
The server exposes a magento_rest_api tool that accepts path, method, body, and query parameters, letting you call any Magento REST endpoint.
How should I handle the admin token?
Never commit the token to version control. Use environment variables or secure secret management to avoid exposing sensitive credentials.
What clients can I use with this server?
It works with any MCP‑compatible client, such as Cursor, by adding the server command to the client’s tool configuration.