# pgconsole MCP server

> Lets AI agents query and modify PostgreSQL through a governed MCP endpoint with per-agent permissions and audit logging.

- Repository: https://github.com/pgplex/pgconsole
- Page: https://hostedmcp.org/servers/pgplex/pgconsole
- Transport: —
- Stars: 162
- License: Apache-2.0

## FAQ

### How does an AI agent authenticate to the pgconsole MCP server?

Agents connect to a Streamable HTTP endpoint at /mcp and authenticate with a bearer token defined for the agent in the config file.

### Which tools does an agent get on the pgconsole MCP server?

Every agent can list connections; catalog and execution tools appear based on the permissions granted to that agent.

### Do agents need raw database credentials to use pgconsole?

No. Agents use the MCP endpoint and inherit the same IAM, permission, and audit controls as human users instead of database credentials.

### Are agent queries audited in pgconsole?

Yes, every statement runs through SQL permission detection, default-deny IAM, and the audit log.

### What kinds of agents can be configured in pgconsole?

You can configure a pure service account authorized by IAM rules, or a delegated agent that acts on behalf of a user with optionally reduced permissions.
