AI-Friendly Medusa Documentation
In this guide, you'll learn about the features that help you and your AI agents use the Medusa documentation, including the Docs Assistant, the docs SKILL.md, Markdown pages, the retrieval endpoint, and WebMCP tools.
Summary of AI-Friendly Features#
The Medusa documentation provides the following features for AI agents:
| Feature | URL | Use it to |
|---|---|---|
| Docs SKILL.md | https://docs.medusajs.com/SKILL.md | Learn how to navigate the docs and which tools to use. |
| Markdown pages | Any page URL plus .md | Read a page's content as Markdown. |
| llms.txt | https://docs.medusajs.com/llms.txt | Discover all documentation pages. |
| Retrieval endpoint | https://docs.medusajs.com/agents/search | Search the docs and get the most relevant content. |
| Docs MCP server | https://docs.medusajs.com/mcp | Ask questions and get implementation guides from an MCP client. Requires a Medusa account. |
| WebMCP tools | Every docs page | Search, read, and navigate the docs from the browser. |
| Discovery endpoints | https://docs.medusajs.com/.well-known/* | Find all agent-facing resources programmatically. |
Docs Assistant#
The Docs Assistant answers your questions and helps you build customizations with Medusa, with relevant documentation links, code snippets, and explanations.
Open the Docs Assistant#
To open the Docs Assistant, either:
- Use the keyboard shortcut Ctrl + I for Windows/Linux, or Cmd + I for macOS.
- Click the icon in the top right corner of the documentation.
Then, ask any question about Medusa, such as:
- What is a workflow?
- How to create a product review module?
- How to update Medusa?
- How to fix this error?
Ask About Code Snippets#
Click the icon in a code snippet's header to ask the Docs Assistant about it. The Docs Assistant explains the code and gives usage examples.
Ask About Documentation Pages#
Click the "Explain this page" link in a page's right sidebar to open the Docs Assistant with that page as context, then ask questions about its content.
Formatting and Code Blocks#
Wrap code blocks in your questions in triple backticks (```). For example:
Add new lines with Shift + Enter.
Docs SKILL.md#
The docs SKILL.md at https://docs.medusajs.com/SKILL.md is an agent skill that tells AI agents how to navigate the Medusa documentation, where to find what, and which tools they can use to read it.
Ask your agent to fetch it before working on a Medusa task:
Since the agent skills index lists it, you can also install it alongside the other Medusa agent skills.
Markdown Pages and llms.txt#
The Medusa documentation is available in Markdown and plain text formats for LLMs and AI tools:
- llms.txt: An index of the documentation that links to the index of each documentation section, such as Get Started and Development Resources.
- llms-full.txt: The full content of the Framework documentation in a single file.
- Markdown version of any page: Get any page as Markdown by either:
- Sending an
Accept: text/markdownheader when requesting documentation pages. Agents like Claude Code send this header automatically. - Appending
.mdto the page URL. For example, https://docs.medusajs.com/cloud/ai-toolkit/ai-friendly-docs.md. - Appending
/index.html.mdto the page URL. For example, https://docs.medusajs.com/cloud/ai-toolkit/ai-friendly-docs/index.html.md.
- Sending an
Docs Retrieval Endpoint#
The retrieval endpoint returns the most relevant documentation content for a query, without generating an answer. Agents use it to find the right documentation before writing code.
Send a GET request with your query in the q parameter:
Query parameters:
q: (required) The question or keywords to search for, up to 500 characters.limit: (optional) The number of results to return, from1to15. Defaults to5.agent: (optional) The name of the agent sending the request, such asClaude Code. Medusa uses it to improve the docs for that agent.
It returns a JSON object like the following:
{
"query": "how to create a workflow",
"results": [
{
"url": "https://docs.medusajs.com/learn/fundamentals/workflows",
"content": "# Workflows\n\n..."
}
]
}
To get the results as Markdown instead, send the Accept: text/markdown header. You can also send a POST request with a JSON body { "query": "...", "limit": 5, "agent": "..." }.
WebMCP Tools#
WebMCP lets websites expose tools that browser AI agents can call. Every Medusa documentation page registers the following WebMCP tools, so agents in a supporting browser can use the docs without scraping:
search_medusa_docs: Search the documentation using the retrieval endpoint.get_medusa_docs_page: Get the Markdown content of a documentation page by its URL or path.navigate_medusa_docs: Open a documentation page by its URL or path.
Discovery Endpoints#
Agents and tools can discover the documentation's agent-facing resources programmatically under the .well-known path:
- /.well-known/ai-catalog.json: A catalog of all agent-facing resources, including the docs
SKILL.md, the retrieval endpoint, the Docs MCP server, agent skills, and API specifications. - /.well-known/agent-skills/index.json: An index of the docs
SKILL.mdand the Medusa agent skills. - /.well-known/mcp/server-card.json: The Docs MCP server's metadata.
- /.well-known/api-catalog: Links to the Store and Admin API OpenAPI specifications, the Docs MCP server, and the retrieval endpoint.
The documentation homepage also links these resources in its Link response header.