Skip to main content
Mercur is built so AI coding agents work from accurate, version-matched documentation instead of their training data. Training data is almost always out of date for a fast-moving platform. The docs ship inside your project’s dependencies, and your project tells agents to read them before writing any code.
Why agents do well here. Every extension surface an agent touches has a machine-checkable contract: routes generate a typed client (wrong calls fail to compile), pages follow file conventions the SDK validates at build time, and blocks are diffable source. An agent doesn’t need to guess whether its change works. The toolchain tells it.

How it works

When you install a Mercur project, the documentation is bundled as a dependency at node_modules/@mercurjs/docs/. It mirrors the structure of this site:
Because the docs travel with the package, an agent always has documentation that matches your installed version. There is no network request, no external lookup, and no drift between what the agent reads and what your code actually runs.

Set up your project

New projects

Projects created with bun create mercur-app@latest are ready out of the box. The template ships:
  • @mercurjs/docs as a dependency, so the docs land in node_modules on install
  • an AGENTS.md and a CLAUDE.md at the project root that tell agents to read the bundled docs first
Most AI coding agents, such as Claude Code, Cursor, and GitHub Copilot, read AGENTS.md automatically when they start a session. There is nothing else to configure.

Existing projects

Add the docs dependency:
Then create an AGENTS.md at the project root with a single, focused instruction:
AGENTS.md
Claude Code reads CLAUDE.md; point it at the same instructions instead of duplicating them:
CLAUDE.md

What the agent reads

The workflow is deliberately simple: index first, then the page. An agent reads llms.txt to see what exists, then opens the one or two content/ pages relevant to the task before implementing. The bundled docs cover the full domain model (sellers, products, offers, attributes, commissions, payouts, order groups), the CLI, the typed API client, the dashboard SDK, module references, and how-to guides. The agent looks up the correct contract rather than inventing one.

Verify its work

Mercur gives an agent a fast, machine-checkable way to know whether a change is correct. It is the equivalent of a grading loop the agent can run itself: Because these are objective, an agent can define what “done” looks like, run the checks, read the output, and iterate until they pass, instead of stopping at “looks plausible.”

More AI tooling

The bundled docs are the foundation. Layer more on top:

Skills

Add the official Medusa agent skills for the framework Mercur runs on.

MCP server

Let your editor search the docs live via Model Context Protocol.
For chat assistants like Claude or ChatGPT, Mercur also publishes a hosted llms.txt index and a full llms-full.txt you can load as context.