Medusa

v0.4.0
io.github.trhonpavel/medusa-mcp Checked 4 days ago Published 2 months ago

Medusa v2 store: orders, customers, products, inventory, sales reports and safe write actions.

Values you need

VariableWhat it is
MEDUSA_BACKEND_URLrequired URL of your Medusa backend, e.g. https://api.example.com
MEDUSA_API_KEYrequired secret Secret API key from Medusa Admin → Settings → Developer → Secret API Keys (sk_…)
MEDUSA_READ_ONLYoptional true = register read and report tools only Default: false
REPORT_TIMEZONEoptional IANA timezone for date filters and report buckets, e.g. Europe/Prague Default: UTC

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add medusa-mcp -e 'MEDUSA_API_KEY=<MEDUSA_API_KEY>' -e 'MEDUSA_BACKEND_URL=<MEDUSA_BACKEND_URL>' -- npx -y medusa-mcp@0.4.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "medusa-mcp": {
      "args": [
        "-y",
        "medusa-mcp@0.4.0"
      ],
      "command": "npx",
      "env": {
        "MEDUSA_API_KEY": "<MEDUSA_API_KEY>",
        "MEDUSA_BACKEND_URL": "<MEDUSA_BACKEND_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "medusa-mcp": {
      "args": [
        "-y",
        "medusa-mcp@0.4.0"
      ],
      "command": "npx",
      "env": {
        "MEDUSA_API_KEY": "<MEDUSA_API_KEY>",
        "MEDUSA_BACKEND_URL": "<MEDUSA_BACKEND_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "MEDUSA_API_KEY",
      "id": "medusa-api-key",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "MEDUSA_BACKEND_URL",
      "id": "medusa-backend-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "medusa-mcp": {
      "args": [
        "-y",
        "medusa-mcp@0.4.0"
      ],
      "command": "npx",
      "env": {
        "MEDUSA_API_KEY": "${input:medusa-api-key}",
        "MEDUSA_BACKEND_URL": "${input:medusa-backend-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.medusa-mcp]
command = "npx"
args = ["-y", "medusa-mcp@0.4.0"]
env = { "MEDUSA_API_KEY" = "<MEDUSA_API_KEY>", "MEDUSA_BACKEND_URL" = "<MEDUSA_BACKEND_URL>" }

For AI agents

  1. Ask the user for: MEDUSA_BACKEND_URL, MEDUSA_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: get_store_info, list_orders, get_order, create_fulfillment, create_shipment, mark_delivered, cancel_fulfillment, complete_order, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json