Nuxt MCP Server on Vercel

by atinux

Integrations

  • Serves as a foundation for the MCP server, allowing it to be integrated into any Nuxt project with custom routes

  • Required for using the SSE transport in production, serving as the backing store for message handling

  • Provides type definitions and SDK support for building MCP tools, prompts, and resources

Vercel 上的 Nuxt MCP 服务器

这是一个简单的 Nuxt 应用程序,使用@vercel/mcp-adapter充当 Vercel 上的 MCP 服务器。

用法

此示例应用程序使用Vercel MCP 适配器,允许您在任何 Nuxt 项目中的一组路由上放置 MCP 服务器。

按照MCP TypeScript SDK 文档,使用您的工具、提示和资源更新server/routes/mcp/[transport].ts

MCP 服务器安装在/mcp/[transport]上(例如: /mcp/sse )。

设置

确保安装依赖项:

pnpm install

开发服务器

确保 Redis 在本地运行:

redis-server

在另一个终端上启动开发服务器http://localhost:3000

pnpm dev

生产

构建生产应用程序:

pnpm build

本地预览生产版本:

pnpm preview

查看部署文档以获取更多信息。

在 Vercel 上运行的注意事项

  • 要使用 SSE 传输,需要在process.env.REDIS_URL下将 Redis 附加到项目
  • 确保已启用Fluid Compute以实现高效执行
  • 启用 Fluid compute 后,打开server/routes/mcp/[transport].ts并将maxDuration调整为 800(如果您使用 Vercel Pro 或 Enterprise 帐户)
  • 部署 Nuxt MCP 模板

示例客户端

script/test-client.mjs包含一个用于尝试调用的示例客户端。

node scripts/test-client.mjs http://localhost:3000

致谢

该项目基于Next.js MCP 模板

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

一个简单的 Nuxt 应用程序,作为可在 Vercel 上部署的模型上下文协议服务器,允许开发人员通过 MCP TypeScript SDK 实现 AI 工具、提示和资源。

  1. 用法
    1. 设置
      1. 开发服务器
        1. 生产
          1. 在 Vercel 上运行的注意事项
            1. 示例客户端
              1. 致谢

                Related MCP Servers

                • A
                  security
                  F
                  license
                  A
                  quality
                  A template for creating Model Context Protocol (MCP) servers in TypeScript, offering features like container-based dependency injection, a service-based architecture, and integration with the LLM CLI for architectural design feedback through natural language.
                  Last updated -
                  1
                  5
                  TypeScript
                • -
                  security
                  A
                  license
                  -
                  quality
                  A server that helps AI models better understand Vite/Nuxt applications, providing enhanced context awareness for development support.
                  Last updated -
                  467
                  TypeScript
                  MIT License
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that allows management of Netlify sites, enabling users to create, list, get information about, and delete Netlify sites directly from an MCP-enabled environment.
                  Last updated -
                  JavaScript
                  MIT License
                • -
                  security
                  F
                  license
                  -
                  quality
                  A TypeScript framework for building Model Context Protocol (MCP) servers with automatic discovery and loading of tools, resources, and prompts.
                  Last updated -
                  67
                  TypeScript
                  • Apple

                View all related MCP servers

                ID: p86z0ph6jw