Neon MCP
The Neon MCP Server lets AI agents and dev tools interact with your Neon Postgres databases by translating natural language into Neon API calls. Use it from Cequence AI Gateway to manage projects, branches, and databases; run SQL; and handle migrations and query performance tuning—all through conversational commands.
1. Overview
Neon MCP is a remote, vendor-hosted MCP server provided by Neon. You connect to it from Cequence AI Gateway; no local installation is required for the remote server.
- Server URL:
https://mcp.neon.tech/mcp - Transport: HTTP (Streamable HTTP). For clients that do not support Streamable HTTP, SSE is available at
https://mcp.neon.tech/sse(OAuth only; not with API key). - Hosted by: Neon
Neon recommends using the MCP server for development and testing only, not production. Always review and authorize actions requested by the LLM before execution.
2. Supported authentication types
| Type | Supported | Notes |
|---|---|---|
| OAuth 2.0 | Yes | Recommended for Cequence AI Gateway. Uses Dynamic Client Registration (DCR); no need to create an OAuth app in Neon. When you connect, an OAuth window opens to authorize access to your Neon account. |
| API key | Yes | For remote agents or when OAuth is not available. Use a Neon API key in the Authorization: Bearer <NEON_API_KEY> header. Organization API keys limit access to organization projects only. |
| Read-only mode | Yes | Add the header x-read-only: true to restrict operations to read-only tools and run SQL in read-only transactions. Useful for safe querying and analysis. |
When you add Neon MCP in Cequence AI Gateway, authentication is typically OAuth 2.0 with DCR. For automation or restricted access, you can use an API key; for safe cloud environments, enable read-only mode if your client supports custom headers.
3. What can you do with this MCP server
With the Neon MCP server, you can:
- Manage projects and branches — Create and manage Neon projects and branches with natural language.
- Run SQL and manage schema — Execute SQL queries and make schema changes without writing code by hand.
- Handle branch-based migrations — Use branch-based workflows for safer schema modifications.
- Performance tuning — Get help with query performance and database tuning.
- Explore resources — List projects, show tables in a database, search across Neon resources (e.g. “Search for ‘production’ across my Neon resources”).
- Get started — Ask your AI assistant to “Get started with Neon” to launch the interactive onboarding guide.
See Neon MCP Server and Connect MCP clients to Neon for full capabilities and client-specific setup.
4. Prerequisites
Before adding Neon MCP in Cequence AI Gateway, ensure you have:
- Access to Cequence AI Gateway (e.g. beta.aigateway.cequence.ai)
- A Neon account with the projects and databases you want to manage
- For OAuth authentication: an auth app with client credentials in your vendor account, unless the server supports Dynamic Client Registration (DCR). Neon MCP supports DCR, so you typically do not need to create an OAuth app in Neon.
- For API key: a Neon API key if you use API key auth (e.g. for remote agents).
Security: Use MCP only for local development or IDE-based workflows. Do not connect MCP agents to production databases. Avoid exposing production or PII data; always review and authorize LLM-requested actions before execution.
5. Example workflows
- “Get started with Neon” — Launch the interactive onboarding guide.
- “List my Neon projects.”
- “Create a project named ‘my-app’.”
- “Show tables in database ‘main’.”
- “Search for ‘production’ across my Neon resources.”
- “SELECT * FROM users LIMIT 10” (natural language or direct SQL).
- “Create a database named ‘my-new-database’.”
6. Connecting MCP server from Cequence AI Gateway
- Log in to Cequence AI Gateway.
- Choose your tenant.
- Go to App catalogue.
- Filter by Remote MCP server.
- Search for Neon MCP and then select it.
- Click Create MCP server.
- Choose auth method. If OAuth, you need an auth app with client credentials in your vendor account (see Prerequisites). Neon supports DCR, so OAuth setup is usually straightforward.
- Complete the setup as prompted, select tools, and deploy.
Use the generated MCP server URL in your client as described in the Client Configuration docs. For detailed UI steps and screenshots, see Create a third-party MCP Server.
7. Additional information
- Read-only mode: To restrict to read-only operations, add the header
x-read-only: truewhen your client supports custom headers. SQL then runs in read-only transactions. - SSE: For clients that do not support Streamable HTTP, use
https://mcp.neon.tech/sse. SSE is not supported with API key authentication. - Security guidance: Use MCP for development and testing only. Restrict access to trusted users and audit access regularly. See Neon MCP security guidance.
- Official documentation: Neon MCP Server, Connect MCP clients to Neon, Neon API Reference, MCP Protocol.