PostgreSQL
About
Provides read-only access to PostgreSQL databases, allowing LLMs to inspect schemas and execute queries.
Details
- Author
- hsinyuyen
- Categories
- Database
Jump to
Setup
Install PostgreSQL in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/hsinyuyen/my-postgres-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
A Model Context Protocol server that provides read-only access to PostgreSQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
- query
- Execute read-only SQL queries against the connected database
- Input:sql(string): The SQL query to execute
- All queries are executed within a READ ONLY transaction
The server provides schema information for each table in the database:
- Table Schemas(postgres://<host>/<table>/schema)
- JSON schema information for each table
- Includes column names and data types
- Automatically discovered from database metadata
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of yourclaude_desktop_config.json:
- when running docker on macos, use host.docker.internal if the server is running on the host network (eg localhost)
- username/password can be added to the postgresql url withpostgresql://user:password@host:port/db-name
{ "mcpServers": { "postgres": { "command": "docker", "args": [ "run", "-i", "--rm", "mcp/postgres", "postgresql://host.docker.internal:5432/mydb"] } } }
{ "mcpServers": { "postgres": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb" ] } } }
docker build -t mcp/postgres -f src/postgres/Dockerfile .
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Official Airtable MCP server and skills for working with bases, records, workflows, and business operations from AI agents.
MCP Server For Apache Doris, an MPP-based real-time data warehouse.
Official MCP Server from Atlan which enables you to bring the power of metadata to your AI tools
Query Onchain data, like ERC20 tokens, transaction history, smart contract state.
Read and write access to your Baserow tables.
Introspect and query your apps deployed to Convex.
Interact with the data stored in Couchbase clusters using natural language.
Maritime intelligence for tracking vessels, analysing ports, and exploring ship data.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



