drio
Open app

PostgreSQL Multi-Schema MCP Server

Source

A Model Context Protocol server that provides read-only access to PostgreSQL databases with enhanced multi-schema support.

Catalog onlyCatalog onlySTDIO

Overview

The PostgreSQL Multi-Schema MCP Server is a Model Context Protocol server that provides read-only access to PostgreSQL databases with enhanced multi-schema support, allowing LLMs to inspect database schemas across multiple namespaces and execute read-only queries while maintaining schema isolation.

To use the server, run the command: npx -y mcp-server-postgres-multi-schema <database-url> [schemas], where <database-url> is the PostgreSQL connection string and [schemas] is an optional comma-separated list of schemas to expose.

  • Multi-Schema Support: Specify which schemas to expose through command-line configuration. - Schema Isolation: 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 expose only user-defined tables in specified schemas.
  1. Enabling read-only access to multiple schemas for data analysis.
  2. Allowing LLMs to query and inspect database schemas without compromising security.
  3. Facilitating cross-schema data discovery for applications.

Add to your AI client

Use these steps to connect PostgreSQL Multi-Schema MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server-postgres-multi-schema-harjjotsinghh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-postgres-multi-schema-harjjotsinghh"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-server-postgres-multi-schema-harjjotsinghh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-postgres-multi-schema-harjjotsinghh"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-server-postgres-multi-schema-harjjotsinghh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-postgres-multi-schema-harjjotsinghh"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-server-postgres-multi-schema-harjjotsinghh": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-postgres-multi-schema-harjjotsinghh"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-server-postgres-multi-schema-harjjotsinghh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-postgres-multi-schema-harjjotsinghh"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-server-postgres-multi-schema-harjjotsinghh": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-postgres-multi-schema-harjjotsinghh"
      ]
    }
  }
}

FAQ

Can I expose multiple schemas at once?

Yes! You can specify multiple schemas in a comma-separated list when starting the server.

Is the server secure?

Yes! The server maintains strict access control and schema isolation to ensure security.

What license is the server under?

The server is licensed under the MIT License, allowing you to use, modify, and distribute it.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2014,"uuid":"d5a355df-f645-4432-93c3-75370e0e515f","name":"mcp-server-postgres-multi-schema","title":"PostgreSQL Multi-Schema MCP Server","description":"A Model Context Protocol server that provides read-only access to PostgreSQL databases with enhanced multi-schema support.","avatar_url":"https://avatars.githubusercontent.com/u/114088280?v=4","created_at":"2025-03-05T07:53:02.352Z","updated_at":"2025-03-12T10:18:23.016Z","status":"created","author_name":"HarjjotSinghh","author_avatar_url":"https://avatars.githubusercontent.com/u/114088280?v=4","tags":"postgres,mcp,postgresql,model-context-protocol,mcp-server","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/HarjjotSinghh/mcp-server-postgres-multi-schema","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"1\",\"license\":\"MIT license\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-02-25 06:15:53\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]