Skip to main content
All connectors
qbash Connectors / Amazon Redshift

Amazon Redshift MCP serverand Python AI tasks

qbash hosts a Amazon Redshift MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse. Developers use qbash Tasks to write cloud-hosted Python functions that pair Amazon Redshift with models such as Claude and GPT.

Add the qbash MCP

Use Amazon Redshift from Claude Code, Codex, Cursor and other MCP clients. Connect Amazon Redshift in qbash, and your agent can work with its data and build Tasks that call it.

claude mcp add --transport http qbash https://mcp.qbash.com/mcp

Then run /mcp in Claude Code and sign in with qbash.

  • Run a SQL statement, wait for it to finish and return the rows
  • Start a SQL statement without waiting and return its statement id
  • Run several SQL statements in order as one transaction
  • Check a statement's status, duration, rows affected and error message
  • Read the rows and column metadata of a finished statement, a page at a time
  • Cancel a statement that is still running
Read the docs

Write a Amazon Redshift task in Python

A qbash Task is a Python function hosted in the cloud. Python is the runtime and defines the process, and built-in inline prompts run on leading models such as Claude, GPT, Gemini and Grok.

Run a Task on a schedule, from an HTTP request or when a connected app sends an event. Your agents and chat tools call it over MCP.

Each run is logged with its inputs and results, and you can turn data logging off for any Task. Every Task has version control, and each run is locked to the version it ran.

Explain the last day of failed COPY loads

The query reads the last 24 hours of rows from STL_LOAD_ERRORS. An inline prompt groups the failures by file and column and suggests the COPY option or data fix for each group.

main.py
report = qbash.integrations.redshift.execute_query(
sql="""SELECT starttime, TRIM(filename) AS filename, line_number,
TRIM(colname) AS colname, TRIM(type) AS type,
TRIM(raw_field_value) AS raw_field_value, TRIM(err_reason) AS err_reason
FROM stl_load_errors
WHERE starttime >= DATEADD(hour, -24, GETDATE())
ORDER BY starttime DESC
LIMIT 200""",
database="analytics",
cluster_identifier="analytics-prod",
read_only=True,
)
rows = report["result"]
if rows:
summary = qbash.ai.run_prompt(
slug="redshift-load-errors",
variables={"errors": json.dumps(rows)},
)
qbash.output(summary)
else:
qbash.output("No COPY load errors in the last 24 hours.")
Sample execute_query response
{
"status": "success",
"result": [
{
"starttime": "2026-11-11 06:14:22",
"filename": "s3://acme-raw/orders/2026-11-11/part-0003.csv.gz",
"line_number": 18422,
"colname": "order_total",
"type": "numeric",
"raw_field_value": "1,204.50",
"err_reason": "Invalid digit, Value ',', Pos 1, Type: Decimal"
},
{
"starttime": "2026-11-11 06:14:22",
"filename": "s3://acme-raw/orders/2026-11-11/part-0003.csv.gz",
"line_number": 18977,
"colname": "order_total",
"type": "numeric",
"raw_field_value": "2,310.00",
"err_reason": "Invalid digit, Value ',', Pos 1, Type: Decimal"
},
{
"starttime": "2026-11-11 07:02:09",
"filename": "s3://acme-raw/customers/2026-11-11/customers.csv",
"line_number": 551,
"colname": "company_name",
"type": "varchar",
"raw_field_value": "Northwind Analytics and Consulting Group International",
"err_reason": "String length exceeds DDL length"
}
],
"row_count": 3,
"truncated": false,
"statement_id": "d9b6c0c9-0747-4bf4-b142-e8883122f766"
}

Custom MCP server

Build a custom MCP server with Amazon Redshift

Create a hosted MCP server that combines Amazon Redshift tools with your other connectors, Tasks and memory folders. You choose each tool it exposes, so a server can share Amazon Redshift reads with write tools left off.

Share the server with your team, and each person adds it to the client they already use.

How to set it up

  1. Connect Amazon Redshift on the qbash Connectors page.
  2. Create an MCP server and add the Amazon Redshift tools you want to share.
  3. Paste the server URL into your client. It connects with OAuth or an access token.

Amazon Redshift MCP questions

Does Amazon Redshift have an official MCP server?

AWS Labs publishes an open source Redshift MCP server that you run on your own machine with uvx or Docker and your AWS credentials, and it queries clusters and workgroups through the Redshift Data API, read-only unless you opt in to writes. As of November 2026 AWS does not host one for you. qbash hosts its server on one URL with your other connectors, and the same methods run in Python Tasks.

What does the Redshift connector need to connect?

An AWS access key or IAM role with the redshift-data permissions for the methods you use, and a way into the database. That can be a Secrets Manager secret holding the database user and password, or temporary credentials from GetClusterCredentials on a cluster and GetCredentials on a Serverless workgroup.

Can I keep the Redshift MCP server to reads?

Connect a database user granted only SELECT on the schemas it should see, or set read_only on execute_query. The Data API runs whatever SQL the database user is allowed to run.

Build a Amazon Redshift task

Write it in Python with AI steps, or describe it to your coding agent through the qbash MCP.