MCP.so
Sign In
Servers

MCP Postgres Server

@MCP-Mirror

Mirror of

Overview

What is MCP Postgres Server?

This server implements the Model Context Protocol (MCP) for Cursor, using a PostgreSQL database as storage for model contexts. It is intended for developers who need to query and explore PostgreSQL databases directly from Cursor.

How to use MCP Postgres Server?

Clone the repository and start the server with Docker Compose using docker-compose up -d. Then configure a new MCP connection in Cursor settings with type command and command docker exec -i mcp-postgres-server node dist/index.js. Troubleshoot by checking container logs with docker logs mcp-postgres-server or restarting with docker-compose restart.

Key features of MCP Postgres Server

  • postgres_query – execute read‑only SQL queries
  • postgres_list_tables – list all tables in the database
  • postgres_describe_table – get the schema of a specific table
  • Docker & Docker Compose based setup
  • Integrates with Cursor’s MCP settings

Use cases of MCP Postgres Server

  • Querying a PostgreSQL database directly from Cursor during development
  • Exploring database schemas without leaving the editor
  • Listing tables and describing table structures for code generation
  • Running read‑only SQL checks as part of an MCP‑powered workflow

FAQ from MCP Postgres Server

What are the prerequisites?

Docker and Docker Compose must be installed on your system.

How do I start the server?

Clone the repository and run docker-compose up -d to start the container.

How do I configure it in Cursor?

Go to Cursor Settings > MCP, add a new connection with name “MCP Postgres Server”, type “command”, and command docker exec -i mcp-postgres-server node dist/index.js.

How do I troubleshoot if the server fails?

Check the container logs with docker logs mcp-postgres-server or restart the service with docker-compose restart.

What tools does the server expose?

It exposes three tools: postgres_query, postgres_list_tables, and postgres_describe_table.

Tags

More from Databases