Vercel 上の Nuxt MCP サーバー
これは@vercel/mcp-adapterを使用して Vercel 上で MCP サーバーとして機能するシンプルな Nuxt アプリケーションです。
使用法
このサンプル アプリは、任意の Nuxt プロジェクト内のルートのグループに MCP サーバーをドロップインできるVercel MCP アダプターを使用します。
MCP TypeScript SDK ドキュメントに従って、ツール、プロンプト、リソースを使用してserver/routes/mcp/[transport].ts更新します。
MCP サーバーは/mcp/[transport] (例: /mcp/sse ) にマウントされます。
設定
依存関係を必ずインストールしてください:
開発サーバー
Redis がローカルで実行されていることを確認します。
別のターミナルでhttp://localhost:3000開発サーバーを起動します。
生産
本番環境用にアプリケーションをビルドします。
ローカルで製品ビルドをプレビューします。
詳細については、デプロイメントのドキュメントを参照してください。
Vercelで実行する場合の注意事項
SSEトランスポートを使用するには、
process.env.REDIS_URLの下のプロジェクトにRedisが接続されている必要があります。効率的な実行のためにFluid Computeが有効になっていることを確認してください
Fluidコンピューティングを有効にした後、
server/routes/mcp/[transport].tsを開き、Vercel ProまたはEnterpriseアカウントを使用している場合はmaxDurationを800に調整します。
サンプルクライアント
script/test-client.mjsには、呼び出しを試すためのサンプル クライアントが含まれています。
クレジット
このプロジェクトは、Next.js MCP テンプレートに基づいています。
This server cannot be installed
Related Resources
Related MCP Servers
- -securityAlicense-qualityMCP server that helps AI models understand Vite/Nuxt applications better, available as both a Nuxt module and Vite plugin.Last updated -MIT License
- -securityAlicense-qualityA drop-in MCP server implementation for Next.js projects using Vercel MCP Adapter, allowing developers to integrate model context protocol functionality with custom tools, prompts, and resources.Last updated -MIT License
- -securityAlicense-qualityA sample implementation of a Model Context Protocol server using Next.js and the Vercel MCP Adapter, allowing developers to create AI assistants with custom tools and resources.Last updated -MIT License
- -securityAlicense-qualityA template for running Model Context Protocol servers on Vercel with Redis support, allowing developers to deploy their custom tools, prompts, and resources using the MCP TypeScript SDK.Last updated -MIT License