Get the FREE Ultimate OpenClaw Setup Guide →

mcp-with-nuxt

Example of creating a MCP server with Nuxt / Nitro.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio atinux-mcp-with-nuxt node .output/server/index.mjs

How to use

This MCP server is built on Nuxt and exposes an MCP interface mounted at /mcp, using the Streamable HTTP Server Transport. The project is a Nuxt 3 application that you customize by editing server/routes/mcp.ts to inject your tools, prompts, and resources according to the MCP handler guidelines. To run locally, use the Nuxt development workflow: install dependencies, then start the dev server, which will serve the MCP endpoints under http://localhost:3000/mcp when running in development mode. A sample client is provided at script/test-client.mjs to invoke the MCP server against the running instance.

You can build for production and preview a production-like server locally with the standard Nuxt commands: pnpm build to compile, then pnpm preview to start a production-like server. The MCP interface remains mounted at /mcp, so any client or tooling you configure to talk to the MCP handler should point to http://localhost:3000/mcp (or your deployed domain).

How to install

Prerequisites:

  • Node.js (recommended LTS, v14+)
  • pnpm (or install via npm install -g pnpm)

Steps:

  1. Clone the repository: git clone <repository-url> cd mcp-with-nuxt

  2. Install dependencies: pnpm install

  3. Run in development mode: pnpm dev This starts the Nuxt development server. The MCP endpoint will be available at /mcp once the app is running.

  4. Build for production and preload the server: pnpm build pnpm preview This builds the application and runs a production-like server. The MCP interface remains mounted at /mcp.

  5. Optional: customize MCP tools Edit server/routes/mcp.ts to add your tools, prompts, and resources per the MCP handler guidelines. After edits, re-build if you’re running a production-like setup.

Additional notes

Notes:

  • The MCP endpoint is mounted at /mcp within the Nuxt app. Ensure your client targets that path.
  • If deploying to environments like Vercel, enable features recommended for Nuxt/Fluid Compute as appropriate.
  • For production deployments, you typically run the built server and then expose it behind your hosting platform. The readme mentions Fluid compute for efficient execution on some platforms.
  • The sample client at script/test-client.mjs demonstrates how to invoke the MCP endpoint; you can adapt it for your own prompts and tool invocations.
  • If you modify server/routes/mcp.ts, ensure type correctness and alignment with the MCP handler specs to maintain compatibility with the client tooling.

Related MCP Servers

Sponsor this space

Reach thousands of developers