Core Concepts

MCP Integration

Last updated by Harlan Wilton in doc: sync.

Nuxt AI Ready supports Model Context Protocol (MCP) when the @nuxtjs/mcp-toolkit is installed.

Your site exposes MCP tools and resources to AI agents like Claude based on your indexed content.

Installation

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

See @nuxtjs/mcp-toolkit docs for server configuration options.

Connection

Add to Claude Desktop config:

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

Dev vs Production

MCP tools behave differently in dev and production modes:

FeatureDev ModeProduction Mode
Data sourceSitemap/routesPrebuilt .toon files
FormatJSONTOON (token-efficient)
list_pages paramsNonemode: 'minimal' | 'chunks'
pages-chunks resource❌ Unavailable✅ Available
CachingNone1 hour

Why the difference?

  • Dev mode: Content chunks and TOON files are generated at build time. In dev, only route information from sitemap is available.
  • Production mode: After nuxi build or nuxi generate, full content is available in token-efficient TOON format.
For full MCP functionality including content chunks and TOON format, test with a production build.

Built-in Tools

list_pages

Lists all pages in TOON format - a token-efficient encoding for LLM input.

Parameters:

  • mode (enum): 'minimal' (default) or 'chunks'
    • minimal: Page-level metadata (route, title, description, headings, chunkIds, updatedAt)
    • chunks: Individual content chunks (id, route, content)

Response: TOON-encoded data

pages[2]{route,title,description,headings,chunkIds,updatedAt}:
  /docs/getting-started,Getting Started,Quick start guide...,h1:Getting Started,abc123-0,2025-01-15T10:30:00Z
  /docs/installation,Installation,How to install...,h1:Installation,def456-0,2025-01-14T09:00:00Z

Built-in Resources

Resources give static data to AI agents without parameters.

resource://nuxt-ai-ready/pages

Page-level metadata in TOON format (route, title, description, headings, chunkIds, updatedAt). Each page has chunkIds string to join with pages-chunks resource.

Format: TOON

resource://nuxt-ai-ready/pages-chunks

Only available in production mode (after build).

Chunk-level content (id, route, content) for RAG/embeddings in TOON format. Join with pages resource by matching chunk id with page chunkIds.

Format: TOON

Common Workflows

Browse All Pages

  1. Use list_pages tool with mode: 'minimal' to get page list with metadata
  2. Review routes, titles, descriptions
  3. Use list_pages with mode: 'chunks' to get individual content chunks

Bulk Processing

  1. Access resource://nuxt-ai-ready/pages for page-level metadata in TOON format
  2. Or access resource://nuxt-ai-ready/pages-chunks for individual content chunks in TOON format
  3. Process all pages/chunks - TOON is natively readable by LLMs and more token-efficient than JSON
Did this page help you?