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.
This package is pinned to@modelcontextprotocol/sdk@1.12.0 to ensure compatibility and stability. Using a different version may cause unexpected behavior.
Installation
Related MCP server: Bankless Onchain MCP Server
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