Neon MCP server
Last verified: 2026-09
Manage and query Neon Postgres.
Community Databases & data Needs a secret Claude Desktop, Cursor, Windsurf, Claude Code, VS Code
What it does
Neon's official MCP: orgs, projects, branches, and SQL on those branches. Has a read-only mode and a hosted OAuth URL. Prefer read-only until you want it creating branches.
It sits in Databases & data: A database MCP is SQL or an API with your credentials.
Good for
- List Neon projects and inspect a branch before touching prod.
- run_sql on a non-prod branch with a LIMIT.
- Describe table schema / inspect_database when onboarding a project.
- Explain or find slow queries on a branch you are allowed to profile.
Tools
- list_organizations / describe_branch — See the Neon account.
- get_database_tables / describe_table_schema / inspect_database — Schema.
- run_sql / run_sql_transaction / explain_sql_statement — Query a branch.
- list_slow_queries / get_neon_auth_config — Ops extras.
Config (Claude Desktop / Cursor / Windsurf)
Paste the JSON below. Same mcpServers shape. Replace placeholder paths and secrets.
Windows paths look like C:\\Users\\you\\project, not /path/to.
Host-side steps →
Claude Desktop
| OS | Config file |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json
(usually C:\Users\<you>\AppData\Roaming\Claude\) |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Cursor
| Scope | macOS / Linux | Windows |
|---|---|---|
| This project | .cursor/mcp.json in the repo root | |
| This user | ~/.cursor/mcp.json |
%USERPROFILE%\.cursor\mcp.json |
Windsurf
| OS | Config file |
|---|---|
| macOS / Linux | ~/.codeium/windsurf/mcp_config.json |
| Windows | %USERPROFILE%\.codeium\windsurf\mcp_config.json |
{
"mcpServers": {
"neon": {
"command": "npx",
"args": [
"-y",
"@neondatabase/mcp-server-neon"
],
"env": {
"NEON_API_KEY": "napi_..."
}
}
}
}
Windsurf remote MCP: use serverUrl instead of url if the block below is HTTP.
One-liner: npx -y @neondatabase/mcp-server-neon
Secrets it wants: NEON_API_KEY
How to get started
- Create a Neon API key. Start with the read-only / scoped URL in their docs if you can.
- Ask it to list projects, then run_sql with a LIMIT on a non-prod branch.
- Do not point it at the production branch for writes.
Access risk
A full API key can create/delete projects and run SQL on prod. Scope it.
When to skip it
Skip it if you already have a Postgres connection string (official Postgres server) and do not need Neon branching.
Instead: PostgreSQL, Supabase, SQLite.
Vs alternatives
| Server | Official? | Needs a secret? | Best for |
|---|---|---|---|
| Neon | No | Yes | Manage and query Neon Postgres. |
| PostgreSQL | Yes | Yes | Run SQL against a Postgres database. |
| Supabase | No | Yes | Talk to a Supabase project: tables, auth, edge functions. |
| SQLite | Yes | No | Query a local SQLite file. |
More in Databases & data
FAQ
API key or just a Postgres URL?
NEON_API_KEY talks to Neon's management API and SQL on branches. If you only need SQL, the official Postgres server plus a branch URL is smaller.
Read-only?
Neon documents scopes and a read-only / hosted OAuth URL. Use that until you want it creating branches.
Can it delete a project?
A full API key can. Scope it.
Neon or Supabase?
Both are Postgres-plus-admin. Pick the vendor you already use.