Basic information
About PostgreSQL MCP Server
MCP server for getting schema information from a PostgreSQL database
PostgreSQL is a MCP server in the Databases category listed in the AddMCP.net directory, published by vinsidious. Supported transport: stdio. Runtime: node. The repository has 4 GitHub stars. Source code is hosted on github.com. Related topics: database-access, mcp-pg-schema, postgresql.
Setup
{
"mcpServers": {
"mcp-pg-schema": {
"command": "docker",
"args": [
"build",
"-t",
"mcp/postgres",
"-f",
"src/postgres/Dockerfile",
"."
]
}
}
}
{
"mcpServers": {
"mcp-pg-schema": {
"command": "docker",
"args": [
"build",
"-t",
"mcp/postgres",
"-f",
"src/postgres/Dockerfile",
"."
]
}
}
}
{
"servers": {
"mcp-pg-schema": {
"command": "docker",
"args": [
"build",
"-t",
"mcp/postgres",
"-f",
"src/postgres/Dockerfile",
"."
]
}
}
}
PostgreSQL MCP Server — by vinsidious config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-pg-schema": {
"command": "docker",
"args": [
"build",
"-t",
"mcp/postgres",
"-f",
"src/postgres/Dockerfile",
"."
]
}
}
}
PostgreSQL MCP Server — by vinsidious tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is PostgreSQL?
A Model Context Protocol server that provides read-only access to PostgreSQL databases, enabling LLMs to inspect database schemas and execute read-only SQL queries.
How to use PostgreSQL?
Configure the server in the claude_desktop_config.json under mcpServers using either Docker (run mcp/postgres image) or NPX (@modelcontextprotocol/server-postgres). Provide a PostgreSQL connection URL (e.g., postgresql://host.docker.internal:5432/mydb) as an argument.
Key features of PostgreSQL
- Execute read-only SQL queries via the
querytool. - Automatically discover and serve table schemas as JSON resources.
- All queries run within a READ ONLY transaction.
- Supports Docker and NPX deployment methods.
- MIT licensed.
Use cases of PostgreSQL
- Let an LLM explore table structures and column types before generating queries.
- Allow an LLM to run safe, read-only SELECT statements against a live database.
- Provide database schema context to an AI assistant for answering questions about data.
Frequently asked questions
1 Is this server read-only?
Yes. All queries are executed inside a READ ONLY transaction, preventing any data modification.
2 What are the runtime requirements?
You need a running PostgreSQL database and either Docker or Node.js (for NPX). The server connects to the database via the provided URL.
3 How do I specify authentication credentials?
Include username and password in the PostgreSQL connection URL, e.g., postgresql://user:password@host:port/db-name.
4 Where does schema data come from?
Schema information is automatically discovered from the connected database's metadata. Each table's JSON schema includes column names and data types.
5 What transport does this server use?
The server follows the Model Context Protocol (stdio-based transport as typical for Claude Desktop MCP servers). The README does not detail other transport options.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In