From 1ef70755c762d9e242d0db8334f06933130491a7 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 22 Jul 2025 19:40:43 +0300 Subject: [PATCH] docs: add MCP server (#13018) * docs: add MCP server * typo fix --- www/apps/book/.env.sample | 3 +- .../introduction/build-with-llms-ai/page.mdx | 66 ++++++++++++++++++- www/apps/book/generated/edit-dates.mjs | 2 +- www/apps/book/next.config.mjs | 6 ++ www/apps/book/public/llms-full.txt | 26 ++++++++ 5 files changed, 100 insertions(+), 3 deletions(-) diff --git a/www/apps/book/.env.sample b/www/apps/book/.env.sample index f9ea64ec27..59aaeddf1a 100644 --- a/www/apps/book/.env.sample +++ b/www/apps/book/.env.sample @@ -17,4 +17,5 @@ CLOUDINARY_CLOUD_NAME= NEXT_PUBLIC_BASE_PATH= NEXT_PUBLIC_GA_ID= NEXT_PUBLIC_PROD_BASE_URL= -NEXT_PUBLIC_INTEGRATION_ID= \ No newline at end of file +NEXT_PUBLIC_INTEGRATION_ID= +NEXT_MCP_SERVER_URL= \ No newline at end of file diff --git a/www/apps/book/app/learn/introduction/build-with-llms-ai/page.mdx b/www/apps/book/app/learn/introduction/build-with-llms-ai/page.mdx index 40e687a983..d0fd2f0b2c 100644 --- a/www/apps/book/app/learn/introduction/build-with-llms-ai/page.mdx +++ b/www/apps/book/app/learn/introduction/build-with-llms-ai/page.mdx @@ -1,4 +1,13 @@ -import { InlineIcon } from "docs-ui" +import { + InlineIcon, + Tabs, + TabsContent, + TabsContentWrapper, + TabsList, + TabsTrigger, + Button, + Link +} from "docs-ui" import { AiAssistent, AiAssistentLuminosity } from "@medusajs/icons" export const metadata = { @@ -53,6 +62,61 @@ You can add new lines using the `Shift + Enter` shortcut. --- +## 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 available at `https://docs.medusajs.com/mcp`. you can add it to AI agents that support connecting to MCP servers. + + + + Cursor + VSCode + + + + + 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](https://docs.cursor.com/context/model-context-protocol): + +```json +{ + "mcpServers": { + "medusa": { + "url": "https://docs.medusajs.com/mcp" + } + } +} +``` + + + + + + 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: + +```json +{ + "servers": { + "medusa": { + "type": "http", + "url": "https://docs.medusajs.com/mcp" + } + } +} +``` + + Learn more in the [VSCode documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers). + + + + + +--- + ## Plain Text Documentation The Medusa documentation is available in plain text format, which allows LLMs and AI tools to easily parse and understand the content. diff --git a/www/apps/book/generated/edit-dates.mjs b/www/apps/book/generated/edit-dates.mjs index 79d46cdb42..e1830babbf 100644 --- a/www/apps/book/generated/edit-dates.mjs +++ b/www/apps/book/generated/edit-dates.mjs @@ -122,5 +122,5 @@ export const generatedEditDates = { "app/learn/fundamentals/api-routes/override/page.mdx": "2025-05-09T08:01:24.493Z", "app/learn/fundamentals/module-links/index/page.mdx": "2025-05-23T07:57:58.958Z", "app/learn/fundamentals/module-links/index-module/page.mdx": "2025-06-19T16:02:05.665Z", - "app/learn/introduction/build-with-llms-ai/page.mdx": "2025-06-27T12:07:08.147Z" + "app/learn/introduction/build-with-llms-ai/page.mdx": "2025-07-22T16:19:11.668Z" } \ No newline at end of file diff --git a/www/apps/book/next.config.mjs b/www/apps/book/next.config.mjs index bb0978b30d..50e2c4ed7b 100644 --- a/www/apps/book/next.config.mjs +++ b/www/apps/book/next.config.mjs @@ -193,6 +193,12 @@ const nextConfig = { destination: `${process.env.NEXT_PUBLIC_CLOUD_URL || "https://localhost:3001"}/cloud/:path*`, basePath: false, }, + { + source: "/mcp", + destination: + process.env.NEXT_MCP_SERVER_URL || "https://localhost:3001/mcp", + basePath: false, + }, ], } }, diff --git a/www/apps/book/public/llms-full.txt b/www/apps/book/public/llms-full.txt index faff7a195e..a0ec370a76 100644 --- a/www/apps/book/public/llms-full.txt +++ b/www/apps/book/public/llms-full.txt @@ -19038,6 +19038,32 @@ You can add new lines using the `Shift + Enter` shortcut. *** +## 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 available at `https://docs.medusajs.com/mcp`. you can add it to AI agents that support connecting to MCP servers. + +### 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](https://docs.cursor.com/context/model-context-protocol): + +```json +{ + "mcpServers": { + "medusa": { + "url": "https://docs.medusajs.com/mcp" + } + } +} +``` + +### VSCode + +*** + ## Plain Text Documentation The Medusa documentation is available in plain text format, which allows LLMs and AI tools to easily parse and understand the content.