Provides read-only access to PostgreSQL databases with enhanced multi-schema support, enabling schema inspection, query execution, and isolation across multiple namespaces.
This PostgreSQL Multi-Schema MCP Server provides read-only access to PostgreSQL databases across multiple schemas. It enables language models to inspect database structures and execute safe, read-only queries while maintaining proper isolation between different database schemas.
Key Features
Multi-Schema Support: Explicitly specify which schemas to expose through command-line configuration
Schema Isolation: Strict access control to only authorized schemas listed during server startup
Cross-Schema Discovery: Unified view of tables across multiple schemas while maintaining schema boundaries
Metadata Security: Filters system catalogs to only expose user-defined tables in specified schemas
Installation
You can run the MCP server directly using npx without installing it globally:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
Adding an MCP server to Cursor globally
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
How to use the MCP server
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.