Back to Tools
Databases API Key
postgres logo

Postgres MCP Tools for AI Agents

Let an agent discover schemas, find tables, inspect table structure, and run read-only queries in Postgres.

Available Tools

4 tools available in this integration

Postgres.DiscoverSchemas

Discover all the schemas in the postgres database.

Postgres.DiscoverTables

Discover all the tables in the postgres database when the list of tables is not known.

Postgres.ExecuteSelectQuery

You have a connection to a postgres database.

Postgres.GetTableSchema

Get the schema/structure of a postgres table in the postgres database

Securing Postgres

The more capabilities agents get, the more useful they are. However, more capabilities bring more risks of undesired effects such as data loss and exfiltration.

This is why Arcade provides you with contextual rules that dictate how and when a tool is allowed to run. Arcade’s contextual access lets you govern tool visibility and behavior at every stage of execution and control who can see a tool, what inputs are allowed, and what comes back.

Learn about Contextual Access Policies

For Postgres, you can implement some of these policies:

Access when tools are listed for a user
  • Decide which tools an agent is allowed to see at all. A tool that is never listed cannot be called, whoever is asking.
Pre-execution before each tool call
  • Inspect the inputs a call is about to run with, and block it or send it for human approval when they fall outside what the agent should do unsupervised.
Post-execution after the tool returns
  • Redact Postgres.ExecuteSelectQuery results by removing values from columns containing passwords, access tokens, API keys, Social Security numbers, or payment card numbers before they reach the model.
  • Strip restricted table names from Postgres.DiscoverTables results when they match your secrets, credentials, payroll, or customer-data patterns, so an agent cannot discover those tables for later queries.
  • Redact default expressions and column comments containing credentials, connection strings, or internal hostnames from Postgres.GetTableSchema results before the model sees the schema.

How to use Postgres with your agent

Pick your MCP client below and follow the setup to connect an agent to your Postgres database. You’ll be ready to explore schemas and run read-only queries.

Your questions, answered

A Postgres MCP server exposes database discovery and read-only query capabilities as structured tools that an AI agent can call through the Model Context Protocol. The agent can inspect schemas and tables, read table definitions, and run permitted SELECT queries.

This integration is hosted by Arcade rather than provided as a first-party Postgres MCP server. Arcade adds the runtime around it, including shared-secret authentication, approval policies, redaction, and access from MCP clients and tool APIs.

Arcade agents can discover database schemas and tables, inspect table structures, and execute read-only SELECT queries against the connected Postgres database. They cannot insert, update, delete, or otherwise change database contents through these actions.

The configured shared API key or secret must have access to the Postgres connection, and the associated database role needs permission to inspect accessible schemas and tables and execute SELECT queries on the data you want the agent to read. No write permissions are needed for these actions.

No. Postgres uses one shared API key or secret configured once for the connection, rather than having each user authorize a separate Postgres account. Arcade brokers the credential, and the model never receives it.

Yes. Contextual Access policies can require human approval before a database call proceeds, including a SELECT query or schema inspection that your policy treats as sensitive. The call waits until the policy's conditions are satisfied.

Arcade proxies Postgres API calls and does not persist your database content as part of normal tool execution. The shared credential is brokered and stored encrypted at rest, and the model never receives it.

Any framework or client that can connect to Arcade's MCP gateway or tool APIs works, including LangChain, OpenAI Agents, CrewAI, Claude Desktop, Claude Code, Cursor, Visual Studio Code, Microsoft Copilot Studio, and GitHub Copilot.

Arcade refreshes access while the authorization remains valid. If the shared key or secret is revoked, rotated, or can no longer be used, calls stop until the credential is reconnected or reconfigured.

Postgres limits and any limits imposed by your hosting provider, connection pool, network, or configured database role still apply. Query execution is also constrained by the database's own resource and timeout settings; no separate Postgres quota is specified for these read-only actions.

Ready to actually ship your agent?

Connect your agent to Postgres with a shared API key and approval controls for consequential actions.