Redshift MCP Server
Redshift MCP-Server
Ein Model Context Protocol (MCP)-Server für Amazon Redshift, der KI-Assistenten die Interaktion mit Redshift-Datenbanken ermöglicht.
Einführung
Redshift MCP Server ist eine Python-basierte Implementierung des Model Context Protocol , die Tools und Ressourcen für die Interaktion mit Amazon Redshift-Datenbanken bereitstellt. KI-Assistenten können damit:
Auflisten von Schemata und Tabellen in einer Redshift-Datenbank
Abrufen von Tabellen-DDL-Skripten (Data Definition Language)
Tabellenstatistiken abrufen
Ausführen von SQL-Abfragen
Analysieren Sie Tabellen, um statistische Informationen zu sammeln
Abrufen von Ausführungsplänen für SQL-Abfragen
Related MCP server: MCP SQL Server
Installation
Voraussetzungen
Python 3.13 oder höher
Amazon Redshift-Cluster
Redshift-Anmeldeinformationen (Host, Port, Benutzername, Passwort, Datenbank)
Von der Quelle installieren
# Clone the repository
git clone https://github.com/Moonlight-CL/redshift-mcp-server.git
cd redshift-mcp-server
# Install dependencies
uv syncKonfiguration
Der Server benötigt die folgenden Umgebungsvariablen, um eine Verbindung zu Ihrem Redshift-Cluster herzustellen:
RS_HOST=your-redshift-cluster.region.redshift.amazonaws.com
RS_PORT=5439
RS_USER=your_username
RS_PASSWORD=your_password
RS_DATABASE=your_database
RS_SCHEMA=your_schema # Optional, defaults to "public"Sie können diese Umgebungsvariablen direkt festlegen oder eine .env Datei verwenden.
Verwendung
Starten des Servers
# Start the server
uv run --with mcp python-dotenv redshift-connector mcp
mcp run src/redshift_mcp_server/server.pyIntegration mit KI-Assistenten
Um diesen Server mit einem KI-Assistenten zu verwenden, der MCP unterstützt, fügen Sie Ihren MCP-Einstellungen die folgende Konfiguration hinzu:
{
"mcpServers": {
"redshift": {
"command": "uv",
"args": ["--directory", "src/redshift_mcp_server", "run", "server.py"],
"env": {
"RS_HOST": "your-redshift-cluster.region.redshift.amazonaws.com",
"RS_PORT": "5439",
"RS_USER": "your_username",
"RS_PASSWORD": "your_password",
"RS_DATABASE": "your_database",
"RS_SCHEMA": "your_schema"
}
}
}
}Merkmale
Ressourcen
Der Server stellt die folgenden Ressourcen bereit:
rs:///schemas- Listet alle Schemata in der Datenbank aufrs:///{schema}/tables- Listet alle Tabellen in einem bestimmten Schema aufrs:///{schema}/{table}/ddl- Ruft das DDL-Skript für eine bestimmte Tabelle abrs:///{schema}/{table}/statistic- Ruft Statistiken für eine bestimmte Tabelle ab
Werkzeuge
Der Server stellt die folgenden Tools bereit:
execute_sql– Führt eine SQL-Abfrage im Redshift-Cluster ausanalyze_table- Analysiert eine Tabelle, um statistische Informationen zu sammelnget_execution_plan- Ruft den Ausführungsplan mit Laufzeitstatistiken für eine SQL-Abfrage ab
Beispiele
Auflisten von Schemata
access_mcp_resource("redshift-mcp-server", "rs:///schemas")Auflisten von Tabellen in einem Schema
access_mcp_resource("redshift-mcp-server", "rs:///public/tables")Tabellen-DDL abrufen
access_mcp_resource("redshift-mcp-server", "rs:///public/users/ddl")Ausführen von SQL
use_mcp_tool("redshift-mcp-server", "execute_sql", {"sql": "SELECT * FROM public.users LIMIT 10"})Analysieren einer Tabelle
use_mcp_tool("redshift-mcp-server", "analyze_table", {"schema": "public", "table": "users"})Ausführungsplan abrufen
use_mcp_tool("redshift-mcp-server", "get_execution_plan", {"sql": "SELECT * FROM public.users WHERE user_id = 123"})Entwicklung
Projektstruktur
redshift-mcp-server/
├── src/
│ └── redshift_mcp_server/
│ ├── __init__.py
│ └── server.py
├── pyproject.toml
└── README.mdAbhängigkeiten
mcp[cli]>=1.5.0- Modellkontextprotokoll-SDKpython-dotenv>=1.1.0– Zum Laden von Umgebungsvariablen aus .env-Dateienredshift-connector>=2.1.5– Python-Connector für Amazon Redshift
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 Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to securely interact with ClickHouse databases, supporting table exploration and SQL query execution through a controlled interface.18Apache 2.0
- Alicense-qualityDmaintenanceA Model Context Protocol server that provides AI assistants with comprehensive access to SQL databases, enabling schema inspection, query execution, and database operations with enterprise-grade security.707MIT
- Flicense-qualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with Vertica databases through SQL queries, schema inspection, database documentation, and data export capabilities.1
- Flicense-qualityDmaintenanceAn MCP server that enables AI assistants to interact with PostgreSQL databases by executing SQL queries and inspecting database schemas. It provides tools for standardized database exploration and management through the Model Context Protocol.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
GibsonAI MCP server: manage your databases with natural language
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/Moonlight-CL/redshift-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server