Contextflo is now SOC 2 Type II compliant. See more

Connecting Cursor to Amazon Redshift through MCP

Connect Cursor to Amazon Redshift over MCP using AWS's redshift MCP server or Contextflo. Includes the read-only user SQL and mcp.json config for both.

Updated

Jump to a section

For Redshift you can run AWS's own MCP server locally from Cursor, or connect Redshift to Contextflo once and share it. The local server is quick if only you need it. Contextflo is the better fit when others on your team will ask questions from Cursor.

Option 1: AWS's Redshift MCP server in Cursor

AWS publishes awslabs.redshift-mcp-server. You run it with uvx, and it reads your AWS credentials from AWS_PROFILE and AWS_REGION. Add it to ~/.cursor/mcp.json or .cursor/mcp.json:

Loading code sample...

This runs on your machine with your AWS credentials. Each teammate would repeat the setup with their own. There is no shared context and no audit trail.

Option 2: Contextflo

Create a read-only user in Redshift:

Loading code sample...

Default privileges are per user that creates tables. Repeat the last line for each user that creates tables in that schema, not just dbt_user.

In Contextflo, go to Data Sources, then Add data source:

FieldValue
HostYour cluster endpoint
PortYour Redshift port
DatabaseThe database to expose
Usernamecontextflo_ro
PasswordThe password you generated

SSL and an SSH bastion are optional. You can also set a WLM query group with a timeout for this user, so a runaway query stops on its own.

Choose the tables, invite your team, and add Contextflo to Cursor:

Loading code sample...

Cursor handles the sign-in. Contextflo runs SELECT only. Descriptions for tables and columns are generated, team corrections become shared context, and table access is set per person. The audit trail records prompts and the SQL that ran, and a weekly digest summarizes usage.

Which one to use

Just you, with AWS credentials already on your laptop? Option 1. When the team asks too, use Contextflo so nobody needs AWS credentials, and you keep shared context, per-person table access and an audit trail.

You do the modeling, we do the rest. Connect Redshift free. Using Claude? See Claude with Redshift.

FAQ

Does AWS have an MCP server for Redshift that works in Cursor?

Yes. awslabs.redshift-mcp-server runs locally through uvx and uses your AWS profile and region. It is a stdio server, so it fits Cursor's command and args config.

Whose credentials does the AWS Redshift MCP server use?

The AWS credentials of the person running it, set with AWS_PROFILE and AWS_REGION. That means each person needs their own AWS access and there is no shared context or audit trail.

Why does the Contextflo setup use ALTER DEFAULT PRIVILEGES FOR USER?

Redshift default privileges apply per user that creates the tables. Run it once for each user (for example your dbt user) that creates tables, or new tables will not be readable.

Can I limit how long Cursor queries run on Redshift?

Optionally. Set up a WLM query group with a timeout for the Contextflo user.