www/apps/book/app/learn/introduction/build-with-llms-ai/mcp-server/page.mdx
import { Tabs, TabsContent, TabsContentWrapper, TabsList, TabsTrigger, Link, Prerequisites } from "docs-ui"
export const metadata = {
title: ${pageNumber} 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.
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:
<Prerequisites items={[ { text: "Cloud account", link: "!cloud!" } ]} />
To connect to the Medusa MCP server in Claude Code, run the following command in your terminal:
claude mcp add --transport http medusa https://docs.medusajs.com/mcp
Then, start Claude Code and authenticate with your Cloud account:
claude
/mcp
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 has known issues with OAuth authentication flows. So, to connect to the Medusa MCP server in Cursor, create a personal access key in your Cloud account first.
Then, add the following to your .cursor/mcp.json file or Cursor settings, as explained in the Cursor documentation:
{
"mcpServers": {
"medusa": {
"url": "https://docs.medusajs.com/mcp",
"headers": {
"Authorization": "Bearer {token}"
}
}
}
}
Replace {token} with the personal access key you generated in your Cloud account.
You can then start using the Medusa MCP server in Cursor.
To manually connect to the Medusa MCP server in VSCode, add the following to your .vscode/mcp.json file in your workspace:
{
"servers": {
"medusa": {
"type": "http",
"url": "https://docs.medusajs.com/mcp"
}
}
}
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 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):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"medusa": {
"type": "remote",
"url": "https://docs.medusajs.com/mcp",
"headers": {
"Authorization": "Bearer {token}"
},
"oauth": false
}
},
}
Replace {token} with the personal access key you generated in your Cloud account.
You can then start using the Medusa MCP server in OpenCode.
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:
The MCP server provides prompts with step-by-step instructions for common tasks. These are useful for your AI agent to learn how to perform specific tasks and what information it should look for in the documentation.
The MCP server provides prompts for the following tasks:
<Note title="Tip">When integrating third-party providers, consider adding the Context7 MCP server. It retrieves the latest information from the provider's documentation, which is essential for successful integration.
</Note>Integrate PayPal as a payment provider in my Medusa store.
Integrate ShipStation as a fulfillment provider in my Medusa store.
Implement a brand feature to allow merchants to associate products with brands
If you run into any issues or have suggestions to improve Medusa, you can ask your AI agent to submit feedback. It will use the MCP server to submit feedback to our team.
For example, you can ask:
Submit feedback that the documentation on how to create a custom payment provider is outdated and needs to be updated.
You can submit feedback about the documentation, the developer experience, the MCP server, or any other aspect of Medusa. Your feedback will help us improve Medusa for everyone.