Live schema context
Cursor can inspect tables, columns, relationships, indexes, and generated descriptions before writing SQL.
Cursor / PostgreSQL / remote MCP
Give Cursor your live schema and approved database tools through a hosted MCP link. Keep PostgreSQL credentials out of mcp.json, choose read-only or custom access, and see every query Cursor runs.
tools/call → productionPOLICY CHECKEDThe production path
Cursor writes better SQL when it can inspect the real schema instead of guessing table names, columns, and relationships from application code. DataMCP exposes schema discovery and query tools through Cursor's native MCP support.
Unlike a local PostgreSQL MCP process, the hosted connection keeps the database password outside the developer machine. Create a separate MCP link for the project, define what it may do, and revoke it without rotating the underlying PostgreSQL credentials.
Looking for the exact configuration file and setup sequence? Start with the complete Cursor MCP setup guide, then follow the Cursor PostgreSQL tutorial for the database workflow.
What you get
Cursor can inspect tables, columns, relationships, indexes, and generated descriptions before writing SQL.
Connect with one HTTPS endpoint instead of starting Node.js, Docker, or another local server process.
Use read-only, read-write, full, or custom table-level permissions for the link assigned to Cursor.
The PostgreSQL password stays encrypted server-side and never appears in .cursor/mcp.json.
Give each codebase or environment a distinct MCP link with its own policy and revocation path.
Review executed SQL, timing, row count, status, connection, and permission denials in one activity view.
Source to controlled MCP link
Connect the source once. DataMCP handles discovery, hosted transport, client authentication, and link policy.
Read the setup guideAdd the database once and let DataMCP discover its schema, relationships, and available tools.
Choose the database permissions and copy the generated remote MCP configuration.
Place the server entry in project or global mcp.json and verify the tools in Cursor settings.
Build or use datamcp
See what stays on your engineering backlog when the MCP runtime and control layer are managed for you.
Command, package, runtime, and arguments
Local config or environment variable
Usually one PostgreSQL role
Rotate shared credentials
Build from local and database logs
Frequently asked questions
Clear answers about architecture, access, credentials, and supported clients.
Cursor connects to a remote DataMCP endpoint using its MCP configuration. DataMCP authenticates the link, provides schema tools, validates query permissions, runs approved SQL against PostgreSQL, and returns the result to Cursor.
Add the remote MCP server to .cursor/mcp.json for a project-specific connection or to ~/.cursor/mcp.json for a global connection. Project configuration is usually safer for database access because it keeps the connection scoped to the relevant codebase.
No. Cursor receives the hosted MCP endpoint and its authentication details. The PostgreSQL connection string remains encrypted on DataMCP and is never written into Cursor's MCP configuration.
Yes. Create a read-only MCP link to allow SELECT queries while blocking writes and DDL. Custom table-level permissions can narrow different parts of the schema to specific operations.
No. Cursor supports remote HTTP MCP servers, so DataMCP runs the server and transport. Cursor connects to the hosted HTTPS endpoint directly.
Yes. The DataMCP Free plan includes one PostgreSQL connection and one MCP link, enough to verify schema discovery, an allowed read-only query, and a denied write before expanding the setup.
Keep exploring
Configure local and remote MCP servers in mcp.json, verify tools, and troubleshoot common connection errors.
GUIDECompare current GitHub, documentation, browser, design, workspace, provider, and PostgreSQL servers by workflow and permission boundary.
GUIDEConnect a Neon branch with a restricted role, verified TLS, and a project-scoped MCP link.
GUIDEChoose between Supabase platform tools and a controlled PostgreSQL MCP endpoint.
GUIDECopy the configuration, verify the tools, and run the first schema-aware query.
GUIDEReview the complete database permission, security, and hosting model.
Start with one link
Connect one PostgreSQL database and create one hosted Cursor MCP link for free. No local server and no credit card.