Is PostgreSQL MCP server safe?
What PostgreSQL MCP server does
This server gives an MCP client read-only access to a PostgreSQL database: it exposes table schemas as resources and offers a query tool that runs SQL inside a READ ONLY transaction. The npm author field lists Anthropic, PBC, and npm marks the package as no longer supported. It takes a PostgreSQL connection string as a command-line argument, so the credentials in that string decide what can be read. Before installing, connect with a dedicated database role limited to the schemas you want the model to see, not an owner or superuser account.
- npm prepare hook
- MCP tool surface detected
What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.
PostgreSQL MCP server is an MCP server analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. It can: install time execution and mcp tools detected — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
@modelcontextprotocol/ server-postgres 0.6.2
Get notified when this component changes
Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of PostgreSQL MCP server's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (2)
package.json has a 'prepare' script (runs on git/local installs and before publishing).
"prepare": "npm run build",
Why it matters: Usually a build step, but confirm it doesn't fetch or run remote code.
Fix: Usually a legitimate build step; confirm it only builds and does not fetch or execute remote code.
An MCP tool surface (manifest or tool definitions) was found.
const server = new Server({server.setRequestHandler(ListToolsRequestSchema, async () => {server.setRequestHandler(CallToolRequestSchema, async (request) => {const transport = new StdioServerTransport();
Why it matters: Just context — review which tools it offers and their permissions.
Fix: Review the declared MCP tools and their permissions.
How attackers abuse these capabilities
Interactive labs on the attack class behind the rules above. They show the technique, not anything found in PostgreSQL MCP server.
Maintain PostgreSQL MCP server?
The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →