Quick Use
Add the following to .mcp.json:
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": { "POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost/mydb" }
}
}
}Intro
PostgreSQL MCP is an MCP server that gives AI agents direct access to PostgreSQL databases, with 3,000+ GitHub stars. Run queries, explore schemas, and manage data. Read-only mode for safety.
Source & Thanks
Part of MCP Servers. Licensed under MIT.