New: one score for how consistent your answers are. See more

How to set up the Redshift MCP server for Claude or ChatGPT

AWS's Redshift MCP server runs every query through the Data API as an IAM role. How to lock it to read-only, connect Claude or ChatGPT, and cap the cost.

December 1, 2026•9 min read•Vivek Sah
Jump to a section

The Redshift MCP server most people find is AWS's own, and it doesn't log in to your database the way a SQL client does. It sends every query through the Redshift Data API, signed with an AWS profile, and Redshift sees that profile's IAM role as a database user. So "make it read-only" happens in two places: the IAM policy on the role, and the grants on the database user Redshift creates for it.

That design leaves your cluster's network alone and keeps passwords out of config files. It also means the setup steps in many tutorials, which start with CREATE USER ... PASSWORD, don't fit it. Below is the read-only setup that does, plus the direct-connection and Amazon Q alternatives and what a Serverless workgroup charges when an AI starts asking.

Two ways an AI reaches Redshift

Every option on this page uses one of two paths, and the path decides the network work, the credentials and who Redshift thinks is asking.

Through the Data APIDirect connection (port 5439)
Used byAWS Labs Redshift MCP server, AWS MCP ServerCommunity servers, SQL clients, Contextflo
NetworkAn HTTPS call to AWS; no inbound rule on your clusterCluster reachable from the caller: public endpoint plus a security group rule, or an SSH bastion
CredentialsAn AWS profile on the machine running the serverA database username and password
Who Redshift seesIAM:<user> or IAMR:<role>The database user you created
Limits500 MB per result, results kept 24 hours, 200 KB per statementWhatever your driver and cluster allow
Works withServerless workgroups and RA3 or RG provisioned clustersAny cluster your network can reach

The Data API limits and supported node types are from AWS's Data API guide. (Source: Amazon Redshift docs: Using the Amazon Redshift Data API, https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html, checked on 2026-12-01) If your cluster runs older DC2 nodes, the Data API isn't on the supported list, so the direct path is the one that works.

The AWS Labs Redshift MCP server

