The Neon MCP Server implements the Model Context Protocol (MCP), letting AI assistants interact with your Neon projects on your behalf. Your AI agent can interact with Neon via MCP tools or by running Neon CLI commands directly.
Security
The Neon MCP Server grants broad database management capabilities. Always review and authorize actions requested by the LLM before execution. Restrict access to trusted users only. See MCP security guidance.
Quick setup
npx neon@latest initRuns neon init via npx to configure MCP and other integrations for your editor. If you only want the MCP server, use the config generator below.
Config generator
Use the generator to build an MCP config for your editor, auth method, and transport, including the Authorization header for API key or remote agent setups.
Configuration
Pick which capability groups the agent can access. Unselected categories are excluded via the category query param.
Result
npx add-mcp@latest https://mcp.neon.tech/mcp \
--name Neon{
"mcpServers": {
"Neon": {
"type": "http",
"url": "https://mcp.neon.tech/mcp"
}
}
}Access control
The Neon MCP Server supports URL parameters to restrict scope and permissions. Append them to the MCP URL (https://mcp.neon.tech/mcp).
Read-only mode
Append ?readonly=true to restrict the server to read operations:
https://mcp.neon.tech/mcp?readonly=trueSELECT queries and schema inspection remain available. Write operations (creating branches, running migrations, modifying auth config) are disabled.
With OAuth, you can also choose read-only scope during the authorization flow instead of using the URL parameter.
Project-scoped mode
Scope all operations to a single project:
https://mcp.neon.tech/mcp?projectId=<your-project-id>Cross-project search and navigation are disabled in this mode.
Category filtering
Restrict active tools to specific categories using ?category=<name> (repeatable):
https://mcp.neon.tech/mcp?category=querying&category=schemaSee Available tools for the full category list. To verify which tools are active for a given config without authenticating:
curl "https://mcp.neon.tech/api/list-tools?readonly=true&category=querying"MCP security guidance
We recommend MCP for development and testing only, not production environments.
- Use MCP only for local development or IDE-based workflows
- Never connect MCP agents to production databases
- Avoid exposing production or PII data; use anonymized data only
- Always review and authorize LLM-requested actions before execution
- Restrict MCP access to trusted users and regularly audit access
Allowlist IP addresses
The hosted Neon MCP Server (mcp.neon.tech) connects to your Neon databases from the following static IP addresses:
34.192.103.4623.22.233.166
If IP Allow is enabled on your project, add these addresses to your allowlist so the MCP server can connect.
Available tools
Tools are grouped into categories. Use the ?category= URL parameter to restrict which categories are active. You can pass it more than once to enable multiple categories.
| Category | What it enables |
|---|---|
Project management (projects) | List, create, describe, and delete projects and organizations |
Branch management (branches) | Create branches, compare schemas, reset branches to parent state |
Schema (schema) | Inspect tables and columns; run schema changes via a safe temporary branch workflow |
SQL (querying) | Execute queries and transactions; inspect database structure |
Neon Auth (neon_auth) | Set up and configure app authentication for a branch |
Neon Data API (data_api) | Enable HTTP-based Data API access for a branch |
Documentation (docs) | Look up Neon documentation from within your assistant (no OAuth required) |
Search and navigation tools (search across projects, fetch resource details by ID) are available by default but disabled in project-scoped mode.
Troubleshooting
If your client doesn't support JSON for MCP server configuration (such as older versions of Cursor), use this command when prompted:
npx -y @neondatabase/mcp-server-neon start <YOUR_NEON_API_KEY>For per-client setup instructions, see Connect MCP clients.
note
For clients that don't support Streamable HTTP, you can use the deprecated SSE endpoint: https://mcp.neon.tech/sse. SSE is not supported with API key authentication.
Resources
Need help?
Join our Discord Server to ask questions or see what others are doing with Neon. For paid plan support options, see Support.








