# Agent integration

> Connect your coding agent to Rogue documentation. Search, retrieve a section, and verify the source through a read-only MCP server.

[Canonical page](https://rogueon.ai/docs/agent-integration)

## Connect an MCP client

The public endpoint is `https://rogueon.ai/mcp`. Choose Streamable HTTP in your MCP client. It requires no API key, account, OAuth flow, or model subscription to read the documentation. Let the client negotiate the protocol; the endpoint supports the 2026-07-28 protocol and compatible 2025 clients.

For Cursor, merge the following entry into your project's `.cursor/mcp.json`, preserving any existing servers. Reload the MCP configuration and confirm that `list_docs`, `search_docs`, and `get_doc` are listed. Other editors may use a different configuration format for the same endpoint.

**Cursor · .cursor/mcp.json**

```json
{
  "mcpServers": {
    "rogue-docs": {
      "url": "https://rogueon.ai/mcp"
    }
  }
}
```

- [Cursor MCP configuration reference](https://cursor.com/docs/mcp)

## Claude Code

Run this in the project where you want the documentation available. The command registers the remote server; it does not generate or publish an app. Use `/mcp` in Claude Code to inspect the connection. If `rogue-docs` is already configured, inspect or update that entry instead of adding a duplicate.

**Claude Code · terminal**

```bash
claude mcp add --transport http rogue-docs https://rogueon.ai/mcp
```

- [Claude Code HTTP MCP reference](https://code.claude.com/docs/en/mcp)

## Tool contract

All tools accept `locale`: `en` or `pt-br`, defaulting to `en`. Tool results include source URLs. Markdown resources are also discoverable through `resources/list` and readable through `resources/read`.

| Tool | Arguments | Result |
| --- | --- | --- |
| `list_docs` | `locale?` | Catalog of slugs, URLs, sections and content hashes. |
| `search_docs` | `query`, `locale?`, `limit?` | Ranked excerpts and canonical section links. Limit 1–16; default 8. |
| `get_doc` | `slug`, `locale?`, `section?` | Full Markdown, or one section when its ID is provided, with its SHA-256 hash. |

**get_doc · arguments**

```json
{
  "slug": "project-architecture",
  "locale": "en",
  "section": "runtime-services"
}
```

## Search → retrieve → verify

1. **Find the relevant source**

   Use search_docs with a focused query. Search matches all words, ignores accents, and returns excerpts; an excerpt is not the whole reference.

2. **Read the smallest useful section**

   Use the document slug and section ID with get_doc. Omit section when surrounding context is necessary. Keep conditions about artifact format, runtime and availability in any summary.

3. **Retain source and revision**

   Cite the returned canonical URL and retain the SHA-256 with cached context. Check the manifest before reusing old content. The hash describes content identity, not a product release or update date.

**Task context for a coding agent**

```text
Before changing a Rogue-generated project:
1. Identify the actual artifact format from its files.
2. Search Rogue docs for the relevant runtime or export contract.
3. Retrieve that section with get_doc; retain its canonical URL.
4. Distinguish documented behavior from assumptions about this project.
5. Implement only the requested change and validate its acceptance criteria.
6. Report the source, changed files, verification, and unresolved dependencies.
```

## Retrieve Markdown over HTTP

Every article has an explicit `/markdown` URL. HTML and Markdown are generated from the same source; the Markdown response declares the canonical HTML URL. This path works with a normal HTTP client when MCP is unavailable or unnecessary.

**Read architecture documentation**

```bash
curl -fsSL https://rogueon.ai/docs/project-architecture/markdown
```

- [Architecture · Markdown](https://rogueon.ai/docs/project-architecture/markdown)

## Cache by content hash

The JSON manifest has `schemaVersion: 1` and lists each document's `slug`, `url`, `markdownUrl`, `sha256`, byte count and section IDs. Document hashes cover the exact UTF-8 Markdown response body; section hashes cover that section's Markdown. The HTTP ETag identifies the manifest representation and supports `If-None-Match` with a 304 response.

**manifest.json · HTTP**

```bash
curl -fsS -D - https://rogueon.ai/docs/manifest.json
```

- [Open documentation manifest](https://rogueon.ai/docs/manifest.json)

## Discovery and complete corpus

`llms.txt` is the compact discovery index. `llms-full.txt` contains the public guides in both languages. Prefer a page or section for routine retrieval; use the full corpus when an offline task needs broader coverage. These files are discovery resources, not crawler permission rules or a guarantee of ingestion.

- [llms.txt](https://rogueon.ai/llms.txt)
- [llms-full.txt](https://rogueon.ai/llms-full.txt)

## Transport, limits and scope

Tool calls are read-only and do not invoke a language model. Your coding agent still has its own provider usage and permissions. An explicit browser Origin must be on the server allowlist; ordinary server-side MCP clients can connect without an Origin header. Recheck configuration and protocol errors before retrying, rather than adding credentials this endpoint does not require.

| Contract | Behavior |
| --- | --- |
| HTTP | POST for MCP; successful calls return JSON. No persistent SSE stream, session ID or subscription. GET returns 405. |
| Input | Maximum 16 KiB per request. Search: 1–200 characters, up to 12 words. Only catalog slugs and section IDs are accepted. |
| Output | Up to 16 search hits; maximum 64 KiB of Markdown per document. Tool validation failures are returned as errors, not guessed content. |
| Access | Public documentation only. No account data, private projects, code execution, generation or publication tools. |

## Related guides

- [Project and runtime architecture](https://rogueon.ai/docs/project-architecture)
- [Export and external development](https://rogueon.ai/docs/exporting)
- [Authentication, data, and permissions](https://rogueon.ai/docs/data-and-permissions)