awslabs.redshift-mcp-server lives in the awslabs/mcp monorepo and runs locally with uvx. It has eight tools: list_clusters finds provisioned clusters and Serverless workgroups, list_databases, list_schemas, list_tables and list_columns walk the catalog, execute_query runs one SQL statement, review_cluster runs diagnostics, and retrieve_skill_file hands the AI a Redshift guide. (Source: GitHub: awslabs/mcp, Redshift MCP server README, https://github.com/awslabs/mcp/tree/main/src/redshift-mcp-server, checked on 2026-12-01)

Read-only is the default. Unless ACCESS_MODE is set to read-write, each query runs inside BEGIN READ ONLY and is rolled back, "so nothing is persisted", and a statement guard rejects multiple statements and types like GRANT, TRUNCATE and UNLOAD. A typo in ACCESS_MODE falls back to read-only. Results over MAX_RESULT_ROWS (1,000 by default) are refused rather than cut off, which matters when someone asks for a full export. The README is blunt about where the real lock is: "The database user's privileges are the security boundary, not this server."

Provisioned and Serverless both work. Since a cluster and a workgroup can share a name, every SQL tool takes a cluster_type of provisioned or serverless.

The other servers you'll find

  1. aws-samples/sample-amazon-redshift-MCP-server still ranks for "redshift mcp", but it was archived on July 13, 2025 with a note that AWS "has officially released the Amazon Redshift MCP Server". (Source: GitHub: aws-samples/sample-amazon-redshift-MCP-server, https://github.com/aws-samples/sample-amazon-redshift-MCP-server, checked on 2026-12-01) It connected directly with a host, user and password in environment variables, and its README doesn't describe a read-only mode.
  2. The AWS MCP Server is a managed server, generally available since May 6, 2026, that gives AI agents access to AWS APIs at no additional charge beyond the resources they use. (Source: AWS What's New: The AWS MCP Server is now generally available, https://aws.amazon.com/about-aws/whats-new/2026/05/aws-mcp-server/, checked on 2026-12-01) It can reach the Data API, but AWS's own November 2026 guidance notes it doesn't yet have the Redshift server's read-only default or row cap. (Source: AWS Big Data Blog: Guardrails and cost control for your agentic workloads with Amazon Redshift, https://aws.amazon.com/blogs/big-data/guardrails-and-cost-control-for-your-agentic-workloads-with-amazon-redshift/, checked on 2026-12-01) For SQL, use the Redshift server.
  3. The aws-data-analytics plugin from the Agent Toolkit for AWS installs the MCP configuration and Redshift skills in one step, for agents "such as Claude Code, Kiro, and Cursor". (Source: AWS What's New: Amazon Redshift integrates with Agent Toolkit for AWS, https://aws.amazon.com/about-aws/whats-new/2026/08/redshift-agenttoolkit-for-ai-assisted-datawarehouse-mgmt, checked on 2026-12-01) Same server underneath, less copying.

Set it up read-only

You need an AWS admin for the IAM role and a Redshift superuser for the grants.

  1. Create an IAM role for the server, with no write path. These are the actions the README lists for querying, with one deliberate swap: redshift-data:ExecuteStatement instead of BatchExecuteStatement. Without the batch action the server can't run writes or named transactions at all, so it stays read-only even if someone flips ACCESS_MODE later. (Source: AWS Big Data Blog: Guardrails and cost control for your agentic workloads with Amazon Redshift, https://aws.amazon.com/blogs/big-data/guardrails-and-cost-control-for-your-agentic-workloads-with-amazon-redshift/, checked on 2026-12-01) Narrow Resource to your cluster or workgroup ARNs once it works.
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "redshift:DescribeClusters",
        "redshift:GetClusterCredentialsWithIAM",
        "redshift-serverless:ListWorkgroups",
        "redshift-serverless:GetCredentials",
        "redshift-data:ExecuteStatement",
        "redshift-data:DescribeStatement",
        "redshift-data:GetStatementResult"
      ],
      "Resource": "*"
    }
  ]
}

Leave out redshift:GetClusterCredentials; the README says it's "best left out", because it lets the caller pick any database user.

  1. Point an AWS profile at that role. In ~/.aws/config, add a profile (here redshift-mcp-ro) that assumes the role. The server only ever uses the profile in its config, and the AI can't switch to a broader one.

  2. Grant SELECT to the user Redshift creates for the role. When the server first connects, Redshift signs it in as IAMR: plus the role name. Ask your AI to list schemas once so the user exists, then run as a superuser:

GRANT USAGE ON SCHEMA analytics TO "IAMR:redshift-mcp-ro";
GRANT SELECT ON ALL TABLES IN SCHEMA analytics TO "IAMR:redshift-mcp-ro";

-- tables created later, by whoever builds them (dbt here)
ALTER DEFAULT PRIVILEGES FOR USER dbt_user IN SCHEMA analytics
  GRANT SELECT ON TABLES TO "IAMR:redshift-mcp-ro";

The default-privileges line is the one most setups miss. In Redshift it applies to objects created by the user you name, so granting defaults for yourself does nothing for the tables dbt rebuilds every night, and a week later the AI reports a table "does not exist".

  1. Cap each query. AWS recommends three ceilings on day one: a per-statement timeout for each agent user, max capacity on the workgroup, and a daily usage limit. (Source: AWS Big Data Blog: Guardrails and cost control for your agentic workloads with Amazon Redshift, https://aws.amazon.com/blogs/big-data/guardrails-and-cost-control-for-your-agentic-workloads-with-amazon-redshift/, checked on 2026-12-01) The first is SQL:
ALTER USER "IAMR:redshift-mcp-ro" SET statement_timeout TO 120000;
ALTER USER "IAMR:redshift-mcp-ro" CONNECTION LIMIT 10 SESSION TIMEOUT 300;

The other two are in the Serverless console under the workgroup's Limits tab. On a provisioned cluster, a WLM queue for the role does the same job.

  1. Add it to your AI client. Below.

Claude Code

claude mcp add redshift \
  -e AWS_PROFILE="redshift-mcp-ro" \
  -e AWS_REGION="us-east-1" \
  -- uvx awslabs.redshift-mcp-server@latest

Claude Desktop, Cursor or Kiro

The same block goes in claude_desktop_config.json (Settings, then Developer, then Edit Config), ~/.cursor/mcp.json or ~/.kiro/settings/mcp.json. It needs uv and Python 3.10 or newer on the machine.

{
  "mcpServers": {
    "awslabs.redshift-mcp-server": {
      "command": "uvx",
      "args": ["awslabs.redshift-mcp-server@latest"],
      "env": {
        "AWS_PROFILE": "redshift-mcp-ro",
        "AWS_REGION": "us-east-1",
        "LOG_LEVEL": "INFO"
      }
    }
  }
}

ChatGPT

ChatGPT adds MCP servers by URL in its connectors settings, and the AWS Labs server runs over stdio on your machine. To use it from ChatGPT, run it behind an HTTP transport somewhere ChatGPT can reach, with authentication in front, under the same read-only profile. Claude and ChatGPT both speak MCP, the open standard, so the tools and the IAM setup are identical; only the hosting changes.

Then ask something you already know the answer to, like last month's order count, and compare. If the AI says a table doesn't exist, go back to step 3.

If you'd rather connect directly

Some teams already expose Redshift to BI tools over port 5439 and would rather reuse that. Community MCP servers and most SQL tools take a host, port, database and password. The read-only user is a normal Redshift user with CREATE USER contextflo_readonly PASSWORD '...' and the same GRANT USAGE, GRANT SELECT and default-privileges lines as above.

The work is in the network. "Publicly accessible" on its own isn't enough: it gives the cluster a routable address, but the VPC security group still needs an inbound rule for TCP 5439 from the caller's IPs, and the default security group only allows traffic from inside the VPC. For a cluster that must stay private, an SSH bastion in the VPC is the usual route. Our Redshift setup guide has both, step by step.

Check any community server's write behavior before you install it, since AWS's archived sample is the one most of them descend from, and it had no read-only switch. The SELECT-only user is the lock either way.

The AWS-native route: Amazon Q in the query editor

If people only need help writing SQL, Redshift already has an assistant. Amazon Q generative SQL in Query Editor v2 generates SQL from a prompt and the schema of the database a notebook is connected to. (Source: Amazon Redshift docs: Interacting with Amazon Q generative SQL, https://docs.aws.amazon.com/redshift/latest/mgmt/query-editor-v2-generative-ai.html, checked on 2026-12-01) An admin turns it on under Generative SQL settings, users need sqlworkbench:GetQSqlRecommendations, and the admin can upload a custom context file with table and column annotations, curated question-and-SQL pairs and definitions like "total sales is price * revenue".

It has firm edges. Questions must be in English, about data in the connected database, and can't reference an external schema. It lives inside the query editor, so it serves people who already open the Redshift console. On the free tier, the whole AWS account shares 1,000 prompts a month; on Amazon Q Developer Pro, each user gets 1,000. (Source: Amazon Redshift docs: Updating generative SQL settings as an administrator, https://docs.aws.amazon.com/redshift/latest/mgmt/query-editor-v2-generative-ai-settings.html, checked on 2026-12-01) Pro is $19 per user per month. (Source: Amazon Q Developer pricing, https://aws.amazon.com/q/developer/pricing/, checked on 2026-12-01) For an analyst writing SQL all day it's a good fit. For a sales lead who wants an answer in the Claude or ChatGPT window they already have open, it's the wrong place.

What it costs

AWS's position is that you pay for agent queries as you do for any other client: the compute and storage they use. (Source: AWS Big Data Blog: Guardrails and cost control for your agentic workloads with Amazon Redshift, https://aws.amazon.com/blogs/big-data/guardrails-and-cost-control-for-your-agentic-workloads-with-amazon-redshift/, checked on 2026-12-01) The server is free. The compute is where it adds up, and Serverless needs the most attention.

PieceHow it bills
AWS Labs Redshift MCP serverFree and open source
Redshift Serverless$0.375 per RPU-hour in us-east-1, billed per second with a 60-second minimum
Redshift provisionedThe node-hours you already pay; AI queries compete with your ETL for the same cluster
Amazon Q generative SQLFree tier of 1,000 prompts a month per account, or Q Developer Pro at $19 per user per month
Claude or ChatGPTThe plan your team already pays for

Serverless is where an AI assistant can surprise you. A new workgroup's default base capacity is 128 RPUs, and you can set it anywhere from 4 up. (Source: Amazon Redshift docs: Compute capacity for Amazon Redshift Serverless, https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-capacity.html, checked on 2026-12-01) At the published rate, 128 RPUs is $48 for every hour the workgroup is busy, and a short query that wakes an idle workgroup bills at least a minute, about $0.80. (Source: Amazon Redshift pricing, https://aws.amazon.com/redshift/pricing/, checked on 2026-12-01) An AI assistant asks in bursts: one question can run several queries while it explores the schema, then nothing for a while, so the workgroup keeps waking up for short runs.

What to set on a Serverless workgroup the AI uses. Give it a workgroup of its own, or at least its own max capacity, so an exploratory question can't scale your production workgroup. Set a daily RPU-hour usage limit with an alarm, and test that the alarm fires. Keep the per-user statement_timeout from step 4, which acts faster than queue rules: AWS notes those are checked every 10 seconds.

Where this stops being enough

The setup above works well for one person, or for a few engineers who know the schema. Each of them runs the server on their own laptop with an AWS profile, and Redshift sees every query as IAMR:redshift-mcp-ro. When a wrong number reaches a meeting, the query history shows the role, not the person or the question they asked.

The AI also starts from column names every time. stg_orders.status = 4 means nothing to Claude until someone tells it, and two people asking for "net revenue last month" can get two different queries. The custom context file in Amazon Q solves that inside the query editor, but it doesn't follow your team into Claude or ChatGPT.

Where Contextflo fits

Contextflo connects Claude or ChatGPT to Redshift, provisioned or Serverless, with one read-only user, and your team adds a single connector instead of an AWS profile each. Setup takes about 10 minutes with the Redshift setup guide. Point it at the GitHub or GitLab repo that holds your dbt project or app code, and it writes table and column descriptions and starter metric definitions from that code, your schema and your docs, so the AI knows what status = 4 means before anyone asks. Corrections your team saves are reused in every later answer, and the schema re-syncs daily.

It supports access control across all data sources, at the granularity each underlying data source supports, on every plan, and every question and query is logged per person, also on every plan. Redshift sits in the same connector as Snowflake, BigQuery, Postgres and your uploaded spreadsheets.

It works with the Claude or ChatGPT subscription your team already pays for, so there's one AI bill and you pick the model. Pricing is from $500/month for up to 10 people, unlimited queries, and it's free for one user and one data source. The shorter version of this comparison, for people searching for a Claude connection specifically, is at Connect Claude to Redshift.

Tilt, a live-auction marketplace for limited-edition goods, runs Contextflo with a one-person data team: about 6,000 queries a month, with 30+ people asking every week.

Here is a more in-depth look at Contextflo and how it works.

What is Contextflo?

Contextflo is a governed context layer between your data and the AI your team already uses. Connect your warehouse once, and your team asks questions in their own Claude or ChatGPT. The model writes and runs the SQL; Contextflo supplies the definitions, the per-user access control, and the audit that make the answers trustworthy. Your data never moves, and you do not need a data team.

How it works

1
Connect your data
Point Contextflo at your warehouse or database, or upload a CSV. It reaches multiple sources at once, so a single question can span all of them.
2
Bootstrap your context layer and review
Connect your code repo, Notion docs, or a data dictionary, and Contextflo annotates each table in your data source where it can. You review and correct them. That becomes the foundational context layer: your AI agent does not just see tables, it sees the context around them.
3
Define metrics and save golden queries
Pin the verified SQL behind a metric once. Every question then resolves against the same definitions, so the number is consistent no matter who asks or how they phrase it.

Contextflo, explained by our founder.

Your team queries in their own Claude or ChatGPT over MCP, so you bring any agent rather than a locked-in bot, and every answer comes back with the SQL shown and access enforced per user.

FAQ

Is there an official Redshift MCP server? Yes. AWS Labs publishes awslabs.redshift-mcp-server, an open-source server you run with uvx. It finds your provisioned clusters and Serverless workgroups, browses databases, schemas, tables and columns, and runs SQL through the Redshift Data API using your AWS credentials. AWS's own earlier sample server was archived in July 2025 in its favor.

Is the Redshift MCP server read-only? Yes, by default. It wraps each query in a read-only transaction that is rolled back, and it rejects statements like GRANT and UNLOAD. Writes need ACCESS_MODE=read-write. AWS still calls the database user's privileges the real security boundary, so give the IAM role it signs in as SELECT-only grants.

Does the Redshift MCP server work with Redshift Serverless? Yes. It lists provisioned clusters and Serverless workgroups side by side, and every SQL tool takes a cluster_type of provisioned or serverless. On Serverless the IAM role needs redshift-serverless:GetCredentials; on a provisioned cluster it needs redshift:GetClusterCredentialsWithIAM.

Can ChatGPT use the Redshift MCP server? Yes, once it is reachable by URL. ChatGPT adds MCP servers by URL in its connectors settings, while the AWS Labs server runs locally over stdio, so you host it over HTTP behind authentication first. Claude Code, Claude Desktop, Cursor and Kiro run it locally as is.

Can Contextflo connect Claude or ChatGPT to Redshift? Yes. Contextflo connects Redshift, provisioned or Serverless, with a read-only user in about 10 minutes, alongside Snowflake, BigQuery, Postgres, Databricks, MySQL, ClickHouse and uploaded files. It supports access control across all data sources, at the granularity each underlying data source supports, on every plan, logs every question per person, and runs on the Claude or ChatGPT subscription your team already pays for, with unlimited queries.