mcp-server-postgres
@yuru-sha
About mcp-server-postgres
MCP Server for PostgreSQL databases
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-server-postgres-yuru-sha": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/postgres",
"postgresql://host:port/dbname"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is mcp-server-postgres?
mcp-server-postgres is a Model Context Protocol (MCP) server for PostgreSQL databases. It lets LLMs inspect database schemas and execute read-only queries, providing safe, read-only access to PostgreSQL through the MCP interface.
How to use mcp-server-postgres?
Install via Docker (build with make docker and run with docker run -i --rm mcp/postgres postgresql://host:port/dbname) or install via Smithery (npx -y @smithery/cli install @yuru-sha/mcp-server-postgres --client claude). For Claude Desktop, add a configuration entry to claude_desktop_config.json specifying the Docker command and connection URL.
Key features of mcp-server-postgres
- Read-only access to PostgreSQL databases
- Schema inspection capabilities
- Queries executed within READ ONLY transactions
- Docker support for easy deployment
- Available as an NPM package
- Secure by default—enforces read-only operations
Use cases of mcp-server-postgres
- Let an LLM explore and describe table structures in a PostgreSQL database
- Generate safe, read-only SQL queries for data analysis
- Provide database context to AI assistants without risk of data modification
- Integrate with Claude Desktop for interactive database schema inspection
- Use in development environments to allow AI tools to examine database design
FAQ from mcp-server-postgres
What type of database access does mcp-server-postgres provide?
It provides read-only access only. All queries are executed within READ ONLY transactions to protect your data.
How do I connect mcp-server-postgres to my PostgreSQL database?
Use a connection URL in the format postgresql://[user][:password]@host[:port]/database. Replace /database with your database name.
What are the runtime requirements?
You need either Docker (to run the provided Docker image) or Node.js (if installing via Smithery/npm). A running PostgreSQL instance is required.
Can mcp-server-postgres modify my database?
No. The server enforces read-only queries; any write operations are blocked by the READ ONLY transaction mode.
How does mcp-server-postgres handle authentication?
Authentication is handled through the PostgreSQL connection string, which can include username and password. For enhanced security, creating a dedicated read-only PostgreSQL user is recommended.
Frequently asked questions
What type of database access does mcp-server-postgres provide?
It provides read-only access only. All queries are executed within READ ONLY transactions to protect your data.
How do I connect mcp-server-postgres to my PostgreSQL database?
Use a connection URL in the format `postgresql://[user][:password]@host[:port]/database`. Replace `/database` with your database name.
What are the runtime requirements?
You need either Docker (to run the provided Docker image) or Node.js (if installing via Smithery/npm). A running PostgreSQL instance is required.
Can mcp-server-postgres modify my database?
No. The server enforces read-only queries; any write operations are blocked by the READ ONLY transaction mode.
How does mcp-server-postgres handle authentication?
Authentication is handled through the PostgreSQL connection string, which can include username and password. For enhanced security, creating a dedicated read-only PostgreSQL user is recommended.
Basic information
More Databases MCP servers
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
Meilisearch MCP Server
meilisearchA Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces.
Dbhub
bytebaseZero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
MongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
Neon MCP Server
neondatabase-labsMCP server for interacting with Neon Management API and databases
Comments