Skip to main content
Glama
Vercel TypeScript MCP Server

Vercel TypeScript MCP Server

by Th3NerdSage

Vercel TypeScript MCP Server πŸš€

A production-ready Model Context Protocol (MCP) TypeScript Server designed specifically for Vercel Serverless Functions using the Next.js App Router and mcp-handler.


🌟 Why MCP on Vercel?

Traditional MCP servers communicate via stdio (standard input/output for local processes) or long-lived Server-Sent Events (SSE).

On serverless architectures like Vercel, Streamable HTTP Transport provides:

  • Zero persistent server costs: Spins up and down per-request with sub-millisecond cold starts.

  • Global Edge / Serverless deployment: Scalable across worldwide regions with automatic TLS termination.

  • Universal compatibility: Connect from Claude Desktop, Cursor AI, Windsurf, Vercel AI SDK, or any custom MCP client.


Related MCP server: Vercel MCP

πŸ“¦ Features & Capabilities

πŸ› οΈ Built-in Tools

  • calculate: High-precision arithmetic and scientific operations (add, subtract, multiply, divide, power, sqrt).

  • text_analyzer: Computes word counts, character density, sentence structures, and estimated reading time.

  • time_utility: Returns exact UTC timestamps, epoch time, and converts across any IANA timezone.

πŸ“„ Resources

  • system://info: Dynamic server specifications, runtime environment, and operational health.

πŸ’¬ Prompts

  • code_review: Comprehensive prompt template for automated multi-language code audits and refactoring recommendations.


πŸ—οΈ Architecture

               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β”‚    AI Host / Client           β”‚
               β”‚ (Claude Desktop, Cursor, etc) β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                HTTP POST / GET (Streamable HTTP)
                               β”‚
               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
               β”‚     Vercel Edge / Serverless  β”‚
               β”‚   Route: /api/mcp/route.ts    β”‚
               β”‚                               β”‚
               β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
               β”‚   β”‚      mcp-handler       β”‚  β”‚
               β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
               β”‚               β”‚               β”‚
               β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
               β”‚   β”‚ @modelcontextprotocol  β”‚  β”‚
               β”‚   β”‚      TypeScript SDK    β”‚  β”‚
               β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

1. Clone & Install

git clone https://github.com/Th3NerdSage/vercel-mcp-typescript-server.git
cd vercel-mcp-typescript-server
npm install

2. Run Locally

npm run dev

Your MCP server is now live at http://localhost:3000/api/mcp and the dashboard at http://localhost:3000.

3. Test with the Built-in Test Client

npm run test:client

⚑ Deploy to Vercel

Option A: One-Click Vercel CLI

npm install -g vercel
vercel

Option B: Vercel Dashboard

  1. Go to vercel.com/new.

  2. Import Th3NerdSage/vercel-mcp-typescript-server.

  3. Click Deploy.

Your production endpoint will be: https://<your-project>.vercel.app/api/mcp


πŸ”Œ Connecting with AI Clients

1. Claude Desktop (claude_desktop_config.json)

To connect Claude Desktop to your remote Vercel MCP server, use mcp-remote:

{
  "mcpServers": {
    "vercel-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://<your-project>.vercel.app/api/mcp"
      ]
    }
  }
}

2. Cursor AI / Windsurf / VS Code

In Cursor:

  1. Go to Settings -> Features -> MCP.

  2. Click + Add New MCP Server.

  3. Set:

    • Type: command

    • Command: npx -y mcp-remote https://<your-project>.vercel.app/api/mcp

3. Vercel AI SDK Integration

import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { experimental_createMcpTools } from "@ai-sdk/mcp";

const transport = new StreamableHTTPClientTransport(
  new URL("https://<your-project>.vercel.app/api/mcp")
);

const mcpTools = await experimental_createMcpTools({ transport });

πŸ› οΈ Adding New Tools, Resources & Prompts

Edit app/api/mcp/route.ts:

// Register a new Tool
server.registerTool(
  "my_custom_tool",
  {
    title: "My Custom Tool",
    description: "Brief explanation of what this tool does",
    inputSchema: {
      query: z.string().describe("Search query parameter"),
    },
  },
  async ({ query }) => {
    // Your business logic / DB call / API call here
    return {
      content: [
        {
          type: "text",
          text: `Processed query: ${query}`,
        },
      ],
    };
  }
);

πŸ“„ License

MIT Β© Sadman Asad Samir (Th3NerdSage)

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      Not graded
      maintenance
      An MCP server that provides tools for interacting with Vercel API, enabling management of deployments, DNS records, domains, projects, and environment variables through natural language.
      7
      20,008 npm
      19
      -
    • F
      license
      B
      quality
      D
      maintenance
      An MCP server that provides various tools for interacting with the Vercel API, enabling management of deployments, DNS records, domains, projects, and environment variables through natural language commands.
      7
      20
      -