How to connect a database to Claude.
The safest useful pattern is a dedicated read-only database identity, a small allowlist of schemas, and an authenticated remote MCP server between Claude and the source. Data Connector provides that path for PostgreSQL today.
1. Create a reader role
Grant only connection, schema usage, and table selection permissions. Do not reuse an application owner or migration credential.
2. Connect PostgreSQL in Data Connector
Sign in or sign up, choose your Loam workspace, enter the public TLS endpoint, and test the connection. You can restrict discovery to named schemas.
3. Add the MCP server to Claude
In Claude, open Customize, then Connectors, and add:
https://dataconnector.ai/api/mcpSelect Connect and authorize the workspace that contains your source.
4. Start with discovery
Try: List the data sources I can access, then describe the reporting tables. Follow with a focused analytical question. Data Connector bounds each query and returns structured results.
Frequently asked questions
How does Claude connect to my database?
Claude calls Data Connector through MCP. Data Connector keeps the database credential on the server and checks your Loam workspace access.
Which live database can I connect today?
Live external connections currently support PostgreSQL. SQLite files use Loam's authenticated import flow.
Can Claude write to my database?
No. The current Data Connector tools are read-only and each query runs with strict limits.