---
title: "Advertise your server in llms.txt"
description: "Let agents discover your MCP server through llms.txt."
canonical_url: "https://mcp-toolkit.nuxt.dev/advanced/llms-txt"
---
# Advertise your server in llms.txt

> Let agents discover your MCP server through llms.txt.

An MCP endpoint is only useful if agents know it exists. Most clients need a human to paste a URL into a config file, which means your server stays invisible to any agent that discovers your site on its own.

[`llms.txt`](https://llmstxt.org) is the convention agents already fetch to understand a site. When [`nuxt-llms`](https://github.com/nuxt-content/nuxt-llms) is registered alongside this module, the toolkit appends an `## MCP Server` section to `/llms.txt` describing your endpoint — no configuration required.

## Setup

Add `nuxt-llms` alongside the toolkit:

```bash [Terminal]
npx nuxi module add nuxt-llms
```

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['@nuxtjs/mcp-toolkit', 'nuxt-llms'],
  llms: {
    domain: 'https://example.com',
    title: 'Example',
    description: 'Everything about Example.',
  },
  mcp: {
    name: 'Example MCP',
    description: 'Query Example data from your agent.',
    browserRedirect: '/docs/mcp',
  },
})
```

`/llms.txt` then contains:

```md [llms.txt]
# Example

> Everything about Example.

## MCP Server

Query Example data from your agent.

- [Example MCP](https://example.com/mcp): Streamable HTTP endpoint — connect an MCP client to this URL to call the tools, resources and prompts exposed by this site.
- [MCP documentation](https://example.com/docs/mcp): How to connect to this MCP server.
```

## What ends up in the section

<table>
<thead>
  <tr>
    <th>
      Source
    </th>
    
    <th>
      Used for
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        llms.domain
      </code>
      
       + <code>
        mcp.route
      </code>
    </td>
    
    <td>
      The absolute endpoint URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        mcp.name
      </code>
    </td>
    
    <td>
      The endpoint link label
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        mcp.description
      </code>
    </td>
    
    <td>
      The section description (falls back to a generated sentence)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        mcp.browserRedirect
      </code>
    </td>
    
    <td>
      An extra documentation link, when set to something other than <code>
        /
      </code>
    </td>
  </tr>
</tbody>
</table>

<note>

The section is built through the `llms:generate` hook that `nuxt-llms` calls while rendering the file, from your resolved configuration. Note that `nuxt-llms` prerenders `/llms.txt`, so its contents — including `llms.domain` — are baked at build time.

</note>

## Opting out

Set `mcp.llms` to `false` to leave `/llms.txt` untouched:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  mcp: {
    llms: false,
  },
})
```

The toolkit also steps aside automatically when your `llms.sections` already contains a section titled `MCP Server`, so you can document the endpoint yourself without ending up with duplicates:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  llms: {
    domain: 'https://example.com',
    sections: [
      {
        title: 'MCP Server',
        description: 'Our own wording wins.',
        links: [{ title: 'Endpoint', href: 'https://example.com/mcp' }],
      },
    ],
  },
})
```

<tip>

`nuxt-llms` isn't a dependency of this module — when it isn't installed, nothing is registered and there is no runtime cost.

</tip>


## Sitemap

See the full [sitemap](https://mcp-toolkit.nuxt.dev/sitemap.md) for all pages.
