Skip to content

MCP setupDatabases

Neon MCP Server

Manage Neon Postgres projects and branches from your agent, and test schema changes on a temporary branch before they touch your main data.

npx workspacetemplates add neon-mcp --tool claude-code

Writes 1 file to your project root

.mcp.jsonmerge into your file8 lines · 123 BFile
{
  "mcpServers": {
    "neon": {
      "type": "http",
      "url": "https://mcp.neon.tech/mcp?readonly=true"
    }
  }
}

What it does

Neon's official MCP server lets an agent list projects, create branches, inspect schema, run SQL and explain slow queries. Neon branches are cheap copies, which is what makes its migration tools safe: the change is prepared on a temporary branch and only applied to the main one after you confirm.

This setup uses Neon's hosted endpoint with readonly set in the URL. You sign in through OAuth in the browser, so no key goes into the config. In read-only mode each query runs in a read-only transaction and the transaction and migration tools are not offered. Take the readonly parameter out of the URL once you are ready for the agent to make changes.

Example

you › List my Neon projects, then show the five slowest queries in the orders project.

agent › 2 projects: orders and staging-copy. Slowest in orders: a join on line_items taking 1.8 s on average, with a note that line_items.order_id has no index.

Questions

How does it sign in?
OAuth. Your client opens a browser window the first time and you approve access to your Neon account.
Can I use an API key instead?
Yes. Neon accepts a key as a bearer token in the Authorization header, and an organization key limits access to that organization.
How do I allow changes later?
Drop readonly=true from the URL and authorize again. Neon's migration tools work on a temporary branch first.
  • Convex MCP Server

    MCP setuptypescript

    Free
  • MongoDB MCP Server

    MCP setupDatabases

    Free
  • PlanetScale MCP Server

    MCP setupDatabases

    Free
  • Prisma MCP Server

    MCP setupDatabases

    Free