Codex can reach Redshift two ways. AWS publishes a Redshift MCP server you run locally with your own AWS credentials. Contextflo connects once with a read-only database user and gives Codex a single URL. Pick based on whether it is just you or a team.
Option 1: AWS's Redshift MCP server in Codex
AWS publishes awslabs.redshift-mcp-server. You run it with uvx and your AWS profile and region. Add it to ~/.codex/config.toml:
[mcp_servers.redshift]
command = "uvx"
args = ["awslabs.redshift-mcp-server"]
[mcp_servers.redshift.env]
AWS_PROFILE = "<your profile>"
AWS_REGION = "<your region>"
It runs on per-person AWS credentials. There is no shared context and no audit trail of what was asked.
Option 2: Contextflo
Create a read-only user in Redshift:
CREATE USER contextflo_ro PASSWORD '<a strong generated password>';
GRANT USAGE ON SCHEMA analytics TO contextflo_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA analytics TO contextflo_ro;
ALTER DEFAULT PRIVILEGES FOR USER dbt_user IN SCHEMA analytics GRANT SELECT ON TABLES TO contextflo_ro;
Default privileges apply per user that creates tables. Repeat the last line for each such user.
Optionally add a WLM query group with a timeout.
In Contextflo, go to Data Sources, then Add data source, and choose Redshift. Enter host, port, database, username and password. SSL and an SSH bastion are optional. Pick tables and invite your team.
In Codex:
[mcp_servers.contextflo]
url = "https://mcp.contextflo.com/mcp"
codex mcp login contextflo
Check with codex mcp list. Contextflo runs SELECT only.
Which one to use
Just you, with AWS access already set up: Option 1.
Your team asks too: Contextflo. Teammates do not need AWS credentials. You get generated table and column descriptions, shared definitions, per-person table access and an audit trail of prompts and the SQL that ran.
On Claude? See Claude with Redshift.
You do the modeling, we do the rest. Connect Redshift free.
FAQ
What credentials does the AWS Redshift MCP server use in Codex? Your own AWS credentials, passed as AWS_PROFILE and AWS_REGION in the server's env table in config.toml. Every person who runs it needs their own AWS access.
Why does the default privileges line name dbt_user? Default privileges apply per user that creates tables. Run ALTER DEFAULT PRIVILEGES FOR USER once for each user that creates tables in the schema, otherwise new tables are not readable by the read-only user.
Can I stop runaway Redshift queries from Codex? Optionally set up a WLM query group with a timeout for the Contextflo user. It caps how long any one query can run.
Does Contextflo support SSL or an SSH bastion for Redshift? Yes, both are optional connection settings. The required fields are host, port, database, username and password.
See it on your own data.
Connect your warehouse and your team can ask Claude about it the same day, without waiting on a data team. Want a walkthrough first? Grab 20 minutes.
Book a 20-minute callSee how teams use Contextflo
Related posts
Keep reading

Conversational analytics: 5 ways to set it up, compared
7 min read

How to connect Claude to BigQuery? What works and what doesn't in 2026
8 min read

How to connect Claude to Postgres without giving it write access
9 min read

How to build a BI dashboard with Claude that your team can actually trust
8 min read

How to give Claude read-only access to your database (it isn't always the default)
7 min read

You connected your warehouse to Claude, now what?
5 min read

ClickHouse MCP: how to connect ClickHouse to Claude, Cursor or Codex
6 min read

Query BigQuery from the Codex CLI with MCP
5 min read

Run ClickHouse queries from Codex with MCP
6 min read


