> ## Documentation Index
> Fetch the complete documentation index at: https://validity-kt.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# AI agents

> Connect Claude, Cursor, VS Code or any agent to these docs: an MCP server, a skill, llms.txt and every page as Markdown.

These docs are written for two readers: you, and the agent that writes code next to you. Everything here is also served
in the forms agents read best, so an agent can write Validity rules from the documentation instead of from what it
half remembers.

## Connect the MCP server

The docs run a [Model Context Protocol](https://modelcontextprotocol.io) server that lets an agent search them and read
whole pages as Markdown, while it works:

```text theme={null}
https://validity-kt.dev/mcp
```

> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add --transport http validity https://validity-kt.dev/mcp
> ```

> [tab] Cursor
>
> Add it to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` for every project:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "validity": {
>       "url": "https://validity-kt.dev/mcp"
>     }
>   }
> }
> ```

> [tab] VS Code
>
> Add it to `.vscode/mcp.json`:
>
> ```json theme={null}
> {
>   "servers": {
>     "validity": {
>       "type": "http",
>       "url": "https://validity-kt.dev/mcp"
>     }
>   }
> }
> ```

> [tab] Claude
>
> In Claude, add a custom connector and paste the URL above.

The menu at the top of every page also has **Copy MCP server** and buttons that install it in Cursor and VS Code.

## Install the skill

The [skill](https://validity-kt.dev/skill.md) teaches an agent how Validity code is written: the entries, what
`null` means, the imports, and the mistakes that compile but do the wrong thing. Add it to your agent with:

```bash theme={null}
npx skills add https://validity-kt.dev
```

## Read the docs as text

| Address | What it is |
| - | - |
| `/llms.txt` | The index of every page, with its description |
| `/llms-full.txt` | Every page in one file, to paste as context |
| Any page with `.md` | That page as Markdown, such as [`/quickstart.md`](https://validity-kt.dev/quickstart.md) |

A request with `Accept: text/markdown` gets the Markdown of a page at its normal address too.

## From any page

The **Copy page** menu at the top of every page copies it as Markdown, opens it as Markdown, or sends it to Claude,
ChatGPT or Perplexity with a question.

## What to ask

> [card] Write the rules of a class
>
> "Using the Validity docs, write the validation of this `SignupRequest`: the email is required, the phone is
> optional but must be a Brazilian mobile."

> [card] Translate the messages
>
> "Write a `Validity.configure` block with every default message of Validity in Spanish."

> [card] Find the constraint
>
> "Which Validity constraint checks an IBAN, and what code does its violation have?"

> [card] Review the rules
>
> "Check these Validity rules against the docs: is anything run outside a rule inside `failFast`?"


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.