Vendure
STDIOMCP server for Vendure e-commerce CLI orchestration and project management
MCP server for Vendure e-commerce CLI orchestration and project management
A standalone Model Context Protocol (MCP) server for Vendure CLI orchestration. This package runs on a per-project basis, allowing external clients like Cursor to interact with your local Vendure project's CLI commands in a programmatic and context-aware way.
add and migrate commands.The server dynamically generates MCP tools from your project's installed Vendure CLI command definitions. This ensures:
[!WARNING] To use the CLI command orchestration capabilities of the MCP. The target project should be running a version of the
@vendure/clipackage that is > 3.4.0 or later. Currently, this would be in our minor branch.To change the version of your package, open the
package.jsonof your project and change the "@vendure/cli" version to "minor", then delete yourpackage-lock.jsonfile andnode_modulesfolder and runnpm install.
The server is designed to be installed and run directly from your Vendure project. This ensures it always has access to the correct dependencies and project context.
Configure Your MCP Client (e.g., Cursor)
Create or update the mcp.json file used by your MCP client. This file is typically located at .cursor/mcp.json inside your project's root folder.
Below are configurations for both STDIO and HTTP connections.
[!IMPORTANT] You must restart your MCP client, e.g., Cursor IDE or Claude Code, to apply the changes.
This is the simplest and most direct way to connect.
{ "mcpServers": { "vendure-local-mcp": { "command": "npx", "args": ["@vendure/mcp-server@latest", "--projectPath", "/path/to/your/vendure-project"] } } }
[!IMPORTANT] You must replace
/path/to/your/vendure-projectwith the absolute path to your Vendure project's root directory. The same path as yourvendure-config.ts.
If your client does not support STDIO or you need to connect over a network, you can run the server in HTTP mode.
First, start the server from your terminal in your Vendure project's root directory:
npx @vendure/mcp-server@latest --transport http --projectPath .
This will start the server on the default port (8000), you can explicitly define the port by using the --port <0000> flag.
Then, configure your mcp.json to connect to the running server's URL:
{ "mcpServers": { "vendure": { "url": "http://localhost:8000/mcp" } } }
This will start a Docker container and the server will run through in stdio mode. Refer to the Docker Guide for more information about running with Docker.
{ "mcpServers": { "vendure-mcp-docker": { "command": "docker", "args": [ "run", "--rm", "-i", "--env", "PROJECT_PATH=/workspace", "--volume", "/absolute/path/to-your-vendure-project:/workspace", "vendure/mcp:latest", "--projectPath", "/workspace" ] } } }
[!IMPORTANT] You must replace
/path/to/your/vendure-projectwith the absolute path to your Vendure project's root directory. The same path as yourvendure-config.ts.
If you are contributing to the Vendure MCP server itself, you'll want to run it from the source code.
git clone https://github.com/vendure-ecommerce/mcp.git cd vendure-mcp-server # Or the correct directory name npm install npm run build
To connect an MCP client to your local development server, use the npm run dev script and point it to a test Vendure project. You can run it in either STDIO or HTTP mode.
npm run dev -- --projectPath /path/to/your/test-vendure-projectnpm run dev:http -- --projectPath /path/to/your/test-vendure-projectConfigure your mcp.json as described in the setup section to connect to your development server. The -- is required to pass arguments to the npm script correctly.
If you run into problems while using/running the MCP, we would appreciate any issue with information that would help us reproduce your issue.
[!TIP] you can provide us with MCP Logs created by your MCP-Client. In Cursor, you could find them by looking for
Developer: Open Log File...>MCP Logsin your command palette (Shift+Cmd/Ctrl/Super+P) by default.