MCP Catalogs
Home

MCP-Next.js

by sattarrasouli·0·Score 30

A Next.js MCP server with TypeScript that exposes multiple simple tools like dice rolling and greetings via JSON-RPC API.

developer-toolsai-llmother
0
Forks
0
Open issues
7 mo ago
Last commit
2d ago
Indexed

Overview

MCP-Next.js is a reference implementation of an MCP server built with Next.js and TypeScript. It demonstrates how to create and expose multiple interactive tools through a standardized JSON-RPC API. The server includes 8 different tools ranging from simple utilities like dice rolling and number generation to more creative features like random quotes and horoscopes. This implementation uses mcp-handler and @modelcontextprotocol/sdk to establish the MCP protocol interface, making it a good learning resource for developers looking to implement MCP servers.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Learning how to build MCP servers with Next.js
you:Testing MCP tool connectivity with various clients
you:Simple demonstration of MCP protocol implementation
you:What MCP servers does this project implement?
you:How do I test the MCP tools?

When to choose this

Developers looking for a simple Next.js-based MCP server implementation example with TypeScript to understand MCP architecture.

When NOT to choose this

Production environments requiring robust error handling, authentication, and scalability beyond demonstration purposes.

Tools this server exposes

8 tools extracted from the README
  • roll_dice

    Roll an N-sided die.

  • say_hello

    Returns a greeting message.

  • add_numbers

    Adds two numbers.

  • random_number

    Generates a random number between a given min and max.

  • random_quote

    Returns a motivational quote.

  • emoji_reaction

    Responds with a random emoji.

  • color_palette

    Generates a random color palette.

  • horoscope

    Returns a fun horoscope for a zodiac sign.

Comparable tools

mcp-server-starternextjs-mcptypescript-mcp

Installation

# Clone the repository
git clone https://github.com/sattarrasouli/MCP-Next.js.git
cd MCP-Next.js

# Install dependencies
npm install

# Run the development server
npm run dev

The MCP API will be available at http://localhost:3000/api/mcp.

**Claude Desktop Configuration:** Add to claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-nextjs": {
      "command": "npm",
      "args": ["run", "dev"],
      "env": {
        "NODE_PATH": "."
      }
    }
  }
}

FAQ

What MCP servers does this project implement?
This project implements a simple MCP server with 8 tools: Roll Dice, Say Hello, Add Numbers, Random Number, Random Quote, Emoji Reaction, Color Palette, and Horoscope.
How do I test the MCP tools?
You can test the tools using either Postman or curl with JSON-RPC 2.0 format. The API endpoint is available at http://localhost:3000/api/mcp when running the development server.

Compare MCP-Next.js with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.