MCP Postgres Server
Provides tools for exploring and querying a PostgreSQL database, including executing read-only SQL queries, listing tables, and obtaining schema information for specific tables.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Postgres Serverlist all tables in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: pg-mcp-server
Installation and startup
Clone this repository
Start the server with Docker Compose:
docker-compose up -dConfiguration in Cursor
Open Cursor
Go to Settings > MCP
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:
Check the container logs:
docker logs mcp-postgres-serverTo restart the server:
docker-compose restart
MCP Server Features
The MCP PostgreSQL server exposes the following tools for Cursor:
postgres_query- Execute a read-only SQL querypostgres_list_tables- List all tables in the databasepostgres_describe_table- Get the schema of a specific table
These tools allow Cursor to securely explore and query the database.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA Model Context Protocol server implementation that provides a simple interface to interact with PostgreSQL databases, enabling SQL queries, database operations, and schema management through MCP.
- Alicense-qualityDmaintenanceA Model Context Protocol server for PostgreSQL databases that enables AI agents to connect, query, and explore multiple databases with schema discovery and extension context.540MIT
- Flicense-qualityDmaintenanceA standardized Model Context Protocol server for interacting with PostgreSQL databases, enabling full CRUD operations, schema management, and database introspection.1
- Alicense-qualityDmaintenanceMCP server for PostgreSQL that enables Cursor and other MCP clients to execute SQL queries, list tables, and explore database schemas via HTTP.505MIT
Related MCP Connectors
MCP server for managing Prisma Postgres.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for interacting with the Supabase platform
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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