postgres-mcp-full-access
Provides unrestricted SQL execution (DDL/DML) for PostgreSQL databases, allowing AI agents to create, read, update, delete, and manage database objects.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
postgres-mcp-full-access
A pure, full-access PostgreSQL MCP server for AI agents. Enables unrestricted SQL execution (DDL/DML) with zero database bundling.
This project embraces a "pure middleware" philosophy, stripping away restrictive database environment setups and hardcoded query filtering. It does exactly one thing: unconditionally accepts and executes any SQL command from your Agent (including CREATE, INSERT, UPDATE, DELETE, and DROP), and returns the result.
All connection methods, network architectures, and security constraints are entirely left to the user and the native PostgreSQL Role-Level Security (RLS) to manage.
✨ Key Features
100% Decoupled: Zero database bundling. It runs purely as an
stdiomiddleware layer.Always Latest: No locked-in versions. Every build automatically pulls the latest Node.js, MCP SDK, and
pgdrivers, eliminating maintenance overhead.Unrestricted Access: Breaking free from the typical read-only sandbox. Your AI can autonomously create databases, define tables, and perform vector searches (e.g.,
pgvector).Dynamic Database Switching: Built-in support for switching databases mid-session—allowing the AI to create a new database and immediately connect to it to execute further commands.
Minimalist Deployment: A single command builds a clean Docker image, ready to be spawned by your Agent at any time.
Related MCP server: PostgreSQL MCP Server
🚀 Quick Start (One-Click Build)
1. Clone the repository
git clone [https://github.com/BrassaiKao/postgres-mcp-full-access.git](https://github.com/BrassaiKao/postgres-mcp-full-access.git)
cd postgres-mcp-full-access2. Build the latest environment image No local Node.js installation is required. Just run:
docker compose up -d --build(This automatically pulls the latest dependencies and generates an image named hermes-postgres-mcp:latest on your machine. The container will gracefully exit once the build is complete, consuming zero background resources.)
⚙️ Usage with AI Agents
To use this with an MCP-compatible agent (like Hermes Agent or Claude Desktop), modify your agent's configuration file (e.g., ~/.hermes/config.yaml):
mcp_servers:
postgres_middleware:
command: "docker"
args:
- "run"
- "-i" # Required: Keep interactive mode open for stdio
- "--rm" # Automatically remove the container when done
# - "--network=your_network" # Uncomment if you need to connect to a specific Docker network
- "-e"
# Insert the PostgreSQL connection string you want the Agent to use
- "DATABASE_URL=postgresql://agent_user:password@your_db_host:5432/postgres"
- "hermes-postgres-mcp:latest"🛡️ Security Best Practices (Crucial)
Because this MCP Server allows all SQL syntax, DO NOT give the AI your postgres (Superuser) credentials.
Instead, create a dedicated Role in your PostgreSQL database. Use GRANT and REVOKE to precisely control which tables the Agent can read or write. By delegating security to the database layer, even if a Prompt Injection occurs, malicious commands will be natively blocked by PostgreSQL with a Permission denied error!
Related MCP Connectors
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Supabase-compatible Postgres for agents: projects, branches, SQL, auth, storage, email.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Related MCP Servers
- FlicenseAqualityNot gradedmaintenanceEnables comprehensive PostgreSQL database management through natural language including queries, schema operations, user management, and administrative tasks. Features enterprise-grade connection pooling, transaction support, and full database administration capabilities.11183 npm1-
- AlicenseNot gradedqualityBmaintenanceEnables secure, AI-driven PostgreSQL database administration, observability, and querying with support for extensions like PostGIS and pgvector, connection pooling, and advanced tool filtering.119 npm12MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with PostgreSQL databases through schema intelligence, query execution, and DBA tooling including index analysis and health monitoring. Features configurable access levels and audit logging for secure database operations.525 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables full read-write access to PostgreSQL databases with transaction management and safety controls, allowing LLMs to query and modify database content.10 npm3MIT