MCP Server
Configuration
Configure the MCP server in your Nuxt AI application.
The Model Context Protocol (MCP) server can be configured through the ai.dev.mcp
property in your nuxt.config.ts
file.
Basic Configuration
Here's a basic configuration for the MCP server:
nuxt.config.ts
export default defineNuxtConfig({
modules: ['@josephanson/nuxt-ai'],
ai: {
dev: {
mcp: {
enabled: true, // Enable MCP server
}
}
}
})
Configuration Options
enabled
Controls whether the MCP server is enabled.
- Type:
boolean
- Default:
true
in development mode,false
in production
The MCP server is enabled by default in development mode and disabled in production. You can override this behavior by explicitly setting the enabled
option.
nuxt.config.ts
export default defineNuxtConfig({
ai: {
dev: {
mcp: {
enabled: true
}
}
}
})