Redshift MCP Server
Provides read-only access to Amazon Redshift databases, enabling data discovery, metadata exploration, querying, query explanation, and CSV export while enforcing schema allowlists and row limits.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Redshift MCP ServerWhat are the top 5 customers by revenue?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Redshift MCP Server
This MCP (Model Context Protocol) server provides secure, read-only access to Amazon Redshift databases for use with Claude Desktop and other MCP-compatible clients. It acts as an intelligent bridge, empowering AI assistants to independently navigate, understand, and extract insights directly from your data warehouse.
โจ Key Features
10 Specialized Tools: A full suite of tools for data discovery, metadata extraction, querying, and exporting.
Dynamic Configuration: Fully configurable via
.env(allowlists, row limits, connection parameters).Transport Modes: Supports both
stdio(for local clients like Claude Desktop) andsse(Server-Sent Events over HTTP for remote connections).Connection Caching: Efficient connection management with single long-lived health-checked connections to Redshift.
Enterprise Security:
Strictly read-only SQL validation.
Schema allowlisting (restricts AI to pre-approved schemas).
Hard caps on query and export row counts to protect database performance.
SSH Tunnel Support: Connects seamlessly to private VPC Redshift clusters via an integrated
sshtunnel.
๐ ๏ธ MCP Tools Available
Data Discovery & Navigation
get_allowed_schemas: Return the server's schema access configuration (allowlist, default schema, limits).list_schemas: Discover accessible schemas in the database (filtered by the configured allowlist).list_tables: List all tables in a schema. Only schemas in the allowlist are accessible.describe_table: Get column names, data types, nullability, and defaults for a table.search_columns: Search for columns whose name matches a keyword (case-insensitive) across all tables in allowed schemas.
Data Analysis & Extraction
sample_data: Return a quick sample of rows from a table for data exploration.table_row_count: Get the exact row count for a table usingCOUNT(*).query_data: Run a read-onlySELECTquery. Automatically wraps and limits results based on server configuration.explain_query: Show theEXPLAINplan for a query to understand performance before executing.export_to_csv: Export query results to CSV format with a higher dedicated row limit (MAX_EXPORT_ROWS).
๐ Setup & Installation
1. Install Dependencies
# Clone the repository
git clone <repository-url>
cd redshift-mcp-server
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt2. Configure Environment
Copy the example environment file and edit with your credentials:
cp .env.example .envEdit the .env file to configure your Redshift connection and server limits:
# --- Redshift Connection ---
RS_HOST=your-cluster.region.redshift.amazonaws.com
RS_DB=your_database_name
RS_USER=your_readonly_user
RS_PASS=your_password
RS_PORT=5439
# --- Security & Limits ---
ALLOWED_SCHEMAS=gold_capsaai,report_capsaai
DEFAULT_SCHEMA=gold_capsaai
MAX_ROWS=500
MAX_EXPORT_ROWS=5000
# --- SSH Tunnel (For Private VPCs) ---
SSH_TUNNEL=false
# If true, provide SSH_HOST, SSH_USER, SSH_KEY_FILE, etc.3. Start the Server
Mode 1: stdio (Default)
Best when the MCP Client (e.g. Claude Desktop) is running on the same machine.
python server.pyMode 2: sse (HTTP)
Best for accessing the server remotely via HTTP or tunnels.
# Start SSE on port 8000
python server.py --sse --host 0.0.0.0 --port 8000๐ Connecting to the Server
Option A: Local Claude Desktop (stdio)
If your Claude Desktop is running on the same machine as the server, edit your Claude Desktop configuration file:
Mac:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"redshift": {
"command": "/absolute/path/to/redshift-mcp-server/.venv/bin/python",
"args": ["/absolute/path/to/redshift-mcp-server/server.py"]
}
}
}Option B: Remote Connection (SSE + IDE)
If the server is running on a remote EC2 instance, start the server in --sse mode.
For IDEs that support direct SSE connections (like VS Code with Cline):
Add a new MCP server.
Set transport type to SSE.
Use the URL:
http://<EC2-IP>:8000/sse(or your tunnel URL).
๐งช Testing & Validation
The repository includes a comprehensive testing suite and diagnostic tools:
client.py: A CLI client that runs an end-to-end smoke test against all 10 tools.test_connection.py: Basic connectivity validation.test_restricted_access.py: Ensures schema security restrictions are working properly.monitor_mcp.sh: Production-ready monitoring with auto-restart, health checks, and logging.
๐๏ธ Architecture
graph TB
subgraph "Client Layer"
CD[Claude Desktop / MCP Client]
end
subgraph "MCP Server Layer"
MCP[FastMCP Server]
CONFIG[config.py / .env]
VALIDATION[SQL & Schema Validation]
end
subgraph "Network Layer"
SSH[SSH Tunnel<br/>(Optional)]
CONN[Connection Cache]
end
subgraph "Database Layer"
RS[Amazon Redshift]
SCHEMA[Allowed Schemas]
end
CD -->|JSON-RPC (stdio/sse)| MCP
MCP --> CONFIG
MCP --> VALIDATION
VALIDATION --> CONN
CONN --> SSH
SSH --> RS
RS --> SCHEMA๐ Security Considerations
Read-Only: The
_validate_read_only_sqlwrapper severely restricts queries toSELECTandEXPLAINstatements.Limits Engine: Double
LIMITsyntax bugs are prevented through regex parsing in_apply_limit, guaranteeing large table scans are capped at your.envthreshold.Schema Isolation: The AI cannot view or query tables outside the
ALLOWED_SCHEMAScomma-separated list.Keep Credentials Safe: Never commit your
.envor.jsonconfiguration files to version control. They are ignored in.gitignoreby default.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kartik-augusta/redshift-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server