PostgreSQL MCP wrapper with .env credential mapping, tool selection, and safe read-only defaults.
MCPpedia last refreshed this data
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"io-github-edelciomolina-postgres-mcp": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Most LLMs interact with databases by guessing - assuming table names, inventing column names, and writing queries that may fail or expose sensitive data. Postgres MCP solves this by giving the LLM a structured, safe interface to actually understand the database before touching it.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in data / security
Manage Supabase projects — databases, auth, storage, and edge functions
Query and manage PostgreSQL databases directly from AI assistants
Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
MCP Security Weekly
Get CVE alerts and security updates for io.github.edelciomolina/postgres-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
English | 🌐 Português
|
|
Postgres MCP🔌 Native MCP server for PostgreSQL - reads credentials from |
Most LLMs interact with databases by guessing - assuming table names, inventing column names, and writing queries that may fail or expose sensitive data. Postgres MCP solves this by giving the LLM a structured, safe interface to actually understand the database before touching it.
Built with @modelcontextprotocol/sdk and pg, it provides:
pg_classify_query_risk lets the LLM check a query's safety before running it.env at startup; nothing sensitive lives in mcp.jsontool=<name> args, so the LLM only sees what you choose to expose.env file with database credentials (anywhere in the project tree - see .env Discovery)There are two ways to use this package. Choose the one that best fits your workflow.
npx, recommended for quick start)No installation needed. npx downloads and runs the package on demand. Add -y as the first argument to skip the confirmation prompt.
{
"servers": {
"Postgres Tools": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@edelciomolina/postgres-mcp"
],
"env": {
"MCP_KEY_HOST": "DB_HOST",
"MCP_KEY_PORT": "DB_PORT",
"MCP_KEY_NAME": "DB_NAME",
"MCP_KEY_SSLMODE": "DB_SSLMODE",
"MCP_KEY_USER": "DB_USER",
"MCP_KEY_PASS": "DB_PASS"
}
}
}
}
This starts the server with the default read-only tool set - no tool= arguments needed. To enable write-capable tools, see Write-capable tools.
💡 Using Supabase, Neon, Railway or another platform that only provides a connection string? Use
MCP_KEY_URLpointing toDATABASE_URL(or whatever variable name the platform uses). The server will prioritize the URL and ignore the individual variables. See Connection via URL.
VS Code supports discovering and installing MCP servers directly in the editor, without using the terminal.
MCP: Add Server