2.3. Medusa MCP Remote Server
The Medusa documentation provides a remote Model Context Protocol (MCP) server that allows you to find information from the Medusa documentation right in your IDEs or AI tools, such as Cursor.
Medusa hosts a Streamable HTTP MCP server at https://docs.medusajs.com/mcp that you can add to AI agents supporting MCP server connections.
Authentication#
This MCP server is available for Cloud users only. It requires authenticating with your Cloud account to use it.
The MCP server supports two authentication methods:
- OAuth: This is the recommended authentication method. It allows you to authenticate with your Cloud account without generating a token manually. When you connect to the MCP server, you will be prompted to log into your Cloud account in a browser window to authenticate.
- Personal Access Key: Use your Cloud personal access key as a Bearer token in the Authorization header when connecting to the MCP server. This is useful for AI agents like OpenCode that may have issues with OAuth authentication flows.
Connect to the Medusa MCP Server#
Claude Code#
To connect to the Medusa MCP server in Claude Code, run the following command in your terminal:
Then, start Claude Code and authenticate with your Cloud account:
Then, select the medusa MCP server and choose "Authenticate". This will open a browser window where you can log into your Cloud account to authenticate.
Cursor#
Click here to add the Medusa MCP server to Cursor.
To manually connect to the Medusa MCP server in Cursor, add the following to your .cursor/mcp.json file or Cursor settings, as explained in the Cursor documentation:
Then, to authenticate with your Cloud account:
- Go to Settings -> Tools & MCP in Cursor.
- Click the "Connect" button next to the Medusa MCP server.
- Log into your Cloud account in the opened browser window to authenticate.
VS Code#
Click here to add the Medusa MCP server to VSCode.
To manually connect to the Medusa MCP server in VSCode, add the following to your .vscode/mcp.json file in your workspace:
Then, once you start the MCP server connection, you will be prompted to authenticate with your Cloud account in a browser window. Log in to authenticate and start using the Medusa MCP server in VSCode.
OpenCode#
OpenCode has known issues with OAuth authentication flows. So, to connect to the Medusa MCP server in OpenCode, create a personal access key in your Cloud account first.
Then, add the following to your OpenCode config file (for example, ~/.config/opencode/opencode.json):
Replace {token} with the personal access key you generated in your Cloud account.
You can then start using the Medusa MCP server in OpenCode.
How to Use the MCP Server#
After connecting to the Medusa MCP server in your AI tool or IDE, you can start asking questions or requesting your AI assistant to build Medusa customizations. It will fetch the relevant information from the Medusa documentation and provide you with accurate answers, code snippets, and explanations.
For example, you can ask:
- "Create a Product Review module for Medusa. Refer to the Medusa documentation for information."
- "How to update Medusa to the latest version?"
- "Explain the Medusa workflow system."
- "Integrate Medusa with X provider. Refer to the Medusa documentation for information."