MCP-PostgreSQL-Ops
Verified Safeby call518
Overview
This MCP server provides comprehensive PostgreSQL database operations, monitoring, and management through natural language queries.
Installation
uvx --python 3.12 mcp-postgresql-ops --type stdioEnvironment Variables
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- REMOTE_AUTH_ENABLE
- REMOTE_SECRET_KEY
- FASTMCP_TYPE
- FASTMCP_HOST
- FASTMCP_PORT
- MCP_LOG_LEVEL
Security Notes
The server design emphasizes security: all operations are read-only, preventing data modification. It utilizes parameterized queries (asyncpg.fetch) to mitigate SQL injection risks. Sensitive information like database passwords are retrieved from environment variables and masked in logs/outputs. Authentication for HTTP transport is supported via Bearer tokens, with warnings issued if disabled in production contexts. Version-aware queries are implemented securely. Minor risk remains in complex database interaction logic, but overall robust.
Similar Servers
mcp-server-neon
Enables natural language interaction with Neon Postgres databases, facilitating database management, migrations, and query optimization via an LLM agent.
django-ai-boost
Provides a Model Context Protocol (MCP) interface for Django applications, allowing AI assistants to introspect project details like models, URLs, settings, and database schema.
tiger-docs-mcp-server
An MCP server and Claude plugin providing AI assistants with advanced PostgreSQL knowledge through semantic documentation search and curated best practice skills.
postgres-mcp
A comprehensive PostgreSQL management and operations (MCP) server providing guided workflows, real-time insights, and advanced tools for database health, performance tuning, backup & recovery, replication, JSONB operations, text processing, vector search, and geospatial analysis.