awslabs.redshift-mcp-server 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- awslabs/__init__.py +16 -0
- awslabs/redshift_mcp_server/__init__.py +17 -0
- awslabs/redshift_mcp_server/consts.py +136 -0
- awslabs/redshift_mcp_server/models.py +141 -0
- awslabs/redshift_mcp_server/redshift.py +630 -0
- awslabs/redshift_mcp_server/server.py +621 -0
- awslabs_redshift_mcp_server-0.0.1.dist-info/METADATA +432 -0
- awslabs_redshift_mcp_server-0.0.1.dist-info/RECORD +12 -0
- awslabs_redshift_mcp_server-0.0.1.dist-info/WHEEL +4 -0
- awslabs_redshift_mcp_server-0.0.1.dist-info/entry_points.txt +2 -0
- awslabs_redshift_mcp_server-0.0.1.dist-info/licenses/LICENSE +175 -0
- awslabs_redshift_mcp_server-0.0.1.dist-info/licenses/NOTICE +2 -0
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: awslabs.redshift-mcp-server
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: An AWS Labs Model Context Protocol (MCP) server for Redshift
|
|
5
|
+
Project-URL: homepage, https://awslabs.github.io/mcp/
|
|
6
|
+
Project-URL: docs, https://awslabs.github.io/mcp/servers/redshift-mcp-server/
|
|
7
|
+
Project-URL: documentation, https://awslabs.github.io/mcp/servers/redshift-mcp-server/
|
|
8
|
+
Project-URL: repository, https://github.com/awslabs/mcp.git
|
|
9
|
+
Project-URL: changelog, https://github.com/awslabs/mcp/blob/main/src/redshift-mcp-server/CHANGELOG.md
|
|
10
|
+
Author: Amazon Web Services
|
|
11
|
+
Author-email: AWSLabs MCP <203918161+awslabs-mcp@users.noreply.github.com>, Sergey Konoplev <sergkono@amazon.com>
|
|
12
|
+
License: Apache-2.0
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
License-File: NOTICE
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: boto3>=1.38.39
|
|
25
|
+
Requires-Dist: botocore>=1.38.39
|
|
26
|
+
Requires-Dist: loguru>=0.7.0
|
|
27
|
+
Requires-Dist: mcp[cli]>=1.6.0
|
|
28
|
+
Requires-Dist: pydantic>=2.10.6
|
|
29
|
+
Requires-Dist: regex>=2024.11.6
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# Amazon Redshift MCP Server
|
|
33
|
+
|
|
34
|
+
Model Context Protocol (MCP) server for Amazon Redshift.
|
|
35
|
+
|
|
36
|
+
This MCP server provides tools to discover, explore, and query Amazon Redshift clusters and serverless workgroups. It enables AI assistants to interact with Redshift resources safely and efficiently through a comprehensive set of discovery and query execution tools.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- **Cluster Discovery**: Automatically discover both provisioned Redshift clusters and serverless workgroups
|
|
41
|
+
- **Metadata Exploration**: Browse databases, schemas, tables, and columns
|
|
42
|
+
- **Safe Query Execution**: Execute SQL queries in a READ ONLY mode (a safe READ WRITE support is planned to be implemnted in the future versions)
|
|
43
|
+
- **Multi-Cluster Support**: Work with multiple clusters and workgroups simultaneously
|
|
44
|
+
|
|
45
|
+
## Prerequisites
|
|
46
|
+
|
|
47
|
+
### Installation Requirements
|
|
48
|
+
|
|
49
|
+
1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/) or the [GitHub README](https://github.com/astral-sh/uv#installation)
|
|
50
|
+
2. Install Python 3.10 or newer using `uv python install 3.10` (or a more recent version)
|
|
51
|
+
|
|
52
|
+
### AWS Client Requirements
|
|
53
|
+
|
|
54
|
+
1. **Credentials**: Configure AWS credentials via AWS CLI, or environment variables
|
|
55
|
+
2. **Permissions**: Ensure your AWS credentials have the required permissions (see [Permissions](#permissions) section)
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
[](https://cursor.com/install-mcp?name=awslabs.redshift-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMucmVkc2hpZnQtbWNwLXNlcnZlckBsYXRlc3QiLCJlbnYiOnsiQVdTX1BST0ZJTEUiOiJkZWZhdWx0IiwiQVdTX1JFR0lPTiI6InVzLWVhc3QtMSIsIkZBU1RNQ1BfTE9HX0xFVkVMIjoiSU5GTyJ9LCJkaXNhYmxlZCI6ZmFsc2UsImF1dG9BcHByb3ZlIjpbXX0%3D)
|
|
60
|
+
|
|
61
|
+
Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"mcpServers": {
|
|
66
|
+
"awslabs.redshift-mcp-server": {
|
|
67
|
+
"command": "uvx",
|
|
68
|
+
"args": ["awslabs.redshift-mcp-server@latest"],
|
|
69
|
+
"env": {
|
|
70
|
+
"AWS_PROFILE": "default",
|
|
71
|
+
"AWS_REGION": "us-east-1",
|
|
72
|
+
"FASTMCP_LOG_LEVEL": "INFO"
|
|
73
|
+
},
|
|
74
|
+
"disabled": false,
|
|
75
|
+
"autoApprove": []
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
or docker after a successful `docker build -t awslabs/redshift-mcp-server:latest .`:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"mcpServers": {
|
|
86
|
+
"awslabs.redshift-mcp-server": {
|
|
87
|
+
"command": "docker",
|
|
88
|
+
"args": [
|
|
89
|
+
"run",
|
|
90
|
+
"--rm",
|
|
91
|
+
"--interactive",
|
|
92
|
+
"--env", "AWS_ACCESS_KEY_ID=[your data]",
|
|
93
|
+
"--env", "AWS_SECRET_ACCESS_KEY=[your data]",
|
|
94
|
+
"--env", "AWS_REGION=[your data]",
|
|
95
|
+
"awslabs/redshift-mcp-server:latest"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Environment Variables
|
|
103
|
+
|
|
104
|
+
- `AWS_REGION`: AWS region to use (default: `us-east-1`)
|
|
105
|
+
- `AWS_PROFILE`: AWS profile to use (optional, uses default if not specified)
|
|
106
|
+
- `FASTMCP_LOG_LEVEL`: Logging level (`DEBUG`, `INFO`, `WARNING`, `ERROR`)
|
|
107
|
+
- `LOG_FILE`: Path to log file (optional, logs to stdout if not specified)
|
|
108
|
+
|
|
109
|
+
## Basic Usage
|
|
110
|
+
|
|
111
|
+
### Discovery Workflow
|
|
112
|
+
|
|
113
|
+
1. **Discover Clusters**: Find available Redshift resources
|
|
114
|
+
2. **List Databases**: Explore databases in a specific cluster
|
|
115
|
+
3. **Browse Database Structures**: Navigate through schemas, tables, columns
|
|
116
|
+
4. **Query Data**: Execute SQL queries safely with a natural language prompt
|
|
117
|
+
|
|
118
|
+
### Simple Examples
|
|
119
|
+
|
|
120
|
+
- "Show me all available Redshift clusters"
|
|
121
|
+
- "List databases in cluster 'my-redshift-cluster'"
|
|
122
|
+
- "What tables are in the 'public' schema of database 'analytics'?"
|
|
123
|
+
- "Execute: SELECT COUNT(*) FROM users WHERE created_date > '2024-01-01'"
|
|
124
|
+
|
|
125
|
+
### Advanced Examples
|
|
126
|
+
|
|
127
|
+
#### Natural Language Data Request
|
|
128
|
+
|
|
129
|
+
```log
|
|
130
|
+
> Show me the last 3 sales from the analytics Redshift cluster.
|
|
131
|
+
I'll help you retrieve the last 3 sales from your analytics Redshift cluster. Let me start by discovering your available Redshift clusters and then
|
|
132
|
+
explore the database structure to find the sales data.
|
|
133
|
+
|
|
134
|
+
...skipping the auto-discovery logs...
|
|
135
|
+
|
|
136
|
+
Here are the last 3 sales from your analytics Redshift cluster:
|
|
137
|
+
|
|
138
|
+
Most Recent Sales (from tickit.sales table):
|
|
139
|
+
|
|
140
|
+
1. Sale ID 102373 - December 31, 2008 at 12:58:19
|
|
141
|
+
• Price paid: $1,008.00
|
|
142
|
+
• Seller ID: 26190, Buyer ID: 35491
|
|
143
|
+
|
|
144
|
+
2. Sale ID 75861 - December 31, 2008 at 12:50:02
|
|
145
|
+
• Price paid: $372.00
|
|
146
|
+
• Seller ID: 43402, Buyer ID: 39545
|
|
147
|
+
|
|
148
|
+
3. Sale ID 56302 - December 31, 2008 at 12:08:14
|
|
149
|
+
• Price paid: $372.00
|
|
150
|
+
• Seller ID: 5760, Buyer ID: 5797
|
|
151
|
+
|
|
152
|
+
The data shows ticket sales from the TICKIT sample dataset, which appears to be for event ticket transactions. All three sales occurred on December 31, 2008, with the most recent sale being for $1,008 for 4 tickets.
|
|
153
|
+
|
|
154
|
+
> Briefly describe your actions.
|
|
155
|
+
I performed the following actions to retrieve the last 3 sales from your analytics Redshift cluster:
|
|
156
|
+
|
|
157
|
+
1. Discovered clusters - Listed all available Redshift clusters and identified redshift-cluster-analytics as your analytics cluster
|
|
158
|
+
2. Explored databases - Found two databases: dev and sample_data_dev
|
|
159
|
+
3. Located schemas - Checked the sample_data_dev database and found the tickit schema containing sample data
|
|
160
|
+
4. Found sales table - Identified the sales table within the tickit schema
|
|
161
|
+
5. Analyzed table structure - Examined the columns in the sales table (salesid, pricepaid, qtysold, saletime, etc.)
|
|
162
|
+
6. Executed query - Ran a SQL query to get the 3 most recent sales ordered by saletime DESC
|
|
163
|
+
|
|
164
|
+
The process involved using the Redshift MCP tools to systematically navigate the cluster structure and retrieve the requested sales data from the TICKIT sample dataset.
|
|
165
|
+
|
|
166
|
+
> Show me the query text which you executed to get the sales.
|
|
167
|
+
Here's the exact SQL query I executed to get the last 3 sales:
|
|
168
|
+
|
|
169
|
+
sql
|
|
170
|
+
SELECT salesid, listid, sellerid, buyerid, eventid, qtysold, pricepaid, commission, saletime
|
|
171
|
+
FROM tickit.sales
|
|
172
|
+
ORDER BY saletime DESC
|
|
173
|
+
LIMIT 3;
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
#### Cross-Cluster Data Comparison Request
|
|
177
|
+
|
|
178
|
+
```log
|
|
179
|
+
> How off is the analytics sales data from the ETL sales data based on the recent records in Redshift?
|
|
180
|
+
I'll help you analyze sales data from your Redshift ETL pipeline. To get started, I need to discover your Redshift environment and understand the data
|
|
181
|
+
structure.
|
|
182
|
+
|
|
183
|
+
...skipping auto-discovery logs...
|
|
184
|
+
|
|
185
|
+
# Sales Data Comparison: Analytics vs ETL
|
|
186
|
+
|
|
187
|
+
## Executive Summary
|
|
188
|
+
Sales data between Analytics cluster and ETL workgroup is perfectly synchronized with zero discrepancies found.
|
|
189
|
+
|
|
190
|
+
## Environment Overview
|
|
191
|
+
• **Analytics**: redshift-cluster-analytics (Provisioned, 2x dc2.large nodes)
|
|
192
|
+
• **ETL**: redshift-workgroup-etl (Serverless)
|
|
193
|
+
• **Database**: sample_data_dev.tickit.sales
|
|
194
|
+
|
|
195
|
+
## Data Comparison Results
|
|
196
|
+
|
|
197
|
+
### High-Level Metrics
|
|
198
|
+
| Metric | Analytics Cluster | ETL Workgroup | Status |
|
|
199
|
+
|-----------------|-------------------|-------------------|--------|
|
|
200
|
+
| Total Records | 172,456 | 172,456 | Match |
|
|
201
|
+
| Total Revenue | $110,765,431 | $110,765,431 | Match |
|
|
202
|
+
| Total Quantity | 345,349 | 345,349 | Match |
|
|
203
|
+
| Average Price | $642.28 | $642.28 | Match |
|
|
204
|
+
| Date Range | 2008-01-01 to 2008-12-31 | 2008-01-01 to 2008-12-31 | Match |
|
|
205
|
+
|
|
206
|
+
### Recent Sales (Q4 2008)
|
|
207
|
+
| Month | Analytics Revenue | ETL Revenue | Analytics Txns | ETL Txns | Status |
|
|
208
|
+
|----------|-------------------|---------------|----------------|----------|--------|
|
|
209
|
+
| Dec 2008 | $4,521,806 | $4,521,806 | 7,059 | 7,059 | Match |
|
|
210
|
+
| Nov 2008 | $9,044,905 | $9,044,905 | 14,261 | 14,261 | Match |
|
|
211
|
+
| Oct 2008 | $10,726,368 | $10,726,368 | 16,741 | 16,741 | Match |
|
|
212
|
+
|
|
213
|
+
## Key Findings
|
|
214
|
+
• Data Integrity: Perfect synchronization across all metrics
|
|
215
|
+
• Verification: Transaction-level details match exactly (verified 10 recent records)
|
|
216
|
+
|
|
217
|
+
> Briefly describe your actions.
|
|
218
|
+
I analyzed sales data from your Redshift environments by:
|
|
219
|
+
|
|
220
|
+
1. Discovered Infrastructure: Found 3 Redshift environments (analytics cluster, marketing cluster, ETL workgroup)
|
|
221
|
+
2. Explored Data Structure: Located sales data in sample_data_dev.tickit.sales table with 10 columns including salesid, pricepaid, qtysold, and saletime
|
|
222
|
+
3. Compared High-Level Metrics: Ran aggregate queries on both analytics cluster and ETL workgroup to compare total records (172,456), revenue ($110M), and date ranges
|
|
223
|
+
4. Analyzed Recent Data: Examined Q4 2008 monthly sales trends and verified the 10 most recent transactions from Dec 30-31, 2008
|
|
224
|
+
5. Performance Testing: Measured query execution times across different query types (6.7-19.5 seconds range)
|
|
225
|
+
6. Generated Report: Created a comprehensive comparison showing perfect data synchronization between environments with performance insights and recommendations
|
|
226
|
+
|
|
227
|
+
> Show me the text of the SQL queries you used.
|
|
228
|
+
Here are the SQL queries I executed during the analysis:
|
|
229
|
+
|
|
230
|
+
## 1. High-Level Metrics Query
|
|
231
|
+
sql
|
|
232
|
+
SELECT
|
|
233
|
+
COUNT(*) as total_records,
|
|
234
|
+
MIN(saletime) as earliest_sale,
|
|
235
|
+
MAX(saletime) as latest_sale,
|
|
236
|
+
SUM(pricepaid) as total_revenue,
|
|
237
|
+
SUM(qtysold) as total_quantity,
|
|
238
|
+
AVG(pricepaid) as avg_price
|
|
239
|
+
FROM tickit.sales;
|
|
240
|
+
|
|
241
|
+
## 2. Recent Monthly Sales Analysis
|
|
242
|
+
sql
|
|
243
|
+
SELECT
|
|
244
|
+
DATE_TRUNC('month', saletime) as sale_month,
|
|
245
|
+
COUNT(*) as transaction_count,
|
|
246
|
+
SUM(pricepaid) as monthly_revenue,
|
|
247
|
+
SUM(qtysold) as monthly_quantity,
|
|
248
|
+
AVG(pricepaid) as avg_transaction_value
|
|
249
|
+
FROM tickit.sales
|
|
250
|
+
WHERE saletime >= '2008-10-01'
|
|
251
|
+
GROUP BY DATE_TRUNC('month', saletime)
|
|
252
|
+
ORDER BY sale_month DESC
|
|
253
|
+
LIMIT 10;
|
|
254
|
+
|
|
255
|
+
## 3. Recent Transaction Details
|
|
256
|
+
sql
|
|
257
|
+
SELECT
|
|
258
|
+
salesid,
|
|
259
|
+
listid,
|
|
260
|
+
sellerid,
|
|
261
|
+
buyerid,
|
|
262
|
+
eventid,
|
|
263
|
+
qtysold,
|
|
264
|
+
pricepaid,
|
|
265
|
+
commission,
|
|
266
|
+
saletime
|
|
267
|
+
FROM tickit.sales
|
|
268
|
+
WHERE saletime >= '2008-12-30'
|
|
269
|
+
ORDER BY saletime DESC, salesid DESC
|
|
270
|
+
LIMIT 10;
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Tools
|
|
274
|
+
|
|
275
|
+
### list_clusters
|
|
276
|
+
|
|
277
|
+
Discovers all available Amazon Redshift clusters and serverless workgroups.
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
list_clusters() -> list[RedshiftCluster]
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Returns**: List of cluster information including:
|
|
284
|
+
|
|
285
|
+
- Cluster identifier and type (provisioned/serverless)
|
|
286
|
+
- Status and connection details
|
|
287
|
+
- Configuration information (node type, encryption, etc.)
|
|
288
|
+
- Tags and metadata
|
|
289
|
+
|
|
290
|
+
### list_databases
|
|
291
|
+
|
|
292
|
+
Lists all databases in a specified Redshift cluster.
|
|
293
|
+
|
|
294
|
+
```python
|
|
295
|
+
list_databases(cluster_identifier: str, database_name: str = "dev") -> list[RedshiftDatabase]
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
**Parameters**:
|
|
299
|
+
|
|
300
|
+
- `cluster_identifier`: The cluster identifier from `list_clusters`
|
|
301
|
+
- `database_name`: Database to connect to for querying (default: "dev")
|
|
302
|
+
|
|
303
|
+
**Returns**: List of database information including:
|
|
304
|
+
|
|
305
|
+
- Database name and owner
|
|
306
|
+
- Database type (local/shared)
|
|
307
|
+
- Access control information
|
|
308
|
+
- Isolation level
|
|
309
|
+
|
|
310
|
+
### list_schemas
|
|
311
|
+
|
|
312
|
+
Lists all schemas in a specified database.
|
|
313
|
+
|
|
314
|
+
```python
|
|
315
|
+
list_schemas(cluster_identifier: str, schema_database_name: str) -> list[RedshiftSchema]
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
**Parameters**:
|
|
319
|
+
|
|
320
|
+
- `cluster_identifier`: The cluster identifier from `list_clusters`
|
|
321
|
+
- `schema_database_name`: Database name to list schemas for
|
|
322
|
+
|
|
323
|
+
**Returns**: List of schema information including:
|
|
324
|
+
|
|
325
|
+
- Schema name and owner
|
|
326
|
+
- Schema type (local/external/shared)
|
|
327
|
+
- Access permissions
|
|
328
|
+
- External schema details (if applicable)
|
|
329
|
+
|
|
330
|
+
### list_tables
|
|
331
|
+
|
|
332
|
+
Lists all tables in a specified schema.
|
|
333
|
+
|
|
334
|
+
```python
|
|
335
|
+
list_tables(cluster_identifier: str, table_database_name: str, table_schema_name: str) -> list[RedshiftTable]
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Parameters**:
|
|
339
|
+
|
|
340
|
+
- `cluster_identifier`: The cluster identifier from `list_clusters`
|
|
341
|
+
- `table_database_name`: Database name containing the schema
|
|
342
|
+
- `table_schema_name`: Schema name to list tables for
|
|
343
|
+
|
|
344
|
+
**Returns**: List of table information including:
|
|
345
|
+
|
|
346
|
+
- Table name and type (TABLE/VIEW/EXTERNAL TABLE)
|
|
347
|
+
- Access permissions
|
|
348
|
+
- Remarks and metadata
|
|
349
|
+
|
|
350
|
+
### list_columns
|
|
351
|
+
|
|
352
|
+
Lists all columns in a specified table.
|
|
353
|
+
|
|
354
|
+
```python
|
|
355
|
+
list_columns(
|
|
356
|
+
cluster_identifier: str,
|
|
357
|
+
column_database_name: str,
|
|
358
|
+
column_schema_name: str,
|
|
359
|
+
column_table_name: str
|
|
360
|
+
) -> list[RedshiftColumn]
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
**Parameters**:
|
|
364
|
+
|
|
365
|
+
- `cluster_identifier`: The cluster identifier from `list_clusters`
|
|
366
|
+
- `column_database_name`: Database name containing the table
|
|
367
|
+
- `column_schema_name`: Schema name containing the table
|
|
368
|
+
- `column_table_name`: Table name to list columns for
|
|
369
|
+
|
|
370
|
+
**Returns**: List of column information including:
|
|
371
|
+
|
|
372
|
+
- Column name and data type
|
|
373
|
+
- Nullable status and default values
|
|
374
|
+
- Numeric precision and scale
|
|
375
|
+
- Character length limits
|
|
376
|
+
- Ordinal position and remarks
|
|
377
|
+
|
|
378
|
+
### execute_query
|
|
379
|
+
|
|
380
|
+
Executes a SQL query against a Redshift cluster with safety protections.
|
|
381
|
+
|
|
382
|
+
```python
|
|
383
|
+
execute_query(cluster_identifier: str, database_name: str, sql: str) -> QueryResult
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**Parameters**:
|
|
387
|
+
|
|
388
|
+
- `cluster_identifier`: The cluster identifier from `list_clusters`
|
|
389
|
+
- `database_name`: Database to execute the query against
|
|
390
|
+
- `sql`: SQL statement to execute (SELECT statements recommended)
|
|
391
|
+
|
|
392
|
+
**Returns**: Query result including:
|
|
393
|
+
|
|
394
|
+
- Column names and data types
|
|
395
|
+
- Result rows with proper type conversion
|
|
396
|
+
- Row count and execution time
|
|
397
|
+
- Query ID for reference
|
|
398
|
+
|
|
399
|
+
## Permissions
|
|
400
|
+
|
|
401
|
+
### AWS IAM Permissions
|
|
402
|
+
|
|
403
|
+
Your AWS credentials need the following IAM permissions:
|
|
404
|
+
|
|
405
|
+
```json
|
|
406
|
+
{
|
|
407
|
+
"Version": "2012-10-17",
|
|
408
|
+
"Statement": [
|
|
409
|
+
{
|
|
410
|
+
"Effect": "Allow",
|
|
411
|
+
"Action": [
|
|
412
|
+
"redshift:DescribeClusters",
|
|
413
|
+
"redshift-serverless:ListWorkgroups",
|
|
414
|
+
"redshift-serverless:GetWorkgroup",
|
|
415
|
+
"redshift-data:ExecuteStatement",
|
|
416
|
+
"redshift-data:BatchExecuteStatement",
|
|
417
|
+
"redshift-data:DescribeStatement",
|
|
418
|
+
"redshift-data:GetStatementResult"
|
|
419
|
+
],
|
|
420
|
+
"Resource": "*"
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Database Permissions
|
|
427
|
+
|
|
428
|
+
In addition to AWS IAM permissions, you need appropriate database-level permissions:
|
|
429
|
+
|
|
430
|
+
- **Read Access**: `SELECT` permissions on tables/views you want to query
|
|
431
|
+
- **Schema Access**: `USAGE` permissions on schemas you want to explore
|
|
432
|
+
- **Database Access**: Connection permissions to databases you want to access
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
awslabs/__init__.py,sha256=WuqxdDgUZylWNmVoPKiK7qGsTB_G4UmuXIrJ-VBwDew,731
|
|
2
|
+
awslabs/redshift_mcp_server/__init__.py,sha256=HcBkKldles_Pr6SuLt_zy1fRBGuwAhWmYz3CCO9GAug,673
|
|
3
|
+
awslabs/redshift_mcp_server/consts.py,sha256=n7w7fB3XGwIMf-tXxZUbXp8YiyUGnJs1wX-GlfhdHnE,3687
|
|
4
|
+
awslabs/redshift_mcp_server/models.py,sha256=p6oKcVz4xfaqQzXjJrZK9YlfuUnzMDCphXbTK1LT1k4,6437
|
|
5
|
+
awslabs/redshift_mcp_server/redshift.py,sha256=FfzCPi5njzUvehNURHqAaHZr9Lz60Z9bAFXveGHLZR4,24696
|
|
6
|
+
awslabs/redshift_mcp_server/server.py,sha256=UNlBqgYS8KLhT9fFKKIPbszH1MtFTY5xCWbED_h-CJ8,26100
|
|
7
|
+
awslabs_redshift_mcp_server-0.0.1.dist-info/METADATA,sha256=di5TTvzP1ns2BmCQNeZd-k4fkLIR755seti-G7-pheA,15050
|
|
8
|
+
awslabs_redshift_mcp_server-0.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
9
|
+
awslabs_redshift_mcp_server-0.0.1.dist-info/entry_points.txt,sha256=o2G-onpmq80KMTQw2OrY1G07GmwPaurcJcIqfvMR9Sw,88
|
|
10
|
+
awslabs_redshift_mcp_server-0.0.1.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
11
|
+
awslabs_redshift_mcp_server-0.0.1.dist-info/licenses/NOTICE,sha256=iIvfV8gFGERQ7xLtxV8bD_Lsrj9KOIPpvk49qp5-K0c,95
|
|
12
|
+
awslabs_redshift_mcp_server-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|