database-mcp-postgres MCP
An open-source MCP server providing safe, structured access to PostgreSQL databases. It exposes two tools, execute_sql and search_objects, with built-in guardrails including read-only mode, row caps, and statement timeouts. Credentials are never accepted through tool calls and secrets are never logged.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- List database tables and schema objects
- Execute read-only SQL queries with row limits
- Inspect table columns, indexes, and foreign keys
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
@database-mcp/postgres 0.5.0
{
"version": "0.5.0",
"transport": "stdio",
"identifier": "@database-mcp/postgres",
"registryType": "npm",
"environmentVariables": [
{
"name": "POSTGRES_HOST",
"format": "string",
"isRequired": true,
"description": "Database host"
},
{
"name": "POSTGRES_USER",
"format": "string",
"isRequired": true,
"description": "Database user (a read-only user is recommended)"
},
{
"name": "POSTGRES_PASSWORD",
"format": "string",
"description": "Database password (or use POSTGRES_PASSWORD_FILE)"
},
{
"name": "POSTGRES_DATABASE",
"format": "string",
"isRequired": true,
"description": "Database name"
}
]
}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": {
"database-mcp-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"@database-mcp/postgres@0.5.0"
],
"env": {
"POSTGRES_HOST": "<YOUR_POSTGRES_HOST>",
"POSTGRES_USER": "<YOUR_POSTGRES_USER>",
"POSTGRES_PASSWORD": "<YOUR_POSTGRES_PASSWORD>",
"POSTGRES_DATABASE": "<YOUR_POSTGRES_DATABASE>"
}
}
}
}Cline
{
"mcpServers": {
"database-mcp-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"@database-mcp/postgres@0.5.0"
],
"env": {
"POSTGRES_HOST": "<YOUR_POSTGRES_HOST>",
"POSTGRES_USER": "<YOUR_POSTGRES_USER>",
"POSTGRES_PASSWORD": "<YOUR_POSTGRES_PASSWORD>",
"POSTGRES_DATABASE": "<YOUR_POSTGRES_DATABASE>"
}
}
}
}VS Code
{
"servers": {
"database-mcp-postgres-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@database-mcp/postgres@0.5.0"
],
"env": {
"POSTGRES_HOST": "<YOUR_POSTGRES_HOST>",
"POSTGRES_USER": "<YOUR_POSTGRES_USER>",
"POSTGRES_PASSWORD": "<YOUR_POSTGRES_PASSWORD>",
"POSTGRES_DATABASE": "<YOUR_POSTGRES_DATABASE>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"database-mcp-postgres-mcp": {
"command": "npx",
"args": [
"-y",
"@database-mcp/postgres@0.5.0"
],
"env": {
"POSTGRES_HOST": "<YOUR_POSTGRES_HOST>",
"POSTGRES_USER": "<YOUR_POSTGRES_USER>",
"POSTGRES_PASSWORD": "<YOUR_POSTGRES_PASSWORD>",
"POSTGRES_DATABASE": "<YOUR_POSTGRES_DATABASE>"
}
}
}
}Let your agent find its tools
Find servers like database-mcp-postgres MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.