---
title: "Model Context Protocol (MCP)"
description: "Connect AI agents like Claude to your Nuxt site via MCP servers with built-in tools and resources."
canonical_url: "https://nuxtseo.com/docs/ai-ready/guides/mcp"
last_updated: "2026-05-06T21:35:02.075Z"
---

[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) support via [`@nuxtjs/mcp-toolkit`](https://github.com/nuxt-modules/mcp-toolkit).

Your site exposes tools and resources that AI agents like Claude can query for page data and search.

## Installation

```bash
npx nuxi module add @nuxtjs/mcp-toolkit
```

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: [
    'nuxt-ai-ready',
    '@nuxtjs/mcp-toolkit',
  ],
})
```

See [@nuxtjs/mcp-toolkit docs](https://github.com/nuxt-modules/mcp-toolkit) for server configuration.

## Connection

Add to Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

```json
{
  "mcpServers": {
    "my-site": {
      "command": "npx",
      "args": ["-y", "@nuxtjs/mcp-client", "https://example.com/mcp"]
    }
  }
}
```

## Tools

### `list_pages`

Returns page metadata as JSON with pagination. Cached 1 hour.

**Parameters:**

<table>
<thead>
  <tr>
    <th>
      Param
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        limit
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Max pages to return (default: 100)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        offset
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Skip first N pages (default: 0)
    </td>
  </tr>
</tbody>
</table>

**Response:**

```json
{
  "pages": [
    {
      "route": "/docs/getting-started",
      "title": "Getting Started",
      "description": "Quick start guide",
      "headings": "h1:Getting Started|h2:Installation",
      "updatedAt": "2025-01-15T10:30:00Z"
    }
  ],
  "total": 50,
  "limit": 100,
  "offset": 0,
  "hasMore": false
}
```

### `search_pages`

Full-text search across pages via SQLite FTS5. Searches title, description, route, headings, keywords, and content. Cached 5 minutes.

**Parameters:**

<table>
<thead>
  <tr>
    <th>
      Param
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        query
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Search query
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limit
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Max results (default: 10)
    </td>
  </tr>
</tbody>
</table>

**Response:**

```json
[
  {
    "route": "/docs/installation",
    "title": "Installation",
    "description": "Install the module",
    "score": 0.15
  }
]
```

## Resources

### `resource://nuxt-ai-ready/pages`

Page listing as JSON. Same data as `list_pages` tool. Cached 1 hour.

Use resources when agents need static data without parameters.

## Data Availability

MCP tools return data from the [SQLite](https://sqlite.org) database populated during prerendering.

<table>
<thead>
  <tr>
    <th>
      Environment
    </th>
    
    <th>
      Data Source
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Dev mode
      </strong>
    </td>
    
    <td>
      Empty (no prerender data)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Production
      </strong>
    </td>
    
    <td>
      SQLite database
    </td>
  </tr>
</tbody>
</table>

For full MCP functionality, test with a production build (`nuxi generate`).

## Configuration

Disable specific features:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  aiReady: {
    mcp: {
      tools: false, // Disable all tools
      resources: false, // Disable all resources
    },
  }
})
```
