Example of creating a MCP server with Nuxt / Nitro.
This is a simple Nuxt application that serves as a MCP server using the Streamable HTTP Server Transport.
Update server/routes/mcp.ts with your tools, prompts, and resources following the mcp-handler documentation.
The MCP server is mounted on /mcp.
Make sure to install dependencies:
pnpm install
Start the development server on another terminal on http://localhost:3000:
pnpm dev
Build the application for production:
pnpm build
Locally preview production build:
pnpm preview
Check out the deployment documentation for more information.
Make sure you have Fluid compute enabled for efficient execution
script/test-client.mjs contains a sample client to try invocations.
node scripts/test-client.mjs http://localhost:3000
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.