MCP Postgres Server logo

MCP Postgres Server

by MadeByNando

This server implements the Model Context Protocol (MCP) for Cursor, allowing the use of a PostgreSQL database as storage for model contexts. It enables Cursor to securely explore and query the database.

View on GitHub

Last updated: N/A

What is MCP Postgres Server?

The MCP Postgres Server is a server that implements the Model Context Protocol (MCP) for Cursor, using a PostgreSQL database as storage for model contexts.

How to use MCP Postgres Server?

  1. Clone the repository. 2. Start the server with Docker Compose (docker-compose up -d). 3. In Cursor, go to Settings > MCP. 4. Add a new connection with the following parameters: Name: MCP Postgres Server, Type: command, Command: docker exec -i mcp-postgres-server node dist/index.js.

Key features of MCP Postgres Server

  • Uses PostgreSQL for context storage

  • Implements MCP for Cursor

  • Provides tools for database exploration and querying

  • Offers postgres_query, postgres_list_tables, and postgres_describe_table tools

Use cases of MCP Postgres Server

  • Using PostgreSQL as a backend for Cursor's model context

  • Exploring and querying PostgreSQL databases within Cursor

  • Integrating Cursor with existing PostgreSQL infrastructure

  • Securely accessing and manipulating database data through Cursor

FAQ from MCP Postgres Server

How do I check the server logs?

Use the command docker logs mcp-postgres-server.

How do I restart the server?

Use the command docker-compose restart.

What tools does the server expose?

The server exposes postgres_query, postgres_list_tables, and postgres_describe_table.

What are the prerequisites for running the server?

Docker and Docker Compose are required.

How do I install the server?

Clone the repository and start the server with Docker Compose (docker-compose up -d).