MetorialDocs

Use the Metorial docs in Claude Code, Cursor and Codex

Add the Metorial docs MCP server to Claude Code, Cursor or Codex, point agents at llms.txt and the markdown pages, and paste a task list into AGENTS.md.

To give your AI client the Metorial docs, add the read-only docs MCP server at https://metorial.com/docs-api/mcp. In Claude Code, run claude mcp add --transport http metorial-docs https://metorial.com/docs-api/mcp. In Cursor, add the URL under mcpServers in mcp.json. In Codex, run codex mcp add metorial-docs --url https://metorial.com/docs-api/mcp. The server needs no sign-in and has two tools: search_docs finds pages, and read_page returns a page as markdown. Agents without MCP can read llms.txt and the .md version of any page instead.

What you'll learn

  • How to add the docs MCP server to Claude Code, Cursor, and Codex
  • How agents can read the docs without MCP
  • What to put in AGENTS.md so agents look things up instead of guessing

What the docs server does

The docs server covers the guides at metorial.com/docs and the API reference at metorial.com/api. It is public, read-only, and stateless, and it uses the Streamable HTTP transport.

ToolInputReturns
search_docsquery, and limit from 1 to 10 (default 5)Matching pages, each with its title, canonical URL, and a snippet
read_pageurl: a full URL, a path such as /docs/build/quickstart, or a slug such as build/quickstartThe page as markdown, headed by its title and canonical URL, cut at about 100 KB

This server only reads documentation. It is not the Magic MCP URL from your portal, which connects your AI client to your integrations. To set that up, see Which AI clients work with Metorial?

Add the server to your client

Claude Code

Run this in a terminal. Add --scope user to make the server available in every project, not only the current one.

claude mcp add --transport http metorial-docs https://metorial.com/docs-api/mcp

To share it with everyone who works in a repository, commit a .mcp.json at the project root instead:

{
  "mcpServers": {
    "metorial-docs": {
      "type": "http",
      "url": "https://metorial.com/docs-api/mcp"
    }
  }
}

Claude Code asks each person to approve project-scoped servers the first time they open the project.

Cursor

Add the server to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json to use it in every project:

{
  "mcpServers": {
    "metorial-docs": {
      "url": "https://metorial.com/docs-api/mcp"
    }
  }
}

Codex

Run this once. The Codex CLI, IDE extension, and ChatGPT desktop app share the same configuration.

codex mcp add metorial-docs --url https://metorial.com/docs-api/mcp

Or add the server to ~/.codex/config.toml, or to .codex/config.toml in a trusted project:

[mcp_servers.metorial-docs]
url = "https://metorial.com/docs-api/mcp"

Other clients

Any client that supports remote MCP servers over Streamable HTTP can use the same URL with no authentication.

Read the docs without MCP

Every page is also published as plain markdown, so an agent that can fetch URLs does not need the server.

WhatWhere
Index of every page, grouped by task and sectionmetorial.com/llms.txt
Every page in one filemetorial.com/llms-full.txt
One guide as markdownAdd .md to its URL, for example https://metorial.com/docs/build/quickstart.md
One API resource as markdownAdd .md to its URL, for example https://metorial.com/api/sessions.md
Search as JSONhttps://metorial.com/docs/api/v1/pages/search?q=scim

Requests for a docs or API page that send Accept: text/markdown are redirected to the markdown version.

Agents can also start from two short files written for them: skill.md explains what Metorial is and which setup path fits a task, and setup.md walks an agent through setup with or without a terminal.

Add Metorial to AGENTS.md or CLAUDE.md

Paste this section into the AGENTS.md of a repository that uses Metorial. It names common Metorial tasks and the page that answers each one, so an agent fetches that page before it writes code or config.

## Metorial

This project uses Metorial, an MCP gateway that connects AI clients and agents to tools. Do not answer Metorial questions from memory. Before you write code or config, fetch the page for the task and copy commands, config keys and SDK method names from it. Every docs URL returns markdown when it ends in `.md`.

| Task | Fetch this first |
| --- | --- |
| Connect Claude Code, Cursor, Codex, ChatGPT or Claude to Metorial | https://metorial.com/docs/platform/clients.md links the page for each client, for example https://metorial.com/docs/platform/clients/claude-code.md |
| Add an integration such as GitHub, Slack or Linear | https://metorial.com/docs/platform/integrations/create-integration.md |
| Let each person use their own account (per-user OAuth) | https://metorial.com/docs/platform/guides/per-user-oauth.md for a portal, https://metorial.com/docs/build/sdk/oauth.md in SDK code |
| Start with the SDK | https://metorial.com/docs/build/quickstart.md, then https://metorial.com/docs/build/sdk/javascript.md or https://metorial.com/docs/build/sdk/python.md |
| Call the HTTP API | https://metorial.com/api.md |
| Fix a failed sign-in, missing tool or failed tool call | The Troubleshooting section of the client's page, then https://metorial.com/docs/platform/integrations/review-connection-logs.md. For SDK errors, https://metorial.com/docs/build/sdk/error-handling.md |
| Anything else | https://metorial.com/llms.txt lists every page with a one-line description |

- To search the docs, use the `metorial-docs` MCP server (https://metorial.com/docs-api/mcp) when it is connected. Call `search_docs` with a short description of the task, then `read_page` with a result URL.
- A Magic MCP URL from a Metorial portal is not an API key. The client config holds only the URL, and each person signs in with OAuth.
- Read secret API keys, which start with `metorial_sk_`, from an environment variable such as `METORIAL_API_KEY`. Do not put them in code, committed files or an MCP client config.

The same text is published at https://metorial.com/docs-static/agents.md. To append it from a terminal, run this in the repository root:

curl -fsSL https://metorial.com/docs-static/agents.md >> AGENTS.md

Claude Code reads AGENTS.md only when the repository has no CLAUDE.md. If the repository has both files, paste the section into CLAUDE.md, or add the line @AGENTS.md to CLAUDE.md so that Claude Code imports AGENTS.md.

Delete the rows for tasks your repository does not involve. The section works without the docs MCP server, because every row points at a URL the agent can fetch.