Neon MCP Server

  • Connector
  • Official

Neon's official MCP server lets Claude create Postgres projects and branches, run SQL, and plan schema migrations on a safe copy first.

On this page8 sections

Best for

  • Spinning up a Postgres database by asking for one
  • Testing schema changes on a branch before touching main
  • Querying your data in plain English

Quick install

Remote server at https://mcp.neon.tech/mcp (OAuth or Neon API key)

  1. Claude Code (OAuth):

    claude mcp add --transport http neon https://mcp.neon.tech/mcp

    , then start a new claude session or run /mcp to sign in.

  2. Claude Code (API key):

    claude mcp add --transport http neon https://mcp.neon.tech/mcp --header "Authorization: Bearer <YOUR_NEON_API_KEY>"
  3. Or run

    npx neon@latest init

    in your project folder to set up the MCP server and Neon's agent tooling automatically.

  4. claude.ai or Claude Desktop: Settings > Connectors > Browse connectors, find Neon, add it and complete the OAuth flow.

  5. For read-only access, use https://mcp.neon.tech/mcp?readonly=true or untick Allow writes on the authorization page.

At a glance

Type
Connector
Made by
Neon (official)
Tested by us
Not yet
Works with
  • Claude.ai
  • Claude Desktop
  • Claude Code
Sign-in needed
YesOAuth sign-in to Neon (personal account by default) or a Neon API key. Organization accounts are easiest with an API key.
Cost
Neon's README does not list a separate MCP charge; resources Claude creates count against your Neon plan.
License
MIT
Registry name
com.neon/mcp
Facts checked

What it does (plain English)

Neon is a hosted Postgres database that can make instant “branches”: full copies of your database you can experiment on without touching the real one. The Neon MCP server (a plug-in that gives Claude a new ability) lets Claude manage that for you. It can list and create projects, create and delete branches, run SQL, describe tables, compare schemas between branches, and walk through a migration or query-tuning plan before applying it.

Neon hosts the server at https://mcp.neon.tech/mcp, so you don’t install or update anything. Neon also lists it in Claude’s connector directory.

Is it for you?

Pick it if your app uses Neon, or if you want a Postgres database without learning a dashboard first. The branch workflow is a good fit for non-developers: Claude can try a schema change on a branch, show you the difference, and only then apply it to main.

Neon is direct about the limits: “We do not recommend using the Neon MCP Server in production environments.” It is meant for local development and IDE work, because it “can execute powerful operations that may lead to accidental or unauthorized changes.”

What you can do with it

  • Start from nothing: “Create a Neon project called ‘recipes’ and a table for recipes with title, ingredients and prep time.”
  • Change the schema safely: “Add a rating column to recipes.” The migration tools prepare the change on a temporary branch, and complete_database_migration applies it once you approve.
  • Ask your data questions: “How many recipes take under 20 minutes?” through run_sql.
  • Spot slow queries: list_slow_queries finds the slowest queries (it needs the pg_stat_statements extension), and prepare_query_tuning suggests fixes such as new indexes, testing them on a temporary branch first.
  • Health check: inspect_database runs one of 15 predefined read-only Postgres diagnostics, such as index usage, cache hit rate and bloat.

How to set it up

  1. Claude Code with OAuth (simplest):

    claude mcp add --transport http neon https://mcp.neon.tech/mcp

    Start a new claude session to trigger the sign-in, or run /mcp inside Claude Code. Then try “List my Neon projects.”

  2. Claude Code with an API key (useful for organization accounts). Create a key in the Neon Console, then:

    claude mcp add --transport http neon https://mcp.neon.tech/mcp \
        --header "Authorization: Bearer <YOUR_NEON_API_KEY>"
  3. One-command setup: in your project folder run npx neon@latest init. It installs Neon’s agent tooling and links a Neon project. The Neon CLI needs Node.js 20.19.0 or later (agent skills need 22.20 or later). Restart Claude Code afterwards.

  4. claude.ai or Claude Desktop: open Settings > Connectors, click Browse connectors, find Neon, add it and complete the OAuth flow. Neon notes Claude connectors don’t support API-key auth; for that, use the mcp-remote config in Neon’s Desktop guide.

  5. Read-only and scoping. Add options to the URL, for example:

    https://mcp.neon.tech/mcp?readonly=true&projectId=my-project-id

    With the default URL, the authorization page also lets you untick Allow writes, choose one project, and pick a Postgres role.

Watch out for

  • SQL runs as the database owner unless you pin a role. Neon lets you add roleName=app_reader to the URL so every query logs in as a limited Postgres role.
  • Read-only mode still allows run_sql, but wraps each query in a READ ONLY transaction. run_sql_transaction and get_connection_string are hidden in read-only mode.
  • OAuth defaults to your personal account. To work on an organization’s projects, include the org_id or project_id in your prompt, or use an organization API key.
  • IP Allow users: add Neon MCP’s static IPs 34.192.103.46 and 23.22.233.166 to your allowlist.
  • Changing the URL later doesn’t widen an OAuth grant. Re-authorize if you switch from read-only to write.

Alternatives

  • Supabase MCP if you also want auth, storage and Edge Functions in one platform.
  • Airtable MCP for a no-SQL, spreadsheet-style database.
  • Cloudflare API MCP if you’re on Cloudflare D1.

Sources

Facts checked against these sources on . Page updated . How we check facts

  1. github.com/neondatabase/mcp-server-neon (opens in a new tab)
  2. raw.githubusercontent.com/neondatabase/mcp-server-neon/main/README.md (opens in a new tab)
  3. neon.com/guides/claude-code-mcp-neon (opens in a new tab)
  4. neon.com/guides/neon-mcp-server (opens in a new tab)
  5. registry.modelcontextprotocol.io/v0.1/servers/com.neon%2Fmcp/versions/latest (opens in a new tab)
  • Supabase MCP Server

    by Supabase

    • MCP server
    • Official

    Supabase's hosted MCP server lets Claude design tables, run SQL, read logs and deploy Edge Functions in your Supabase projects.

    Works with
    • Claude.ai
    • Claude Desktop
    • Claude Code
  • Notion MCP

    by Notion

    • MCP server
    • Official

    Notion's hosted MCP server lets Claude search your workspace, read pages as Markdown, and create or update pages and databases you can access.

    Works with
    • Claude.ai
    • Claude Desktop
    • Claude Code
  • Airtable MCP Server

    by Airtable

    • Connector
    • Official

    Airtable's official MCP server lets Claude search and update records, build new bases and interfaces, and draft automations in your Airtable.

    Works with
    • Claude.ai
    • Claude Code
  • Excel spreadsheets (xlsx) skill

    by Anthropic

    • Skill
    • Official

    Anthropic's skill for building and fixing Excel files with live formulas, zero formula errors and finance-style formatting, verified by a recalculation step.

    Works with
    • Claude.ai
    • Claude Desktop
    • Claude Code