Understand the Remote Server Architecture
mainThe Neon MCP Server can be used as a remote hosted service running at mcp.neon.tech. It is implemented as a Next.js App Router application on Vercel.
Key architectural components include:
- Transport Endpoints: Located at
/mcp(Streamable HTTP) and/sse(Server-Sent Events). - OAuth Flow: Endpoints at
/api/authorize,/api/callback,/api/token, and/api/revokemanage user authentication. - Discovery: OAuth metadata is available via
.well-known/endpoints. - Core Logic: The MCP server, tools, and handlers reside in the
mcp/directory, while Next.js helpers are inlib/.