mcpField
E
Example MCP Server built on Next.js

Example MCP Server built on Next.js

Local
github.com/MarkArmsrongDeveloper Tools1Updated 78w ago

About Example MCP Server built on Next.js

Example MCP Server built on Next.js is a starter template for building MCP servers with Next.js. Developers can define tools, prompts, and resources in `app/mcp.ts`; it also includes a sample client for testing invocations.

Key features

  1. 01Next.js-based MCP server template
  2. 02Define tools, prompts, and resources
  3. 03Sample client for testing calls
  4. 04Vercel deployment notes

Use cases

  1. 01Prototype an MCP server with Next.js
  2. 02Add custom tools, prompts, and resources
  3. 03Test server invocations with the sample client

MCP support

The project is an MCP server template. It supports defining tools, prompts, and resources in `app/mcp.ts` and includes a sample client for testing calls.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Example MCP Server built on Next.js

Usage

Update app/mcp.ts with your tools, prompts, and resources following the MCP TypeScript SDK documentation.

Notes for running on Vercel

  • Requires a Redis attached to the project under process.env.REDIS_URL
  • Make sure you have Fluid compute enabled for efficient execution
  • After enabling Fluid compute, open app/sse/route.ts and adjust max duration to 800 if you using a Vercel Pro or Enterprise account
  • Deploy the Next.js MCP template

Sample Client

script/test-client.mjs contains a sample client to try invocations.

node scripts/test-client.mjs https://yadathingy-mcp.vercel.app

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.