Redshift

How to Connect Redshift to Claude

Query your Redshift data with AI — step by step. We'll show you both the manual approach and the faster way with Contextary.

Manual Approach

The Hard Way (Without Contextary)

You can make this work. It just takes more effort than you'd expect. Here's the full picture.

1

Get your Redshift cluster endpoint and credentials

You'll need the cluster endpoint (host and port, usually 5439), database name, username, and password. If you're using Redshift Serverless, the endpoint format is different. Check the AWS console or ask your data engineering team for the connection details.

2

Configure VPC and security group access

Most Redshift clusters aren't publicly accessible. You'll need to configure VPC settings, update security group inbound rules, and potentially set up a bastion host or SSH tunnel. If your cluster uses IAM authentication instead of password auth, there's another layer of AWS configuration to work through.

3

Find or build an MCP server for Redshift

Redshift is less commonly supported than Postgres or BigQuery in the MCP ecosystem. You may find a community server that works (Redshift is wire-compatible with Postgres, so some Postgres MCP servers work — mostly), or you may need to build your own. Be prepared to debug Redshift-specific SQL dialect differences.

4

Write a comprehensive prompt explaining your schema

Document your tables, columns, sort keys, distribution keys, and materialized views. Redshift schemas tend to be large — with staging tables, raw tables, and transformed tables often coexisting. Claude needs to understand which schema to query (raw vs analytics vs staging) and why.

5

Document which schemas to query

Most Redshift warehouses have multiple schemas: raw ingestion tables, transformed models, and analytics-ready views. Claude doesn't know which to use unless you tell it. And if you don't specify correctly, it might query the raw tables (slow, messy) instead of the clean analytics models.

6

Manually specify metric calculations

Explain every metric formula in your prompt: how to calculate MRR, what counts as a "new" customer, how to handle currency conversions, what date ranges map to fiscal quarters. Without these, Claude will invent plausible-looking but wrong calculations.

7

Run into context window limits

Redshift schemas tend to be massive. Between the DDL, the business rules, the metric definitions, and the gotchas, your system prompt can easily exceed context window limits. You'll start trimming information and hoping Claude doesn't need the parts you cut.

8

Re-explain everything each conversation

Claude doesn't remember between conversations. Every new chat session, you need to paste in your entire system prompt again. If you refined the prompt during the last conversation ("oh, also filter out the EU staging data"), that improvement is lost unless you manually saved it.

This works... sort of.

But you'll spend more time managing prompts and copying SQL than actually getting answers. And every person on your team has to set this up independently.

The Contextary Way

The Easy Way (With Contextary)

Same result, fraction of the effort. Here's the entire setup.

1

Install Contextary and connect Redshift

Enter your Redshift cluster endpoint, database, and credentials. Contextary handles the connection — whether it's a provisioned cluster or Redshift Serverless — and discovers your schemas, tables, and columns automatically.

2

Contextary auto-discovers your schema

Every schema, table, column, and data type is cataloged — including views, materialized views, and external tables. No context window limits, no deciding what to include. Contextary handles even the largest Redshift deployments.

3

Add your team's knowledge

Document which schemas to prefer, metric formulas, business rules, and data gotchas. AI suggests annotations based on your schema. Specify that analytics queries should use the analytics schema, not raw — and every AI tool follows that rule.

4

Connect Claude to Contextary

One config line connects Claude to Contextary via MCP. No separate MCP server to find or build. No VPC tunneling to configure. Claude gets your full schema, your team's knowledge, and direct query access.

5

Ask questions and get accurate answers

Ask Claude anything about your Redshift data. Contextary provides the context — including which schema to query, how to calculate metrics, and what to filter out. Claude writes accurate Redshift SQL, Contextary tells your warehouse what query to run, and you get the answer. No AWS console, no copy-pasting.

Your entire team gets the same context.

When someone adds a gotcha or updates a metric definition, every AI tool sees it immediately. No prompt maintenance, no context window limits, no re-explaining.

Side-by-Side Comparison

Without Contextary With Contextary
Setup time Hours of prompt engineering 60 seconds
Schema changes Manual prompt updates Auto-discovered
Business rules Copy-pasted into prompts Documented once, shared everywhere
Team consistency Everyone writes their own prompt One source of truth
Metric definitions Explained each time Defined with exact formulas
Query execution Copy-paste between tools Contextary runs it for you
Maintenance Ongoing prompt management Set it and forget it

Ready to skip the hard way?

Connect Redshift to Claude in 60 seconds. Free to get started.