MCP server
PostgreSQL (hardened, read-only)
- Repository:
- github.com/eszetael/postgres-mcp-hardened
- Stars:
- 3
- Last push:
- 2026-10-25
- License:
- MIT
Read-only PostgreSQL over MCP. Writes refused at the parsed SQL, plus a READ ONLY transaction.
Good fit for
- One-command install
- Runs fully local
- MIT license
Facts
- Category
- Databases
- Pricing
- Unknown
- Authentication
- API key
- Transport
- stdio, Streamable HTTP
- Hosting
- Local
- Maker
- Unknown
- Access
- Unknown
- Language
- TypeScript, Rust
- Install method
- npx, Docker
- Operating system
- macOS, Windows, Linux
- Client
- Unknown
- License
- Permissive
- Maintenance
- Active
Install
claude mcp add --env 'DATABASE_URL=<YOUR_VALUE>' --transport stdio postgres-mcp-hardened -- npx -y --stdio postgres-mcp-hardenedPaste into claude_desktop_config.json
{
"mcpServers": {
"postgres-mcp-hardened": {
"command": "npx",
"args": [
"-y",
"--stdio",
"postgres-mcp-hardened"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>"
}
}
}
}Paste into ~/.cursor/mcp.json
{
"mcpServers": {
"postgres-mcp-hardened": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"--stdio",
"postgres-mcp-hardened"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>"
}
}
}
}Paste into .vscode/mcp.json
{
"servers": {
"postgres-mcp-hardened": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"--stdio",
"postgres-mcp-hardened"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>"
}
}
}
}{
"mcpServers": {
"postgres-mcp-hardened": {
"command": "npx",
"args": [
"-y",
"--stdio",
"postgres-mcp-hardened"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>"
}
}
}
}[mcp_servers.postgres-mcp-hardened]
command = "npx"
args = ["-y", "--stdio", "postgres-mcp-hardened"]
env = { DATABASE_URL = "<YOUR_VALUE>" }{
"mcpServers": {
"postgres-mcp-hardened": {
"command": "npx",
"args": [
"-y",
"--stdio",
"postgres-mcp-hardened"
],
"env": {
"DATABASE_URL": "<YOUR_VALUE>"
}
}
}
}Env vars and secrets
DATABASE_URLEnv varSecretConnection 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.
Ratings
Not enough ratings yet
Ratings show once 3 people have rated.
Sign in to rate and comment. Sign in
Comments (0)
Sign in to rate and comment. Sign in
No comments yet.
Alternatives
Score: 62
- Popularity
- 13
- Maintenance
- 100
- Trust
- 73
- Completeness
- 90
- Community
- 50
Formula version 1
Listed in:
Official MCP Registry, awesome-mcp-servers.Data from the Official MCP Registry.