MCP Server

MCP Tools

Explore the available MCP tools in Nuxt AI for enhancing your development workflow.

The Nuxt AI MCP server provides several tools to help you interact with your Nuxt application and its documentation. These tools are organized into different categories based on their functionality.

Documentation Tools

Tools for managing and accessing documentation:

list-documentation-files

Lists all available documentation files and folders for a specific Nuxt module.

Parameters:

  • docs: Name of the module to get info about (e.g., 'nuxt', 'nuxt-content', 'nuxt-ui', 'h3', 'nitro')

read-documentation-file

Read a specific documentation file from a Nuxt module.

Parameters:

  • docs: Name of the module to get info about
  • filepath: Relative path to the documentation file (must be a .md file)

read-documentation-files

Read multiple documentation files from a Nuxt module.

Parameters:

  • docs: Name of the module to get info about
  • filepaths: Array of relative paths to the documentation files (must be .md files)

Runtime Tools

Tools for interacting with your Nuxt application's runtime:

get-nuxt-config

Get the Nuxt configuration, including the ssr, appDir, srcDir, rootDir, alias, runtimeConfig, modules, etc.

list-nuxt-auto-imports-items

List auto-imports items. Use this when importing new functions to check available items.

list-nuxt-components

List registered components in the Nuxt app. Use this when adding or importing new components to check what's available.

list-nuxt-pages

List registered pages and their metadata in the Nuxt app.

list-nuxt-hooks

List registered hooks in the Nuxt app.

Module Management Tools

Tools for managing Nuxt modules:

list-remote-nuxt-modules

List all available Nuxt modules that can be added to your project using the 'nuxi module add {module-name}' command.

get-nuxt-module-info

Get detailed information about a specific Nuxt module.

Parameters:

  • moduleName: Name of the module to get info about

Scaffolding Tools

Tools for generating new files and components:

nuxt-scaffold

Scaffold a new component, page, layout, middleware, or other Nuxt files in your project.

Parameters:

  • template: Type of file to scaffold (options: 'api', 'app', 'app-config', 'component', 'composable', 'error', 'layer', 'layout', 'middleware', 'module', 'page', 'plugin', 'server-middleware', 'server-plugin', 'server-route', 'server-util')
  • name: Name of the component to add

AI Client Integration

When you enable the MCP server in your Nuxt AI configuration, these tools are automatically made available to compatible AI clients. The integration process works as follows:

  1. Automatic Tool Registration: When your Nuxt application starts in development mode, the MCP server automatically registers run the mcp server and makes them available to AI clients.
  2. Cursor Integration: For Cursor users, the MCP server automatically updates the .cursor/mcp.json configuration, making these tools immediately available to the Cursor AI assistant. This means you can start using AI-powered features without any additional setup.
  3. Tool Discovery: AI assistants like Claude can automatically discover and utilize these tools to:
    • Look up Nuxt documentation when answering your questions
    • Check your project's configuration and components
    • Scaffold new files with the correct structure
    • Verify available imports and components before suggesting code changes
  4. Contextual Usage: The AI assistant will automatically choose the most appropriate tool based on your request. For example:
    • When you ask about configuration, it will use get-nuxt-config
    • When you want to create a new component, it will use nuxt-scaffold
    • When you need documentation, it will use the documentation tools to fetch relevant information

You don't need to explicitly invoke these tools - they work behind the scenes to enhance the AI's ability to help you with your Nuxt development tasks.