Menu
Important
Stay updated on React2Shell

Deploy MCP servers to Vercel

Last updated November 19, 2025

Deploy your Model Context Protocol (MCP) servers on Vercel to take advantage of features like Vercel Functions, OAuth, and efficient scaling for AI applications.

Vercel provides the following features for production MCP deployments:

Use the package and create the following API route to host an MCP server that provides a single tool that rolls a dice.

This assumes that your MCP server application, with the above-mentioned API route, runs locally at .

  1. Run the MCP inspector:
  1. Open the inspector interface:
    • Browse to where the inspector runs by default
  2. Connect to your MCP server:
    • Select Streamable HTTP in the drop-down on the left
    • In the URL field, use
    • Expand Configuration
    • In the Proxy Session Token field, paste the token from the terminal where your MCP server is running
    • Click Connect
  3. Test the tools:
    • Click List Tools under Tools
    • Click on the tool
    • Test it through the available options on the right of the tools section

When you deploy your application on Vercel, you will get a URL such as .

Using Cursor, add the URL of your MCP server to the configuration file in Streamable HTTP transport format.

You can now use your MCP roll dice tool in Cursor's AI chat or any other MCP client.

The provides built-in OAuth support to secure your MCP server. This ensures that only authorized clients with valid tokens can access your tools.

To add OAuth authorization to the MCP server you created in the previous section:

  1. Use the function to wrap your MCP handler
  2. Implement token verification logic
  3. Configure required scopes and metadata path

To comply with the MCP specification, your server must expose a metadata endpoint that provides OAuth configuration details. Among other things, this endpoint allows MCP clients to discover, how to authorize with your server, which authorization servers can issue valid tokens, and what scopes are supported.

  1. In your directory, create a folder.
  2. Inside this directory, create a subdirectory called .
  3. In this subdirectory, create a file with the following code for that specific route.
  4. Replace the URL with your own Authorization Server (AS) Issuer URL.

To view the full list of values available to be returned in the OAuth Protected Resource Metadata JSON, see the protected resource metadata RFC.

MCP clients that are compliant with the latest version of the MCP spec can now securely connect and invoke tools defined in your MCP server, when provided with a valid OAuth token.

Learn how to deploy MCP servers on Vercel, connect to them using the AI SDK, and explore curated lists of public MCP servers.


Was this helpful?

supported.