A Model Context Protocol server that provides read-only access to PostgreSQL databases with enhanced multi-schema support. This server enables LLMs to inspect database schemas across multiple namespaces and execute read-only queries while maintaining schema isolation.
sql
(string): The SQL query to executeThe server provides schema information for each table across authorized schemas:
postgres://<host>/<db_schema>/<table>/schema
)
The server requires a database URL and accepts a comma-separated list of schemas to expose:
npx -y mcp-server-postgres-multi-schema <database-url> [schemas]
postgresql://localhost/mydb
)# Connect with default public schema
npx -y mcp-server-postgres-multi-schema postgresql://localhost/mydb
# Connect with multiple schemas
npx -y mcp-server-postgres-multi-schema postgresql://localhost/mydb public,analytics,staging
Configure the "mcpServers" section in your claude_desktop_config.json
:
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"mcp-server-postgres-multi-schema",
"postgresql://localhost/mydb",
"public,audit"
]
}
}
}
This multi-schema MCP server is licensed under the MIT License. You may use, modify, and distribute the software according to the terms in the LICENSE file.
{
"mcpServers": {
"postgres": {
"env": {},
"args": [
"-y",
"mcp-server-postgres-multi-schema",
"postgresql://localhost/mydb",
"public,audit"
],
"command": "npx"
}
}
}
Seamless access to top MCP servers powering the future of AI integration.