
Medusa
STDIOMCP server for Medusa JS SDK integration, enabling automation and intelligent service extensions.
MCP server for Medusa JS SDK integration, enabling automation and intelligent service extensions.
medusa-mcp
medusa-mcp
is a Model Context Protocol (MCP) server designed for integration with the Medusa JavaScript SDK. It provides a scalable backend layer for managing and interacting with Medusa’s data models, enabling automation, orchestration, and intelligent service extensions.
An MCP server is a modular, extensible backend that:
These servers are used in areas like AI, IoT, and enterprise software to connect various services and automate tasks using standardized protocols like JSON-RPC.
MCP servers allow AI agents to:
Using medusa-mcp
, Medusa JS can:
Clone the repository and install dependencies:
npm install
Build the project:
npm run build
Start the server:
npm start
Test using the MCP Inspector:
npx @modelcontextprotocol/inspector ./dist/index.js
Note: Restart the Inspector and your browser after each rebuild.
Variable | Description |
---|---|
MEDUSA_BACKEND_URL | Your Medusa backend URL |
PUBLISHABLE_KEY | Your Medusa publishable API key |
MEDUSA_USERNAME | Medusa admin username (for admin) |
MEDUSA_PASSWORD | Medusa admin password (for admin) |
Server runs at: http://localhost:3000
Here's how the medusa-mcp
server fits into a typical setup with Medusa JS and external systems:
+-------------------------+
| AI Assistant / |
| LLM / Automation |
+-----------+-------------+
|
v
+--------------+--------------+
| MCP Server (medusa-mcp) |
|-----------------------------|
| - JSON-RPC Communication |
| - AI-Ready Interface |
| - Plugin Support |
+------+----------------------+
|
+
|
v
+-------------------+
| Medusa Backend |
| (Products, Orders)|
+-------------------+
|
|
v
+--------------+
| Medusa Store |
| Frontend |
+--------------+
|
|
v
+-------------------------+
| External Services / API |
| (e.g., Payments, Email) |
+-------------------------+
To tailor the server to your Medusa setup:
Replace
admin.json
andstore.json
with your own OAS definitions for fine-grained control.
oas/
folder:
admin.json
– Admin endpointsstore.json
– Storefront endpointsUse the @medusajs/medusa-oas-cli
to regenerate these files.
You can also fork this project to build your own custom MCP-powered Medusa integration.
We welcome contributions! Please see our CONTRIBUTING.md guide.
This project is licensed under the MIT License. See the LICENSE file for details.