> For AI agents: the complete documentation index is available at https://rspress.rs/llms.txt, the full documentation bundle is available at https://rspress.rs/llms-full.txt.

# AI config

These options configure Markdown generation and browser agent tools. `llms` and `webMcp` are top-level options in `rspress.config.ts`.

## llms

- **Type**:

```ts
boolean | {
  llmsTxt?: (context: LlmsTxtContext) => string | Promise<string>;
  remarkSplitMdxOptions?: RemarkSplitMdxOptions;
}
```

- **Default**: `false`

Whether to enable [SSG-MD](https://rspress.rs/guide/basic/ssg-md.md) to generate `llms.txt`, `llms-full.txt`, and Markdown files for each page, making your documentation easier for large language models to understand.

Enabling `llms` also enables the Markdown copy and AI tool UI by default. Use [`themeConfig.llmsUI`](https://rspress.rs/api/config/config-theme.md#llmsui) to customize or disable these controls.

Use `llmsTxt` to compose the complete `llms.txt` content from site metadata and page sections. See [Customize llms.txt](https://rspress.rs/guide/basic/ssg-md.md#customize-llmstxt) for details.

```ts title="rspress.config.ts"
import { defineConfig } from '@rspress/core';

export default defineConfig({
  llms: true,
});
```

:::warning

`llms` is an experimental feature. If SSG-MD cannot be enabled due to SSR incompatibility, use [@rspress/plugin-llms](https://rspress.rs/plugin/official-plugins/llms.md) as a fallback.

:::

For detailed usage, configuration options, and implementation principles, see [llms.txt (SSG-MD)](https://rspress.rs/guide/basic/ssg-md.md).

## webMcp

- **Type**: `boolean | { exposedTo?: string[] }`
- **Default**: `true`

Expose built-in documentation tools through the browser's native WebMCP API. Set `webMcp: false` to disable only the built-in tools. You can still use the [`useWebMcp`](https://rspress.rs/ui/hooks/use-web-mcp.md) hook to register custom tools. Browsers without WebMCP support continue to render the site normally.

Use `exposedTo` to allow specific secure origins to discover the tools:

```ts title="rspress.config.ts"
import { defineConfig } from '@rspress/core';

export default defineConfig({
  webMcp: {
    exposedTo: ['https://agent.example'],
  },
});
```

See [WebMCP](https://rspress.rs/guide/basic/webmcp.md) for available tools, browser requirements, and cross-origin access.
