Enables Windsurf (by Codeium) to connect to the MCP server through a configuration file for enhanced AI capabilities
Provides a Next.js adapter for implementing MCP handlers in API routes, with support for tools and real-time communication
Optional integration for SSE transport resumability, enhancing reliability of server-sent events connections
@vercel/mcp-adapter
A Vercel adapter for the Model Context Protocol (MCP), enabling real-time communication between your applications and AI models. Currently supports Next.js with more framework adapters coming soon.
Warning
This package is pinned to @modelcontextprotocol/sdk@1.12.0
to ensure compatibility and stability. Using a different version may cause unexpected behavior.
Installation
Next.js Usage
Integrating into your client
When you want to use it in your MCP client of choice:
Claude Desktop
In order to add an MCP server to Claude Desktop you need to edit the configuration file located at:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json If it does not exist yet, you may need to enable it under Settings > Developer.
Restart Claude Desktop to pick up the changes in the configuration file. Upon restarting, you should see a hammer icon in the bottom right corner of the input box.
Cursor
The configuration file is located at ~/.cursor/mcp.json.
As of version 0.48.0, Cursor supports unauthed SSE servers directly. If your MCP server is using the official MCP OAuth authorization protocol, you still need to add a "command" server and call mcp-remote.
Windsurf
The configuration file is located at ~/.codeium/windsurf/mcp_config.json.
Usage in your app
- Use the MCP client in your application:
Configuration Options
The initializeMcpApiHandler
function accepts the following configuration options:
Features
- Framework Support: Currently supports Next.js with more framework adapters coming soon
- Multiple Transport Options: Supports both Streamable HTTP and Server-Sent Events (SSE) transports
- Redis Integration: For SSE transport resumability
- TypeScript Support: Full TypeScript support with type definitions
Requirements
- Next.js 13 or later (for Next.js adapter)
- Node.js 18 or later
- Redis (optional, for SSE transport)
License
Apache-2.0
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables real-time communication between applications and AI models using the Model Context Protocol, supporting features like custom tools and multiple transport options for Next.js applications.
Related MCP Servers
- -securityAlicense-qualityA FastAPI-based implementation of the Model Context Protocol that enables standardized interaction between AI models and development environments, making it easier for developers to integrate and manage AI tasks.Last updated 3 months ago10PythonMIT License
- AsecurityFlicenseAqualityImplements the Model Context Protocol to allow AI models to access and interact with blockchain data, including reading contract states, retrieving events, and accessing transaction information across various networks.Last updated 6 days ago1057054TypeScript
- -securityFlicense-qualityA demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.Last updated 4 months agoPython
- -securityFlicense-qualityA Model Context Protocol server that provides AI models with structured access to external data and services, acting as a bridge between AI assistants and applications, databases, and APIs in a standardized, secure way.Last updated 2 months ago1Python