postgres-mcp-hardened MCP
A secure, read-only PostgreSQL MCP server written in Rust. It enforces read-only access by refusing writes at the parsed SQL level and using READ ONLY transactions. It includes hardened security features such as TLS pinning, column redaction to prevent equality oracles, and protection against SQL injection and resource exhaustion attacks.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Execute read-only SQL queries securely
- Describe table schemas without exposing sensitive data
- Audit database access with hardened security controls
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
postgres-mcp-hardened 0.1.10
{
"version": "0.1.10",
"transport": "stdio",
"identifier": "postgres-mcp-hardened",
"runtimeHint": "npx",
"registryType": "npm",
"runtimeArguments": [
{
"type": "positional",
"value": "--stdio",
"isRequired": true
}
],
"environmentVariables": [
{
"name": "DATABASE_URL",
"isRequired": true,
"description": "Connection string for the role the server connects as. Use a role that cannot write — the server refuses writes twice, but a read-only role is the layer that does not depend on us being correct. `--print-setup-sql` prints the SQL that creates one."
},
{
"name": "MCP_STATEMENT_TIMEOUT",
"description": "Server-side statement timeout, e.g. `5s`. A question that would pin the database is cancelled by PostgreSQL, not by hope."
},
{
"name": "MCP_ALLOW_TABLES",
"description": "Comma-separated allowlist. A table off the list is refused by name, and hiding it inside a CTE, a view or a join does not help."
},
{
"name": "MCP_AUDIT_LOG",
"description": "Path to the tamper-evident audit log. Entries are chained by hash and survive a restart; `--verify-audit` checks the chain against an off-host anchor."
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"postgres-mcp-hardened-mcp": {
"command": "npx",
"args": [
"-y",
"postgres-mcp-hardened@0.1.10"
],
"env": {
"DATABASE_URL": "<YOUR_DATABASE_URL>",
"MCP_STATEMENT_TIMEOUT": "<YOUR_MCP_STATEMENT_TIMEOUT>",
"MCP_ALLOW_TABLES": "<YOUR_MCP_ALLOW_TABLES>",
"MCP_AUDIT_LOG": "<YOUR_MCP_AUDIT_LOG>"
}
}
}
}Cline
{
"mcpServers": {
"postgres-mcp-hardened-mcp": {
"command": "npx",
"args": [
"-y",
"postgres-mcp-hardened@0.1.10"
],
"env": {
"DATABASE_URL": "<YOUR_DATABASE_URL>",
"MCP_STATEMENT_TIMEOUT": "<YOUR_MCP_STATEMENT_TIMEOUT>",
"MCP_ALLOW_TABLES": "<YOUR_MCP_ALLOW_TABLES>",
"MCP_AUDIT_LOG": "<YOUR_MCP_AUDIT_LOG>"
}
}
}
}VS Code
{
"servers": {
"postgres-mcp-hardened-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"postgres-mcp-hardened@0.1.10"
],
"env": {
"DATABASE_URL": "<YOUR_DATABASE_URL>",
"MCP_STATEMENT_TIMEOUT": "<YOUR_MCP_STATEMENT_TIMEOUT>",
"MCP_ALLOW_TABLES": "<YOUR_MCP_ALLOW_TABLES>",
"MCP_AUDIT_LOG": "<YOUR_MCP_AUDIT_LOG>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"postgres-mcp-hardened-mcp": {
"command": "npx",
"args": [
"-y",
"postgres-mcp-hardened@0.1.10"
],
"env": {
"DATABASE_URL": "<YOUR_DATABASE_URL>",
"MCP_STATEMENT_TIMEOUT": "<YOUR_MCP_STATEMENT_TIMEOUT>",
"MCP_ALLOW_TABLES": "<YOUR_MCP_ALLOW_TABLES>",
"MCP_AUDIT_LOG": "<YOUR_MCP_AUDIT_LOG>"
}
}
}
}Let your agent find its tools
Find servers like postgres-mcp-hardened MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.