Nuxt

How to use mcp-toolkit in Nuxt ?

December 4, 2025

download ready
Thank You
Your submission has been received.
We will be in touch and contact you soon!

@nuxtjs/mcp-toolkit is a Nuxt module that simplifies building Modular Component Patterns (MCP) by auto-registering shared utilities, composables, and component groups. It improves code organization by allowing teams to structure features into reusable "toolkit" modules.

It's especially useful in large apps where consistency and modularity are important across teams. The module automatically injects toolkit functions and lets you import feature utilities without long relative paths.

Code

# npm
npm install -D @nuxtjs/mcp-toolkit zod

#nuxt.config.ts
export default defineNuxtConfig({
 modules: ['@nuxtjs/mcp-toolkit'],
 mcp: {
   name: 'My MCP Server',
   version: '1.0.0',
 },
})

# server/mcp/tools/echo.ts
import { z } from 'zod'

export default defineMcpTool({
 description: 'Echo back a message',
 inputSchema: {
   message: z.string().describe('The message to echo back'),
 },
 handler: async ({ message }) => {
   return {
     content: [{
       type: 'text',
       text: `Echo: ${message}`,
     }],
   }
 },
})
Hire Now!

Need Help with Nuxt Development ?

Work with our skilled nuxt developers to accelerate your project and boost its performance.
**Hire now**Hire Now**Hire Now**Hire now**Hire now