If you've ever wanted to ask your database a question in plain English and get a real answer, that moment is now. Claude can query your PostgreSQL database directly — and this guide shows you the fastest way to set it up. (New to MCP? See [What is an MCP Server?](/content/blog/what-is-an-mcp-server/index.html))

## What Is MCP?

MCP stands for **Model Context Protocol**. It's an open standard that lets AI models like Claude connect to external tools and data sources — databases, APIs, file systems, and more. Instead of copy-pasting query results into a chat window, Claude connects directly to your database and runs queries on your behalf.

The result: you can ask "which customers haven't ordered in the last 90 days?" and Claude will write the SQL, run it against your database, and give you the answer — all in one step.

## Why This Matters for PostgreSQL

PostgreSQL is where most serious data lives. Product analytics, user records, financial transactions, audit logs — if your team runs on Postgres, connecting Claude to it transforms how you interact with that data.

Without MCP, the workflow looks like this:

1. Open a SQL client
2. Write a query (or guess the schema)
3. Export results
4. Paste into Claude
5. Ask your question
6. Repeat when the answer raises a follow-up

With MCP, that entire loop collapses into a single conversation. Claude knows your schema, writes the queries, and iterates on its own.

## The Two Ways to Do This

**Option 1 — Local MCP server.** You install a Node.js or Python MCP server on your machine, edit a JSON config file in Claude Desktop, handle connection strings, manage environment variables, and restart the app every time something changes. It works, but it's fiddly — especially across a team or on a remote database.

**Option 2 — Managed MCP gateway (Synra).** You save your database credentials once in a secure dashboard. Synra gives you a single HTTPS URL. You paste that URL into Claude Desktop. Done.

No local install. No config files. No restart-and-debug loop. And because it's a hosted service at [mcpserver.design](/content/site-root.html), it works the same whether your database is on AWS RDS, Neon, Railway, DigitalOcean, or your own server.

## Step-by-Step: Connect PostgreSQL via Synra

### Step 1 — Get your database credentials

You'll need:

- **Host** — e.g. `db.example.us-east-1.rds.amazonaws.com`
- **Port** — usually `5432`
- **Database name**
- **Username** and **password**

If you're using Neon or Supabase, you can copy the connection string directly from your project dashboard.

### Step 2 — Save credentials in Synra

1. Sign in at [mcpserver.design](/content/site-root.html)
2. Go to **Credentials** → **Add Database**
3. Select PostgreSQL, fill in your connection details, and save
4. Synra encrypts your credentials with AES-256 and immediately tests the connection

### Step 3 — Copy your MCP URL

Once your connection is verified, Synra generates a personal MCP endpoint URL — something like:

```
https://gateway.mcpserver.design/mcp/your-token
```

Copy it from the **Endpoints** tab in your dashboard.

### Step 4 — Add it to Claude

Open Claude → **Settings** → **Connectors** → **Add custom connector** → paste your Synra URL. No config files needed. Claude is now connected.

## What You Can Do Now

With the connection live, try asking Claude:

- _"What are the 10 most active users this week?"_
- _"Show me all orders over $500 placed in the last 30 days."_
- _"Which tables reference the `users` table?"_

Claude will inspect your schema, write appropriate SQL, and return real results. All queries are **read-only by default** — Synra blocks INSERT, UPDATE, DELETE, DROP, and ALTER at the gateway level, so there's no risk of accidental writes.

* * *

Ready to try it? Set up takes under 60 seconds at [mcpserver.design](/content/site-root.html).
