How to connect Postgres to Cursor
This guide connects Postgres MCP to Cursor. pgEdge publishes the server, which Cursor starts on your machine through Docker, and the listing names no required key. You will add one JSON entry to the MCP config and then check the logs. The entry comes from the listing's install data and Cursor's documentation, last read on 2026-10-26.
Updated Oct 26, 2026 · Built from catalog data; how we rank and grade
Checked against Cursor's documentation on Oct 26, 2026. Commands and config blocks are generated from the same install data as each listing page.
Before you start
- Cursor installed and able to start.
- Docker (the server starts with docker).
- No API key is listed for Postgres MCP.
1. Check what you need
Cursor launches this server through Docker, which makes the version check the first thing to run.
Check that it is installed docker --version- The listing names no required key.
2. Add Postgres MCP to Cursor
A single JSON entry tells Cursor to run
dockerwith the image from the listing. Place it in the project file or in the global file.Add this to .cursor/mcp.json in the project, or to ~/.cursor/mcp.json for every project .cursor/mcp.json{ "mcpServers": { "postgres-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/pgedge/postgres-mcp:latest" ] } } }3. Restart or reload if it does not appear
If Postgres MCP is not visible in Cursor, this step covers the docs' guidance on restarts and tool approval.
- The docs do not say whether editing mcp.json needs a restart. They tell you to restart Cursor after updating files of a custom local server.
- Cursor asks for approval before an agent uses an MCP tool unless you allowlist it.
Check that it works
Open the MCP Logs channel. Once the server is connected, Cursor should list its tools; the catalog records 11, including authenticate_user.
- Open the Output panel (Cmd+Shift+U on macOS), choose MCP Logs, and look for connection errors. A working server lists its tools under Available Tools; agent mcp list shows connection state from the terminal.
- Once it is connected, Cursor should list its tools; the catalog records 11 for Postgres MCP, including authenticate_user, count_rows and execute_explain.
Troubleshooting
- A server fails or an npm-based server misbehaves after an update
- Check the MCP Logs channel in the Output panel. For npm-based servers the docs suggest removing the server, running npm cache clean --force, and adding it again. Source
Security notes
- Publisher: pgEdge, not listed as the vendor's own server; license PostgreSQL.
- It runs on your machine with your user account's permissions, so it can reach any file or network resource you can. Read its source before you give it access: https://github.com/pgEdge/pgedge-postgres-mcp.
- The listing declares no required keys; use a token with the narrowest scope if the service asks for one.
- This listing has no security grade: Agent Market has not published security grades yet, so the choice is yours to make from the source and the permissions.
Servers and skills in this guide
Related pages cover other Postgres servers, a comparison, and the general Cursor guide.
- 1Postgres MCP
pgEdge
Enterprise PostgreSQL MCP server with NL queries, hybrid search (pgvector+BM25), and web UI
★ 240Last active Sep 28, 2026Local (stdio)Claude Code, Codex, VS Code, Cursor +2
AFreshness: A–Security: not graded yet
Related
Sources
- MCP Configuration Reference · fetched Oct 26, 2026
- MCP CLI Reference · fetched Oct 26, 2026
Cite this page
How to connect Postgres to Cursor. Agent Mart. https://agentmart.dev/guides/connect-postgres-to-cursor (last updated 2026-10-26)