# For AI agents

> An MCP server, llms.txt, markdown pages and in-page tools, so coding agents read these docs instead of guessing.

- Interactive page: https://m3e.ljzapps.app/#foundations/ai-agents

This site is an interactive app, which agents cannot read. Everything on it is also published as plain files and through a Model Context Protocol server, generated from the same sources as the pages.

## Endpoints (relative to the site origin)

- `/mcp`: MCP server, Streamable HTTP, read only, no login
- `/llms.txt`: curated index of every page
- `/llms-full.txt`: all pages in one file
- `/docs/index.json`: ids, categories, APIs and parameters
- `/docs/snippets.json`: every example as JSON
- `/docs/tokens.json`: baseline colors, type scale and shapes
- `/docs/components/{id}.md` and `/docs/foundations/{id}.md`: any page as markdown
- `/skills/m3-expressive-docs/SKILL.md`: instructions for coding agents
- `/.well-known/mcp/server-card.json`: discovery metadata

## Connect a coding agent

```sh
claude mcp add --transport http m3-docs https://YOUR-DOCS-DOMAIN/mcp
```

Cursor `.cursor/mcp.json`: `{"mcpServers":{"m3-docs":{"url":"https://YOUR-DOCS-DOMAIN/mcp"}}}`

VS Code `.vscode/mcp.json`: `{"servers":{"m3-docs":{"type":"http","url":"https://YOUR-DOCS-DOMAIN/mcp"}}}`

## Tools

`search_docs`, `list_components`, `get_component`, `get_foundation`, `get_snippet`, `find_by_api`, `get_design_tokens`. Resources `m3docs://components/{id}` and prompts `implement_component` and `review_expressive_usage` are also available.

## In the browser

Browsers that implement WebMCP (`document.modelContext`) get the tools `search_docs`, `get_page_markdown`, `open_page`, `get_current_page` and `set_theme` for the open tab.
