PostgreSQL

by vinsidious

4 stars
432 downloads
Not rated
GitHub

About

Provides read-only access to PostgreSQL databases, enabling schema inspection and query execution.

Details

Author
vinsidious
GitHub stars
4
Downloads
432
Categories
Database, Other

- Execute read-only SQL queries via the query tool.
- Automatically discover and serve table schemas as JSON resources.
- All queries run within a READ ONLY transaction.
- Supports Docker and NPX deployment methods.
- MIT licensed.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name PostgreSQL
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Configure the server in the claude_desktop_config.json under mcpServers using either Docker (run mcp/postgres image) or NPX (@modelcontextprotocol/server-postgres). Provide a PostgreSQL connection URL (e.g., postgresql://host.docker.internal:5432/mydb) as an argument.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "postgresql": {
            "mcp-pg-schema": {
                "command": "docker",
                "args": [
                    "build",
                    "-t",
                    "mcp/postgres",
                    "-f",
                    "src/postgres/Dockerfile",
                    "."
                ]
            }
        }
    }
}

McpServers

{
    "mcp-pg-schema": {
        "command": "docker",
        "args": [
            "build",
            "-t",
            "mcp/postgres",
            "-f",
            "src/postgres/Dockerfile",
            "."
        ]
    }
}

A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.

- query

- Execute read-only SQL queries against the connected database
- Input:sql(string): The SQL query to execute
- All queries are executed within a READ ONLY transaction

The server provides schema information for each table in the database:

- Table Schemas(postgres://<host>/<table>/schema)

- JSON schema information for each table
- Includes column names and data types
- Automatically discovered from database metadata

To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of yourclaude_desktop_config.json:

- when running docker on macos, use host.docker.internal if the server is running on the host network (eg localhost)
- username/password can be added to the postgresql url withpostgresql://user:password@host:port/db-name

{ "mcpServers": { "postgres": { "command": "docker", "args": [ "run", "-i", "--rm", "mcp/postgres", "postgresql://host.docker.internal:5432/mydb"] } } }
{ "mcpServers": { "postgres": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb" ] } } }
docker build -t mcp/postgres -f src/postgres/Dockerfile .

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

A read-only MCP server by CData that enables LLMs to query live data from EnterpriseDB databases.

Expert-level PostgreSQL database analysis MCP server for AI assistants.

An MCP server for querying a PostgreSQL database in read-only mode.

Provides read-only access to PostgreSQL databases, allowing LLMs to inspect schemas and execute queries.

Provides read-only access to PostgreSQL databases, allowing LLMs to inspect schemas and execute queries.

Transforms PostgreSQL databases from "I have tables and I don't know what they do" into "I understand the entire database structure, relationships, and best practices"

A read-only MCP server for PostgreSQL, enabling LLMs to query live data from PostgreSQL databases.

Read-only MCP server for PostgreSQL, MySQL, and SQL Server with schema introspection, SQL query execution, EXPLAIN/optimization, anomaly detection, PII scanning, and N+1 query detection.

Official MCP server for dbt (data build tool) providing integration with dbt Core/Cloud CLI, project metadata discovery, model information, and semantic layer querying capabilities.

Query and analyze data with MotherDuck and local DuckDB

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.