Nuxt
Nuxt

How to use mcp-toolkit in Nuxt ?

December 4, 2025

@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 ?

Ready to leverage the power of conversational AI? Start your project with Zignuts expert AI developers.
bg-image
download-image
Company Deck
PDF, 3MB
© 2026 Zignuts Technolab. All Rights Reserved.
branch imagesbranch imagesbranch imagesbranch imagesbranch imagesbranch images