Bringing MCP to the Cloud
Blog post from Neon
Neon has developed a remote Model Context Protocol (MCP) server that allows AI agents to interact with the Neon Postgres platform using natural language commands. The server uses Server-Sent Events (SSE) for communication and integrates OAuth 2.1 for secure authentication, addressing previous issues with manual installation and API key management. The remote server architecture leverages SSE for server-to-client messages and HTTP POST for client-to-server communication, enabling AI agents to execute commands like creating projects or managing databases. The server operates as both an OAuth client and server, allowing users to authorize the MCP server without sharing API keys directly. Deployment was facilitated using a Docker image on Fly, with the potential for exploring other platforms in the future. Although the remote server simplifies installation, challenges remain, such as dependency on Node.js and handling refresh tokens, which are being addressed to enhance user experience and broaden adoption.