mcp-pgsql-instance
Utilize a PostgreSQL database backend to execute read-only Structured Query Language operations and perform schema introspection. Incorporate robust database functionalities directly within automated routines for augmented application performance.
Author

MadeByNando
Quick Info
Actions
Tags
MCP PostgreSQL Backend Service
This service adheres to the MCP (Model Context Protocol) specification for Cursor, enabling the utilization of a PostgreSQL relational database as the persistence layer for model contexts.
Prerequisites
- Docker runtime environment
- Docker Compose utility
Deployment and Initialization
- Obtain a copy of this repository's source files.
- Initiate the service stack via Docker Compose:
docker-compose up -d
Configuration within Cursor
- Launch the Cursor application.
- Navigate to Settings -> MCP Integration.
- Establish a new connection entry using these parameters:
- Alias: MCP Postgres Server
- Connection Type: command
- Execution Command:
docker exec -i mcp-postgres-server node dist/index.js
Troubleshooting Guide
Should the service fail to achieve a running state:
- Inspect the container logs for diagnostic information:
bash
docker logs mcp-postgres-server
- To forcefully restart the entire service stack:
bash
docker-compose restart
Available MCP Server Capabilities
The PostgreSQL MCP backend exposes the following discrete tools accessible by Cursor:
postgres_query- Executes supplied SQL commands restricted to read-only operations.postgres_list_tables- Returns a comprehensive enumeration of all relations (tables) within the database.postgres_describe_table- Fetches the structural definition (schema) for a specified relational entity.
These exposed functionalities grant Cursor secure capabilities for database exploration and data interrogation.
