Skip to main content
Glama

MCP Postgres Server

by MadeByNando

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

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

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. Prerequisites
    1. Installation and startup
      1. Configuration in Cursor
        1. Troubleshooting
          1. MCP Server Features

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A powerful Model Context Protocol (MCP) tool for exploring and managing different types of databases including PostgreSQL, MySQL, and Firestore.
              Last updated -
              9
              5
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol (MCP) server for Cursor IDE that simplifies the installation and configuration of other MCP servers.
              Last updated -
              3
              231
              63
              JavaScript
              MIT License
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that enables interaction with PostgreSQL databases to list tables, retrieve schemas, and execute read-only SQL queries.
              Last updated -
              35
              JavaScript
              MIT License
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              A template project for building custom MCP servers that enables direct access to PostgreSQL databases, allowing SQL query execution and schema information retrieval through the Model Context Protocol.
              Last updated -
              30
              Python
              MIT License
              • Apple
              • Linux

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/MadeByNando/mcp-postgres-server'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server