Setting up the Neon MCP with Claude Code snack

Want to wire up your Claude Max subscription to pound your Postgres database for a vibe-coding extravaganza? Here’s the quick rundown:

Steps

  1. Create a .mcp.json file in your project root.

  2. Add the Neon MCP configuration:

{
  "mcpServers": {
    "Neon": {
      "command": "npx",
      "args": ["-y", "mcp-remote@latest", "https://mcp.neon.tech/mcp"]
    }
  }
}
  1. Exit and restart Claude Code to load the MCP server (Ctrl+C or Cmd+C, then run claude again)

  2. When Claude starts back up again you should be redirected to Neon’s MCP OAuth flow. Give the MCP permissions to access your Neon Project.

  3. Use Claude to query your Neon database directly. I’ve found it’s helpful to specify the project-id and current branch-id if you use Neon for multiple projects or use dev branches. Helps the MCP skip a couple steps.

Extra Credit

Using Cursor? If you’ve already been using MCPs w/ Cursor for an existing project and want to share your mcp tools w/ Claude. Create a symlink between .cursor/mcp.json and your new .mcp.json.

Before creating the symlink, decide which file should be your “source of truth” and symlink accordingly

e.g. ln -s .mcp.json .cursor/mcp.json (makes .cursor/mcp.json point to .mcp.json)

Resources