PostgreSQL MCP Server
@tobecrazy
About PostgreSQL MCP Server
A postgresql-mcp server
Basic information
Config
No standard config provided
This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.
RepositoryTools
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 PostgreSQL MCP Server?
PostgreSQL MCP Server is a Model Context Protocol server that provides CRUD operations for PostgreSQL database tables through a set of MCP tools. It uses the FastMCP library, runs in stdio mode, and is compatible with various MCP clients.
How to use PostgreSQL MCP Server?
Clone the repository, install dependencies with pip install -r requirements.txt, edit the config.yaml file with database credentials and table permissions, then run python postgresql_mcp_server.py to start the server in stdio mode.
Key features of PostgreSQL MCP Server
- Connect to PostgreSQL databases
- Perform CRUD operations on specified tables
- Table and column-level access control
- Schema inspection
- Custom SQL query execution
- Configuration via YAML file
Use cases of PostgreSQL MCP Server
- Query and modify PostgreSQL tables from an MCP-compatible language model
- Inspect table schemas to understand database structure
- Execute parameterized custom SQL queries
- Manage data with configurable per-table and per-column permissions
FAQ from PostgreSQL MCP Server
What dependencies are required?
Python 3 with the FastMCP package and other dependencies listed in requirements.txt (install via pip install -r requirements.txt).
How is access to tables and columns controlled?
Access is configured in the config.yaml file, where you specify which tables are accessible, which columns are allowed for operations, and which operations (create, read, update, delete) are permitted per table.
What transport mode does the server use?
The server runs in stdio mode, making it compatible with MCP clients that communicate over standard input and output.
Is there a security risk with the execute_query tool?
Yes. The execute_query tool allows arbitrary SQL execution. The README advises considering restricting its use or implementing additional validation, as this could be a security risk if not carefully managed.
How are database credentials stored?
Database credentials are stored in plain text in the config.yaml file. The README recommends using environment variables or a secure secret management solution in production.
More Databases MCP servers
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
MCP Server for MySQL based on NodeJS
benborlaA Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Snowflake MCP Server
isaacwassermanMongoDB Lens
furey🍃🔎 MongoDB Lens: Full Featured MCP Server for MongoDB Databases
Comments