Medusa MCP server
Provides full coverage of the Medusa v2 Admin API (404 operations), enabling AI agents to search, describe, and call Admin operations for managing products, orders, customers, inventory, uploads, and other store resources. Supports raw /admin requests, multipart file uploads, and safety controls such as read-only mode and tag/operation allow- and deny-lists.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Medusa MCP server
An MCP server for the Medusa v2 Admin API. It covers all 404 Admin operations in the bundled openapi.yaml (Medusa 2.22.7). It runs as a Docker container with a Streamable HTTP endpoint protected by a bearer token, so you can deploy one instance per client or store, for example on Dokploy.
Full API coverage: the tools are generated from the OpenAPI spec. Admin routes added later or custom
/admin/*routes work through raw requests.LLM-friendly: by default the server exposes only 5 tools (search → describe → call), not 400+. These definitions take about 4 KB of context. The full set would take about 600 KB.
Auth on both sides: the MCP endpoint accepts static bearer tokens and/or OAuth 2.1, where users sign in with their Medusa admin account. OAuth is needed for ChatGPT and lets Claude use "Sign in". The server reaches Medusa with a secret API key or an admin email and password.
Safety switches: read-only mode, tag allow-lists and deny-lists, and per-operation deny-lists.
Tools
Mode | Tools |
|
|
| One tool per operation (e.g. |
medusa_upload_files sends multipart/form-data to POST /admin/uploads. Each file comes from base64 content or a public URL.
Related MCP server: ADMINV2MCP
Configuration (env)
Variable | Default | Description |
| – (required) | Medusa backend URL, e.g. |
| – | Secret API key ( |
| – | Used instead of the API key. The server gets a JWT and logs in again when it expires. |
| – | JSON object of extra headers for Medusa requests |
|
| Timeout for Medusa requests |
| – | Comma-separated static bearer tokens. Use several to rotate tokens or to give each user their own. HTTP mode needs these tokens, OAuth, or both. |
| – | Turns on OAuth (≥ 32 chars, |
| – | Public origin of this server, e.g. |
| – | Optional allow-list of admin emails or |
|
| Token lifetimes in seconds |
|
| Also accept |
|
| Local testing only |
|
|
|
|
| Allow only GET operations |
| – | e.g. |
| – | e.g. |
| – | e.g. |
|
| Allow |
| – | Path to your own OpenAPI file (YAML/JSON). Use it for a different Medusa version or for custom routes. |
|
| Responses longer than this are truncated |
|
| Path of the MCP endpoint |
| – | Allowed origins for browser clients ( |
|
|
|
|
| |
|
|
|
/health is the health check endpoint. It does not need a token.
Deploying on Dokploy (one instance per client)
In the project, create Compose → Raw, then paste
docker-compose.yml.In Environment, fill in the variables from
.env.example:MEDUSA_BASE_URL,MEDUSA_API_KEY, andMCP_AUTH_TOKENSand/orMCP_OAUTH_SECRET+MCP_PUBLIC_URL(generate secrets withopenssl rand -hex 32).In Domains, add a domain for the
medusa-mcpservice on port3000with HTTPS.Deploy. The endpoint is
https://<domain>/mcp.
For another client, create another Compose service with different env values.
OAuth (ChatGPT, Claude "Sign in")
Set MCP_OAUTH_SECRET and MCP_PUBLIC_URL to enable OAuth. The server then acts as its own OAuth 2.1 authorization server, following the MCP authorization spec:
Discovery:
/.well-known/oauth-protected-resource/mcpand/.well-known/oauth-authorization-server. A401response includes aWWW-Authenticateheader withresource_metadata.Authorization code + PKCE (S256), RFC 9207
issin the redirect, and RFC 8707resource/ audience checksClient registration: Client ID Metadata Documents (CIMD) and Dynamic Client Registration (
/oauth/register)/oauth/authorizeshows a login page. The user signs in with their Medusa admin email and password, including MFA if it is enabled. The credentials are checked against Medusa and are never stored.Tokens are stateless signed JWTs, so there is no database and they survive restarts. A refresh fails once the admin user is deleted in Medusa.
API calls to Medusa still use MEDUSA_API_KEY. The OAuth login only decides who may use the MCP server, and the logs record which admin called each tool.
ChatGPT: Settings → Plugins (or Apps) → Add custom MCP server → URL https://mcp.shop.com/mcp, Authentication OAuth. Leave the client ID and secret empty; ChatGPT registers itself through CIMD or DCR.
Claude (claude.ai / Desktop): Add custom connector → URL https://mcp.shop.com/mcp → Sign in now → Use Claude's published identity (CIMD) or Register automatically (DCR).
Connecting an MCP client
Claude Code:
claude mcp add --transport http medusa-shop https://mcp.shop.com/mcp \
--header "Authorization: Bearer <MCP_AUTH_TOKEN>"Cursor, VS Code, and other clients (mcp.json):
{
"mcpServers": {
"medusa-shop": {
"url": "https://mcp.shop.com/mcp",
"headers": { "Authorization": "Bearer <MCP_AUTH_TOKEN>" }
}
}
}For clients that cannot send a custom header, set MCP_ALLOW_QUERY_TOKEN=true and use https://mcp.shop.com/mcp?token=<MCP_AUTH_TOKEN>. The token then shows up in proxy logs, so use a dedicated token for this.
Local stdio (Claude Desktop):
{
"mcpServers": {
"medusa": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT=stdio", "-e", "MEDUSA_BASE_URL", "-e", "MEDUSA_API_KEY", "ghcr.io/blackhexagon/medusa-mcp:latest"],
"env": { "MEDUSA_BASE_URL": "https://api.shop.com", "MEDUSA_API_KEY": "sk_..." }
}
}
}Development
npm install
npm run build # openapi.yaml -> generated/spec.json + tsc
npm test # e2e tests against a mock Medusa server
MEDUSA_BASE_URL=http://localhost:9000 MEDUSA_API_KEY=sk_... MCP_AUTH_TOKENS=dev-token-1234567890 npm run dev
npx @modelcontextprotocol/inspector # Streamable HTTP, http://localhost:3000/mcp + Authorization headerTo update the API, replace openapi.yaml and run npm run build.
Releases (GHCR)
The GitHub Actions workflow .github/workflows/docker.yml builds a multi-arch image (amd64 and arm64) and pushes it to ghcr.io/<owner>/<repo>:
a push to
mainproduceslatestandsha-xxxxxxxa
v1.2.3tag produces1.2.3,1.2, and1
After the first push, open GitHub → Packages → the package → Package settings and set visibility to Public. Otherwise Dokploy needs registry credentials to pull the image.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP for 1,500+ APIs. Vault-managed credentials; OAuth or API key. Search, load, and execute.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Query, browse, and automate OmegaAI workspaces from any MCP client. Streamable HTTP with OAuth 2.0.
Unofficial Shopify MCP Pack — wraps the Shopify Admin REST API (2024-01)
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides access to all 471+ DigitalOcean API endpoints through an MCP server that dynamically extracts them from the OpenAPI specification, enabling search, filtering, and direct API calls with proper authentication.61-
- FlicenseNot gradedqualityDmaintenanceExposes AdminV2 backend API operations as discoverable, callable tools for AI agents, enabling natural language or structured API interactions.-
- FlicenseBqualityCmaintenanceEnables AI agents to manage products, inventory, collections, orders, and customers in a Medusa v2 store via the Admin API.21-
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients like Claude Code or Codex to administer a Bifrost LLM gateway's governance API, including virtual keys, teams, customers, budgets, provider configs, routing rules, model/pricing config, request-log observability, and core gateway config.1MIT