# Mentat > Mentat is the permission and audit layer for coding agents. A team's engineering decisions (rules in CLAUDE.md, AGENTS.md, architecture decision records, and corrections typed into agent sessions) become typed records with an owner, a reason, a scope, and the assumptions they rest on. Agents ask Mentat what governs a file before they edit it, over a stateless MCP server or a REST API, and get back the decisions that apply with their reasons, or a block naming both authors when two active decisions contradict each other. Every page listed here is also served as Markdown: request the page URL with `Accept: text/markdown`, or append `.md` to the path (`/docs.md`, and `/index.md` for the home page). `llms-full.txt` holds every page in one file. ## When to use Mentat Reach for Mentat when an agent is about to change code in a repository whose team has recorded decisions, and needs to know which of them apply and why. - **Before editing a file for the first time in a session**, call the MCP tool `relevant` with the file path (or `POST /api/graph/resolve` with `{"file_path": "..."}`). Follow `code_inferable` and `structural` decisions literally; treat `infrastructure`, `intent_oriented`, and `process` decisions as background context. - **When `relevant` returns a BLOCK**, two active decisions disagree about that file. Stop, report both decisions and both authors to the user verbatim, and do not choose between them. Picking a side quietly is the failure Mentat exists to prevent. - **When the user states a general rule** ("we never call the payments API from a route handler, because..."), call `record` with their reason in their own words. It lands as `proposed`; a human must promote it before it governs anything. Never invent a justification. - **When a premise behind a decision has changed** (a dependency was removed, a traffic assumption no longer holds), call `break_assumption`. Every decision resting on it becomes `questioned`. - **To keep instruction files small and correct**, compile a scoped AGENTS.md per directory with `compile` instead of appending to a growing one. Do not use Mentat as a code reviewer, linter, or security scanner, to decide which engineer is right, or to store credentials or personal data. ## How to call it - MCP endpoint: `https://trymentat.pages.dev/mcp` (Streamable HTTP, stateless, JSON responses, no session id). With no `Authorization` header it serves a read-only demo graph, so it works before any setup. - Claude Code: `claude mcp add --transport http mentat https://trymentat.pages.dev/mcp` - Your own graph: create a workspace with `POST https://trymentat.pages.dev/api/workspaces` (no signup) and send the returned key as `Authorization: Bearer mtk_...`. The key is shown once. - Offline, against a graph committed in the repository: `npx -y @mentatlabs/cli mcp` (stdio) or `npx -y @mentatlabs/cli relevant `. ## Docs - [Docs](https://trymentat.pages.dev/docs): connect any MCP client, the fourteen tools, scope resolution, the CLI, and the SDK - [Developer portal](https://trymentat.pages.dev/developers): API keys, quickstart, rate limits, and the sandbox - [OpenAPI description](https://trymentat.pages.dev/openapi.json): every REST operation with operationIds and schemas - [MCP server card](https://trymentat.pages.dev/.well-known/mcp/server-card.json): transport, auth, and the tool list - [API catalog](https://trymentat.pages.dev/.well-known/api-catalog): RFC 9727 linkset for the API ## Product - [Home](https://trymentat.pages.dev/): what Mentat does and a live resolver against the demo graph - [Playground](https://trymentat.pages.dev/playground): give it two rules and watch the conflict pipeline decide - [The graph](https://trymentat.pages.dev/graph): the demo decision graph, its assumptions, and the cascade - [Benchmark](https://trymentat.pages.dev/benchmark): the decision-outcome benchmark, trivial baselines included - [Evidence](https://trymentat.pages.dev/evidence): the sourced research behind every claim ## Optional - [About](https://trymentat.pages.dev/about): who builds Mentat and the commitments it keeps - [Contact](https://trymentat.pages.dev/contact): questions, security reports, workspace deletion - [Privacy](https://trymentat.pages.dev/privacy): what is stored and what never leaves a workspace - [Terms](https://trymentat.pages.dev/terms) - [CLI on npm](https://www.npmjs.com/package/@mentatlabs/cli) - [All pages as Markdown](https://trymentat.pages.dev/llms-full.txt)