Menu
Blog Documentation Community Pricing Demo Call Sign Up
Sign Up

How to Set Up a Redshift MCP Server for Claude, Cursor & Codex

Connect Claude, Cursor, Codex, or any AI agent to Amazon Redshift using MCP. Use PostgreSQL MCP servers or AWS's dedicated Redshift MCP server.

MCP

This post was written by an engineer at QueryPlane. QueryPlane is an app builder for your database: bring your own postgres db and you can create interactive applications to share with other developers, coworkers or even your customers. If you’re interested in trying it out, get started here.


MCP (Model Context Protocol) lets AI tools like Claude Desktop, Claude Code, Cursor, and Codex connect directly to your Amazon Redshift data warehouse. Since Redshift is PostgreSQL wire-compatible, any PostgreSQL MCP server works — plus AWS provides a dedicated Redshift MCP server.

In this post, we’ll cover:

  • What is MCP — How the protocol works
  • Best Redshift MCP servers — PostgreSQL-compatible and dedicated options
  • Setup guides — Step-by-step for Claude Desktop and Claude Code
  • Security considerations — Keeping your data warehouse safe

What is MCP?

The Model Context Protocol is an open standard created by Anthropic that lets AI applications connect to external data sources and tools. Think of it as a USB-C port for AI — a standardized way for any AI client to talk to any data source.

For data warehouses like Redshift, MCP servers expose tools for exploring schemas, running SQL, and analyzing data — all callable by AI agents without manual context.

Best Redshift MCP Servers

Since Redshift is PostgreSQL wire-compatible, any PostgreSQL MCP server works with Redshift out of the box.

1. Official Anthropic Server (@modelcontextprotocol/server-postgres)

The official reference implementation from Anthropic connects to Redshift directly via PostgreSQL protocol.

Claude Code setup:

claude mcp add --transport stdio redshift -- \
  npx -y @modelcontextprotocol/server-postgres \
  "postgresql://user:pass@cluster.region.redshift.amazonaws.com:5439/mydb"

Claude Desktop config:

{
  "mcpServers": {
    "redshift": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://user:pass@cluster.region.redshift.amazonaws.com:5439/mydb"
      ]
    }
  }
}

2. Postgres MCP Pro (CrystalDBA)

crystaldba/postgres-mcp (~2,600 stars) also works with Redshift and includes performance analysis features.

3. AWS Sample Redshift MCP Server

aws-samples/sample-amazon-redshift-MCP-server is an AWS reference implementation with Redshift-specific features.

Features:

  • Redshift-native connection handling
  • DDL retrieval and table statistics
  • Execution plans and table analysis

4. Google MCP Toolbox for Databases

googleapis/mcp-toolbox (~14,800 stars) supports Redshift via PostgreSQL connectivity alongside many other databases.

See what QueryPlane can build for you

Connect to your database, write SQL with AI, and build shareable apps — all from your browser.

Which Redshift MCP Server Should You Use?

ServerStarsApproachIAM auth
Anthropic Reference (Postgres)~84,000*PostgreSQL protocolNo
Postgres MCP Pro~2,600PostgreSQL protocolNo
AWS Sample RedshiftSampleRedshift-nativeNo
Google MCP Toolbox~14,800Multi-databaseYes

Stars for entire modelcontextprotocol/servers repo

For most developers, start with the official Anthropic Postgres server — it connects to Redshift instantly with zero extra setup. If you need IAM authentication, use the AWS sample server or Google MCP Toolbox.

Security Considerations

Connecting an AI agent to Redshift carries risk. Follow these practices:

  • Use a read-only user — create a dedicated user with SELECT-only permissions
  • Use IAM authentication — avoid storing passwords, use temporary credentials
  • Restrict schema access — grant access only to specific schemas
  • Set query limits — use WLM queues with query timeouts for MCP connections
  • Don’t expose credentials in configs — use environment variables or IAM roles
  • Monitor via STL_QUERY — track what queries the AI runs
-- Create a read-only user for MCP
CREATE USER mcp_reader PASSWORD 'secure_password';
GRANT USAGE ON SCHEMA public TO mcp_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO mcp_reader;
ALTER DEFAULT PRIVILEGES IN SCHEMA public
  GRANT SELECT ON TABLES TO mcp_reader;

Using MCP with QueryPlane

If you want the benefits of AI-powered database access without managing MCP servers, QueryPlane provides this out of the box. Connect your Redshift cluster and use AI to generate queries, explore schemas, and build dashboards — all from your browser with built-in access controls and team collaboration.

FAQ

What is a Redshift MCP server?

A Redshift MCP server is a process that implements the Model Context Protocol to let AI tools (Claude, Cursor, Codex, Windsurf) connect to your Amazon Redshift data warehouse. Since Redshift is PostgreSQL-compatible, any Postgres MCP server works.

How do I connect Claude to Redshift?

Use the official @modelcontextprotocol/server-postgres with your Redshift connection string. Add it to your Claude Desktop config or use claude mcp add in Claude Code.

Is it safe to connect AI to Redshift?

It can be safe with proper precautions: use a read-only user, IAM authentication, WLM query timeouts, and restricted schema access. Monitor queries via STL_QUERY.

Can I use any PostgreSQL MCP server with Redshift?

Yes. Redshift is PostgreSQL wire-compatible, so any PostgreSQL MCP server connects to Redshift with a standard connection string — just use port 5439 instead of 5432.

Wrapping up

Redshift’s PostgreSQL compatibility means you can connect AI agents immediately using any Postgres MCP server. For Redshift-specific features like IAM auth, use the AWS sample server. Start with a read-only user and see how AI-powered data access fits your analytics workflow.