database mcp postgres for Cursor
io.github.arifulislamat/database-mcp-postgres
MCP server for PostgreSQL. Read-only by default, row caps, timeouts, secrets never logged.
client:Cursor
transport:stdio
runtime:npm
Install database mcp postgres in Cursor
~/.cursor/mcp.json · windows: %USERPROFILE%\.cursor\mcp.json
{
"mcpServers": {
"database-mcp-postgres": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@database-mcp/postgres"
],
"env": {
"POSTGRES_HOST": "<POSTGRES_HOST>",
"POSTGRES_USER": "<POSTGRES_USER>",
"POSTGRES_PASSWORD": "<POSTGRES_PASSWORD>",
"POSTGRES_DATABASE": "<POSTGRES_DATABASE>"
}
}
}
}
Use .cursor/mcp.json in a project root instead to scope it to that project. Cursor merges both. Cursor docs