MCP.so
ログイン

Example MCP Server built on Next.js

@MarkArmsrong

Example MCP Server built on Next.js について

MCP Server

基本情報

カテゴリ

その他

ライセンス

MIT license

ランタイム

node

トランスポート

stdio

公開者

MarkArmsrong

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mcp-for-nextjs": {
      "command": "node",
      "args": [
        "scripts/test-client.mjs",
        "https://mcp-for-next-js.vercel.app"
      ]
    }
  }
}

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is Example MCP Server built on Next.js?

This is a template for building Model Context Protocol (MCP) servers using Next.js, designed for serverless deployment on Vercel. It provides scaffolding for tools, prompts, and resources, with an SSE endpoint and Redis integration.

How to use Example MCP Server built on Next.js?

Update app/mcp.ts with your tools, prompts, and resources following the MCP TypeScript SDK documentation. Deploy on Vercel with a Redis instance attached via process.env.REDIS_URL and Fluid compute enabled. A sample client script (scripts/test-client.mjs) is included for testing invocations.

Key features of Example MCP Server built on Next.js

  • Built on Next.js for serverless deployment on Vercel
  • Includes an SSE route for MCP communication
  • Requires Redis for state persistence
  • Supports custom tools, prompts, and resources via MCP SDK
  • Sample client script for testing invocations

Use cases of Example MCP Server built on Next.js

  • Deploying a production MCP server on Vercel
  • Building custom MCP tools with Next.js serverless functions
  • Integrating Redis-backed MCP resources
  • Prototyping MCP interactions with the included test client

FAQ from Example MCP Server built on Next.js

What runtime or dependencies are required?

Requires a Redis instance attached under process.env.REDIS_URL and Vercel Fluid compute enabled for efficient execution.

How do I deploy this server?

Deploy using the Next.js MCP template on Vercel. After enabling Fluid compute, open app/sse/route.ts and adjust max duration to 800 seconds if using a Vercel Pro or Enterprise account.

Where does data live?

Tool state and resource data are stored in the attached Redis instance.

What transport does the server use?

It uses Server-Sent Events (SSE) via the /sse route.

Are there any known limits?

The SSE route has a max duration of 800 seconds on Pro/Enterprise accounts when Fluid compute is enabled.

コメント

「その他」の他のコンテンツ