Run an MCP Server on Vercel

by npstorey

189 downloads
Not rated
GitHub

Description

# Run an MCP Server on Vercel ## Usage Update `api/server.ts` with your tools, prompts, and resources following the [MCP TypeScript SDK documentation](https://github.com/modelcontextprotocol/typescript-sdk/tree/main?tab=readme-ov-file#server). [There is also a Next.js version of…

About

# Run an MCP Server on Vercel ## Usage Update `api/server.ts` with your tools, prompts, and resources following the [MCP TypeScript SDK documentation](https://github.com/modelcontextprotocol/typescript-sdk/tree/main?tab=readme-ov-file#server). [There is also a Next.js version of this…

Details

Author
npstorey
Downloads
189
Categories
Cloud Service

- Deploy MCP servers on Vercel Functions
- Built with the MCP TypeScript SDK
- Requires Redis for state persistence
- Fluid compute for efficient execution
- Configurable invocation duration up to 800 seconds

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Run an MCP Server on Vercel
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Update api/server.ts to define custom tools, prompts, and resources following the MCP TypeScript SDK. Deploy the project on Vercel with a Redis instance set as process.env.REDIS_URL, enable Fluid compute, and optionally adjust vercel.json max duration to 800 seconds for Pro or Enterprise accounts. A sample client script (scripts/test-client.mjs) is provided for testing invocations.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "run an mcp server on vercel": {
            "opengov-mcp-server-vercel": {
                "command": "node",
                "args": [
                    "scripts/test-client.mjs",
                    "https://mcp-on-vercel.vercel.app"
                ]
            }
        }
    }
}

McpServers

{
    "opengov-mcp-server-vercel": {
        "command": "node",
        "args": [
            "scripts/test-client.mjs",
            "https://mcp-on-vercel.vercel.app"
        ]
    }
}

Run an MCP Server on Vercel

Usage

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

There is also a Next.js version of this template

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 vercel.json and adjust max duration to 800 if you using a Vercel Pro or Enterprise account
- Deploy the MCP template

Sample Client

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

node scripts/test-client.mjs https://mcp-on-vercel.vercel.app
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.