About MCP Server for Amazon Redshift
This TypeScript MCP server is for users of Amazon Redshift databases. It provides database object discovery, schema inspection, and read-only SQL queries over stdio or SSE.
Key features
- 01List tables, views, and materialized views
- 02Retrieve schemas for multiple tables
- 03Run read-only SQL queries
- 04Support stdio and SSE transports
Use cases
- 01Browse database objects in selected schemas
- 02Inspect column structures across tables
- 03Run read-only analytical queries on Redshift
MCP support
The server exposes tools for listing database objects, retrieving table schemas, and running read-only queries to MCP clients. It supports stdio and SSE transports.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Server for Redshift
A Model Context Protocol (MCP) server implementation for Amazon Redshift, providing a standardized interface for interacting with Redshift databases through AI models.
Features
- List tables, views, and materialized views across multiple schemas
- Get detailed schema information for multiple tables in a single request
- Execute read-only SQL queries against Redshift
- Support for both stdio and SSE (Server-Sent Events) transport
- Type-safe implementation in TypeScript
Prerequisites
- Node.js 18 or higher
- Access to a Redshift database
- Environment variables configured (see Configuration section)
Installation
-
Clone the repository:
git clone https://github.com/yourusername/mcp-server-redshift.git cd mcp-server-redshift -
Install dependencies:
npm install -
Build the project:
npm run build
Configuration
Create a .env file in the root directory with the following variables:
# Redshift Connection
REDSHIFT_HOST=your-redshift-host
REDSHIFT_PORT=5439
REDSHIFT_DATABASE=your-database
REDSHIFT_USER=your-username
REDSHIFT_PASSWORD=your-password
REDSHIFT_SCHEMAS=public,schema1,schema2 # Comma-separated list of schemas
# Server Configuration
TRANSPORT_TYPE=stdio # or 'sse' for Server-Sent Events
PORT=3000 # Only used when TRANSPORT_TYPE=sse
Usage
Running the Server
# Development
npm run dev
# Production
npm run build
npm start
Available Tools
-
List Tables (
list_tables)- Lists all tables, views, and materialized views in specified schemas
- Optional
schemasparameter to filter by specific schemas
{ "schemas": ["public", "analytics"] } -
Get Tables Schema (
get_tables_schema)- Get schema information for multiple tables across different schemas
{ "tables": [ { "schema": "public", "table": "users" }, { "schema": "analytics", "table": "events" } ] } -
Query (
query)- Execute read-only SQL queries against the database
{ "sql": "SELECT * FROM public.users LIMIT 5" }
Testing
Run the test suite:
npm test
Architecture
The project is organized into the following structure:
src/
├── config/ # Configuration and database setup
├── tools/ # Individual tool implementations
├── server/ # Server setup and transport configuration
└── index.ts # Main entry point
Security Considerations
- All queries are executed in read-only transactions
- Environment variables should be properly secured
- CORS is enabled for SSE transport (should be configured for production)
- Database credentials should be managed securely
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
This project is based on the PostgreSQL MCP server from the Model Context Protocol project. Special thanks to the original authors for their work.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.