Skip to main content
Glama
msabramo

Vercel MCP Server

by msabramo

Vercel MCP Server

A Model Control Protocol (MCP) server deployed on Vercel that provides a dice rolling tool.

Getting Started

Local Development

  1. Install dependencies:

    npm install
  2. Run the development server:

    npm run dev
  3. Your MCP server will be available at http://localhost:3000/api/mcp

Deploy to Vercel

  1. Push your code to a GitHub repository

  2. Connect your repository to Vercel

  3. Deploy with a single click

  4. Your MCP server will be available at https://your-project.vercel.app/api/mcp

Related MCP server: Vercel MCP Template

Available Tools

roll_dice

Rolls an N-sided die and returns the result.

Parameters:

  • sides (number): The number of sides on the die (minimum 2)

Example Response:

{
  "content": [
    {
      "type": "text",
      "text": "šŸŽ² You rolled a 4!"
    }
  ]
}

Connecting to MCP Hosts

Claude Desktop

Add the following to your Claude Desktop configuration:

{
  "mcpServers": {
    "vercel-mcp": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/server-fetch",
        "https://your-project.vercel.app/api/mcp"
      ]
    }
  }
}

Cursor

In Cursor, you can connect to your MCP server through the MCP settings by adding:

  • Server URL: https://your-project.vercel.app/api/mcp

Testing

You can test your MCP server by making HTTP requests to the endpoint. The server accepts MCP protocol messages over HTTP.

Project Structure

vercel-mcp/
ā”œā”€ā”€ app/
│   └── api/
│       └── mcp/
│           └── route.ts    # MCP handler implementation
ā”œā”€ā”€ package.json
ā”œā”€ā”€ next.config.js
ā”œā”€ā”€ tsconfig.json
└── README.md

Next Steps

  • Add more tools to your MCP server

  • Customize the dice rolling tool

  • Deploy to production on Vercel

  • Connect to your favorite MCP host (Claude, Cursor, etc.)

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A template for deploying MCP servers on Vercel with example tools for rolling dice and getting weather data. Provides a foundation for building custom MCP servers with tools, prompts, and resources that can be deployed to Vercel's serverless platform.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A template for deploying MCP servers on Vercel with serverless functions. Includes example tools for rolling dice and fetching weather data to demonstrate basic tool implementation and API integration patterns.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A template for deploying MCP servers on Vercel with example tools for rolling dice and fetching weather data. Provides a starting point for building custom MCP servers with TypeScript.
    MIT