https://github.com/atinux/mcp-with-nuxt-vercel
Example of creating a MCP server with Nuxt & Vercel.
https://github.com/atinux/mcp-with-nuxt-vercel
mcp-server nuxt vercel
Last synced: 9 days ago
JSON representation
Example of creating a MCP server with Nuxt & Vercel.
- Host: GitHub
- URL: https://github.com/atinux/mcp-with-nuxt-vercel
- Owner: atinux
- Created: 2025-05-09T07:54:36.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-05-09T13:28:02.000Z (about 1 month ago)
- Last Synced: 2025-05-13T14:21:52.344Z (about 1 month ago)
- Topics: mcp-server, nuxt, vercel
- Language: TypeScript
- Homepage: https://mcp-with-nuxt.vercel.app
- Size: 118 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- mcp-index - Nuxt MCP Server on Vercel - Serve an MCP server within a Nuxt application to enable integration of language models with various external tools, resources, and prompts. Utilizes Redis for efficient server-sent events (SSE) transport and simplifies the setup and deployment process with a Vercel-optimized template. (APIs and HTTP Requests)
README
# Nuxt MCP Server on Vercel
This is a simple Nuxt application that serves as a MCP server on Vercel using `@vercel/mcp-adapter`.
## Usage
This sample app uses the [Vercel MCP Adapter](https://www.npmjs.com/package/@vercel/mcp-adapter) that allows you to drop in an MCP server on a group of routes in any Nuxt project.
Update `server/routes/mcp/[transport].ts` with your tools, prompts, and resources following the [MCP TypeScript SDK documentation](https://github.com/modelcontextprotocol/typescript-sdk/tree/main?tab=readme-ov-file#server).
The MCP server is mounted on `/mcp/[transport]` (ex: `/mcp/sse`).
## Setup
Make sure to install dependencies:
```bash
pnpm install
```## Development Server
Make sure to have Redis running locally:
```bash
redis-server
```Start the development server on another terminal on `http://localhost:3000`:
```bash
pnpm dev
```## Production
Build the application for production:
```bash
pnpm build
```Locally preview production build:
```bash
pnpm preview
```Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
## Notes for running on Vercel
- To use the SSE transport, requires a Redis attached to the project under `process.env.REDIS_URL`
- Make sure you have [Fluid compute](https://vercel.com/docs/functions/fluid-compute) enabled for efficient execution
- After enabling Fluid compute, open `server/routes/mcp/[transport].ts` and adjust `maxDuration` to 800 if you using a Vercel Pro or Enterprise account
- [Deploy the Nuxt MCP template](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fatinux%2Fmcp-with-nuxt-vercel&integration-ids=oac_V3R1GIpkoJorr6fqyiwdhl17)## Sample Client
`script/test-client.mjs` contains a sample client to try invocations.
```sh
node scripts/test-client.mjs http://localhost:3000
```## Credits
This project is based on the [Next.js MCP template](https://github.com/vercel-labs/mcp-for-next.js).