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.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@postgres-mcp-full-accesscreate table products (id serial primary key, name text, price numeric)"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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!
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BrassaiKao/postgres-mcp-full-access'
If you have feedback or need assistance with the MCP directory API, please join our Discord server