Skip to main content
Glama

Vercel MCP Adapter

route.ts677 B
import createMcpRouteHandler from '../dist/next/index'; const handler = createMcpRouteHandler( server => { server.tool('echo', 'Echo a message', {}, async () => { return { content: [ { type: 'text', text: 'Hello, world!', }, ], }; }); }, // Optional: Comes from the McpServer.options { capabilities: {}, }, // Optional: Comes from the createMcpRouteHandler config { streamableHttpEndpoint: '/mcp', sseEndpoint: '/sse', sseMessageEndpoint: '/message', basePath: '/api/mcp', redisUrl: process.env.REDIS_URL, } ); export { handler as GET, handler as POST };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/brunobenavent/mcp-vercel'

If you have feedback or need assistance with the MCP directory API, please join our Discord server