Claude / PostgreSQL / remote MCP

Connect Claude to PostgreSQL.
Keep every query inside policy.

Give Claude and Claude Code live PostgreSQL context through a hosted remote MCP connector. Keep database credentials encrypted, choose read-only or custom access, and review PostgreSQL query activity from the link.

Remote HTTP MCPRead-only availableClaude and Claude Code
LIVE ROUTEACCESS POLICY / ENFORCED
SOURCEPostgreSQLschema discovered
GATEWAYdatamcpauth · policy · route
CLIENTClaudehosted MCP link
REQUESTtools/call → productionPOLICY CHECKED
AUTHOAuth 2.0
ACCESSScoped
SECRETSEncrypted
ROUTEHosted

The production path

One controlled connector for Claude

Claude can inspect a live schema and run approved SQL through MCP instead of relying only on copied data or application code. DataMCP converts PostgreSQL schema discovery and query operations into tools available through a remote connector.

The hosted gateway keeps the PostgreSQL password out of Claude and Claude Code. Each MCP link has its own permissions and revocation path, so you can separate personal analysis, development, and production access without distributing the underlying database secret.

Follow the Claude Code PostgreSQL guide for the database workflow, use the general Claude Code MCP guide for CLI configuration, or open the Claude Desktop PostgreSQL guide for Connectors.

What you get

Production access.
Without production guesswork.

01 / CAPABILITY
LI

Live schema tools

Let Claude inspect tables, columns, relationships, indexes, and descriptions before composing a query.

02 / CAPABILITY
RE

Remote HTTP endpoint

Use a hosted URL supported by Claude connectors and Claude Code instead of operating a local MCP process.

03 / CAPABILITY
SC

Scoped database access

Choose read-only, read-write, full, or custom table-level permissions for each Claude link.

04 / CAPABILITY
CR

Credential isolation

Keep the PostgreSQL connection string encrypted behind the gateway and out of client configuration.

05 / CAPABILITY
IN

Independent revocation

Disable a Claude link without changing the database password or interrupting other integrations.

06 / CAPABILITY
PO

PostgreSQL query activity

Review PostgreSQL query execution details and permission denials produced through the Claude link.

Source to controlled MCP link

One. Two.
Three.

Connect the source once. DataMCP handles discovery, hosted transport, client authentication, and link policy.

Read the setup guide
  1. 01
    Connect PostgreSQL

    Add the database once and verify the schema and database tools discovered by DataMCP.

  2. 02
    Create a Claude link

    Select the required permission level and copy the hosted remote MCP endpoint.

  3. 03
    Add the remote connector

    Configure the URL in Claude or Claude Code, authenticate when required, and test the available tools.

Build or use datamcp

Hosted Claude connector vs. a local MCP server

See what stays on your engineering backlog when the MCP runtime and control layer are managed for you.

CAPABILITYDATAMCPLocal PostgreSQL MCP
Client setupOne remote HTTPS endpoint

Local command, runtime, and package

Database secretEncrypted behind the gateway

Stored on each developer machine

PermissionsPolicy per Claude link

Usually tied to one database role

RevocationDisable one connector

Remove config or rotate credentials

PostgreSQL query activityQueries and denied operations available for review

Assemble local and database logs

Frequently asked questions

Questions before
you connect.

Clear answers about architecture, access, credentials, and supported clients.

01

Can Claude connect to PostgreSQL through MCP?

Yes. Claude and Claude Code can connect to a remote MCP server that exposes PostgreSQL tools. DataMCP hosts that endpoint, connects to PostgreSQL, enforces the link's permissions, and returns approved results to Claude.

02

Does this work with Claude.ai, Claude Desktop, and Claude Code?

DataMCP provides a remote HTTP MCP endpoint. Anthropic documents remote custom connectors for eligible Claude plans and remote HTTP servers for Claude Code. The setup interface and account requirements differ between the Claude app and Claude Code.

03

Which Claude plans support custom remote connectors?

Anthropic currently documents remote custom connectors as a beta feature on Free, Pro, Max, Team, and Enterprise plans. Free users are limited to one custom connector, while Team and Enterprise owners manage organization connectors.

04

Does Claude receive the PostgreSQL password?

No. Claude connects to the hosted MCP endpoint. The PostgreSQL connection string remains encrypted on DataMCP and is not placed in Claude's connector settings or Claude Code configuration.

05

Can Claude be limited to read-only PostgreSQL access?

Yes. Use a read-only MCP link for analysis and schema exploration, or define custom table-level access. The underlying PostgreSQL role remains an additional security boundary.

Start with one link

Give Claude database context, not credentials

Connect one PostgreSQL database and create one controlled remote MCP link for free. No local server and no credit card.