MCP Postgres Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Provides tools for exploring and querying a PostgreSQL database, including executing read-only SQL queries, listing tables, and obtaining schema information for specific tables.

MCP Postgres Server

This server implements the Model Context Protocol (MCP) for Cursor, allowing a PostgreSQL database to be used as storage for model contexts.

Prerequisites

  • Docker
  • Docker Compose

Installation and startup

  1. Clone this repository
  2. Start the server with Docker Compose:
docker-compose up -d

Configuration in Cursor

  1. Open Cursor
  2. Go to Settings > MCP
  3. Add a new connection with the following settings:
    • Name: MCP Postgres Server
    • Type: command
    • Command: docker exec -i mcp-postgres-server node dist/index.js

Troubleshooting

If the server does not start correctly:

  1. Check the container logs:
    docker logs mcp-postgres-server
  2. To restart the server:
    docker-compose restart

MCP Server Features

The MCP PostgreSQL server exposes the following tools for Cursor:

  1. postgres_query - Execute a read-only SQL query
  2. postgres_list_tables - List all tables in the database
  3. postgres_describe_table - Get the schema of a specific table

These tools allow Cursor to securely explore and query the database.

-
security - not tested
F
license - not found
-
quality - not tested

A server implementing the Model Context Protocol (MCP) for Cursor that allows using a PostgreSQL database as storage for model contexts, enabling secure database exploration and querying.

  1. Prérequis
    1. Installation et démarrage
      1. Configuration dans Cursor
        1. Résolution des problèmes
          1. Fonctionnalités du serveur MCP
            ID: 2xjj29nqrm