postgres-schema-mcp
Provides an AI agent with read-only PostgreSQL access, enabling schema browsing, foreign-key exploration, column search across tables, capped SELECT queries, and offline data dictionary export while rejecting write operations.
Install
npx -y postgres-schema-mcp
Paste the configuration above into your MCP client config (claude_desktop_config.json for Claude Desktop) and restart the client.
{
"mcpServers": {
"postgres-schema-mcp": {
"command": "npx",
"args": [
"-y",
"postgres-schema-mcp"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>",
"PGSM_MAX_POOL": "<PGSM_MAX_POOL>",
"PGSM_MAX_ROWS": "<PGSM_MAX_ROWS>",
"PGSM_HTTP_HOST": "<PGSM_HTTP_HOST>",
"PGSM_HTTP_PORT": "<PGSM_HTTP_PORT>",
"PGSM_MAX_BYTES": "<PGSM_MAX_BYTES>",
"PGSM_TOKENS_FILE": "<PGSM_TOKENS_FILE>",
"PGSM_REDACT_PATTERN": "<PGSM_REDACT_PATTERN>"
}
}
}
}Paste the configuration above into your MCP client config (claude_desktop_config.json for Claude Desktop) and restart the client.
Sources: public MCP Server directories. This is an independent third-party directory with no affiliation to or endorsement from the maintainers of the listed servers.