PostgreSQL
Query a PostgreSQL database directly: list tables, describe columns and run read-only SQL. Installs read-only; credentials are held encrypted rather than in the connection string.
7 Tage gratis · keine Kreditkarte · EU-Hosting
Frag PostgreSQL alles
Teste einen echten Prompt gegen PostgreSQL via AnythingMCP — Claude ruft die Tools auf, liefert die Antwort. Drück Enter auf deine eigene Nachricht, um auf Cloud zu installieren.
PostgreSQL auf Cloud installierenClaude ist KI und kann Fehler machen. Bitte Antworten gegenprüfen.
Setup in 2 Minuten
- 1Free Trial auf cloud.anythingmcp.com starten.
- 2Im Connector-Store auf PostgreSQL klicken. Credentials einfügen.
- 3MCP-API-Key generieren und KI-Client auf die MCP-URL zeigen.
Anleitungen für PostgreSQL
Schritt-für-Schritt-Setup für die wichtigsten KI-Clients.
PostgreSQL einrichten
Direkt aus der Connector-Definition: wo du die Credentials findest, welche Rechte sie brauchen und mit welcher API dieser Adapter spricht. Vom Connector-Autor auf Englisch bereitgestellt.
Setup
- Create a dedicated role for the agent and grant it only what it needs:
The last line matters: without it, tables created tomorrow are invisible.CREATE ROLE amcp_reader LOGIN PASSWORD 'change-me'; GRANT CONNECT ON DATABASE sales TO amcp_reader; GRANT USAGE ON SCHEMA public TO amcp_reader; GRANT SELECT ON ALL TABLES IN SCHEMA public TO amcp_reader; ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO amcp_reader; - Set
POSTGRES_HOST,POSTGRES_PORT(5432),POSTGRES_DATABASE,POSTGRES_USERandPOSTGRES_PASSWORD.
search_path is not set for you. Unqualified table names resolve against the role's default search path, which on a fresh role is "$user", public. Schema-qualify (analytics.orders) when in doubt.
How a database connector behaves
- It installs read-only. The engine rejects anything that is not a read until you flip the switch in the connector's settings. That is a guard rail, not a security boundary: give the connection a database role that is itself read-only, and the guard rail never has to matter.
- Credentials live in the encrypted
authConfig, not in the connection string.POSTGRES_USERandPOSTGRES_PASSWORDare stored encrypted and spliced into the DSN at call time; the host and database name are stored in the plaintextbaseUrlcolumn. - Results are capped at 1000 rows. A query that would return more comes back truncated with a flag. Aggregate in SQL rather than in the agent.
- A statement runs exactly as written. There is no query rewriting and no automatic LIMIT — an unbounded scan on a large table is a real unbounded scan on your production database. Say LIMIT.
Reachable from where?
- On AnythingMCP Cloud the server must accept connections from the public internet, which for a production database usually means it should not. Point the connector at a read replica, or self-host AnythingMCP inside the network.
- Self-hosted, add the host to
SSRF_ALLOWED_HOSTS: the outbound guard blocks private address space by default, and10.0.0.5is exactly the shape it is there to block.
Supersedes the marketing site's postgres placeholder, which advertised a POSTGRES_URL connection string. This adapter takes host, port and database separately and keeps the password encrypted, which the single-URL form could not do.
Deine KI ist zwei Klicks von PostgreSQL entfernt.
Connector installieren, Credentials einfügen, KI fragen. 7 Tage gratis, keine Kreditkarte.