<!-- Source: https://developer.retainza.com/ai/ · Markdown: https://developer.retainza.com/ai.md -->

# Use the docs with AI tools

Let your AI coding tool read these docs while it writes your Retainza integration.

<!-- section: overview -->

## Overview

An assistant that is integrating Retainza for you works best from the real docs, not from what it remembers. There are two ways to give it them:

- **The docs MCP server** — connect it once and the assistant can search the docs and read the section it needs, on its own, while it works.
- **Markdown** — every page is also published as plain Markdown, plus an `llms.txt` index, to paste into a chat or point a tool at.

Both serve exactly what this site shows, and update with it.

> **Note:** The MCP server is read-only and public. It needs no API key and never sees your project or your users — it only reads these docs.

<!-- section: install -->

## Connect your tool

The server speaks MCP over Streamable HTTP at `https://api.retainza.com/v1/mcp`. Add it to your tool under any name; the examples use `retainza-docs`.

**Claude Code**

```bash
claude mcp add --transport http retainza-docs https://api.retainza.com/v1/mcp
```

**Cursor**

```json
// .cursor/mcp.json (this project) or ~/.cursor/mcp.json (every project)
{
  "mcpServers": {
    "retainza-docs": {
      "url": "https://api.retainza.com/v1/mcp"
    }
  }
}
```

**VS Code**

```json
// .vscode/mcp.json
{
  "servers": {
    "retainza-docs": {
      "type": "http",
      "url": "https://api.retainza.com/v1/mcp"
    }
  }
}
```

Any other client that supports remote MCP servers over HTTP works the same way: give it the URL above, with no authentication.

### Check it works

Ask your assistant something only the docs know, for example:

```
Using the retainza-docs tools, how do I register a push token on Android?
```

It should call `search_docs`, then `get_docs_section`, and answer from the Android guide's push section.

<!-- section: usage -->

## What the tools do

| Tool | Does |
| --- | --- |
| `search_docs(query, limit?)` | Keyword search over every section. Naming a platform (ios, kotlin, flutter, expo, node…) favours that guide. Returns page and section ids. |
| `get_docs_section(page, section)` | One section as Markdown, code samples included. The usual next call after a search. |
| `get_docs_page(page)` | A whole page as Markdown. Pages run to 10–40 KB, so a section is usually enough. |
| `list_docs_pages()` | Every page with its sections' ids and titles. |

Page ids are `index` (the reference), `react-native`, `ios`, `android`, `flutter`, `server` and `ai`. Section ids are the anchors in each page's address — `/ios/#push` is page `ios`, section `push`.

### Limits

- Roughly two calls a second per IP address, with bursts of 60 — plenty for an assistant working through a task.
- Changes to these docs reach the server within about ten minutes.

<!-- section: concepts -->

## Markdown & llms.txt

Every page has a Markdown twin at the same address with `.md`:

| Page | Markdown |
| --- | --- |
| Reference | [https://developer.retainza.com/index.md](https://developer.retainza.com/index.md) |
| iOS guide | [https://developer.retainza.com/ios.md](https://developer.retainza.com/ios.md) |
| …and so on | `/react-native.md`, `/android.md`, `/flutter.md`, `/server.md`, `/ai.md` |

- [/llms.txt](https://developer.retainza.com/llms.txt) — an index of every page with a one-line description and its sections, in the [llms.txt](https://llmstxt.org) format.
- [/llms-full.txt](https://developer.retainza.com/llms-full.txt) — all pages in one file, for tools that take a single document.

On any page, **Copy page as Markdown** under the title puts that page on your clipboard, ready to paste into a chat.

> **Tip:** Pasting a whole page uses a lot of context. With the MCP server connected, the assistant fetches only the section it needs.
