awslabs.redshift-mcp-server 0.0.6__tar.gz → 0.0.8__tar.gz

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.
Files changed (24) hide show
  1. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/PKG-INFO +13 -9
  2. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/README.md +12 -8
  3. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/awslabs/redshift_mcp_server/__init__.py +1 -1
  4. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/awslabs/redshift_mcp_server/consts.py +21 -12
  5. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/awslabs/redshift_mcp_server/redshift.py +270 -132
  6. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/awslabs/redshift_mcp_server/server.py +17 -6
  7. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/pyproject.toml +1 -1
  8. awslabs_redshift_mcp_server-0.0.8/tests/test_redshift.py +1090 -0
  9. awslabs_redshift_mcp_server-0.0.8/tests/test_server.py +530 -0
  10. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/uv.lock +668 -668
  11. awslabs_redshift_mcp_server-0.0.6/tests/test_redshift.py +0 -272
  12. awslabs_redshift_mcp_server-0.0.6/tests/test_server.py +0 -968
  13. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/.gitignore +0 -0
  14. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/.python-version +0 -0
  15. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/CHANGELOG.md +0 -0
  16. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/Dockerfile +0 -0
  17. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/LICENSE +0 -0
  18. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/NOTICE +0 -0
  19. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/awslabs/__init__.py +0 -0
  20. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/awslabs/redshift_mcp_server/models.py +0 -0
  21. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/docker-healthcheck.sh +0 -0
  22. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/tests/test_init.py +0 -0
  23. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/tests/test_main.py +0 -0
  24. {awslabs_redshift_mcp_server-0.0.6 → awslabs_redshift_mcp_server-0.0.8}/uv-requirements.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awslabs.redshift-mcp-server
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: An AWS Labs Model Context Protocol (MCP) server for Redshift
5
5
  Project-URL: homepage, https://awslabs.github.io/mcp/
6
6
  Project-URL: docs, https://awslabs.github.io/mcp/servers/redshift-mcp-server/
@@ -52,7 +52,11 @@ This MCP server provides tools to discover, explore, and query Amazon Redshift c
52
52
  ### AWS Client Requirements
53
53
 
54
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)
55
+ 2. **Region**: Configure AWS region using one of the following (in order of precedence):
56
+ - `AWS_REGION` environment variable (highest priority)
57
+ - `AWS_DEFAULT_REGION` environment variable
58
+ - Region specified in your AWS profile configuration
59
+ 3. **Permissions**: Ensure your AWS credentials have the required permissions (see [Permissions](#permissions) section)
56
60
 
57
61
  ## Installation
58
62
 
@@ -70,7 +74,7 @@ Configure the MCP server in your MCP client configuration (e.g., for Amazon Q De
70
74
  "args": ["awslabs.redshift-mcp-server@latest"],
71
75
  "env": {
72
76
  "AWS_PROFILE": "default",
73
- "AWS_REGION": "us-east-1",
77
+ "AWS_DEFAULT_REGION": "us-east-1",
74
78
  "FASTMCP_LOG_LEVEL": "INFO"
75
79
  },
76
80
  "disabled": false,
@@ -79,6 +83,7 @@ Configure the MCP server in your MCP client configuration (e.g., for Amazon Q De
79
83
  }
80
84
  }
81
85
  ```
86
+
82
87
  ### Windows Installation
83
88
 
84
89
  For Windows users, the MCP server configuration format is slightly different:
@@ -99,16 +104,15 @@ For Windows users, the MCP server configuration format is slightly different:
99
104
  "awslabs.redshift-mcp-server.exe"
100
105
  ],
101
106
  "env": {
102
- "FASTMCP_LOG_LEVEL": "ERROR",
103
107
  "AWS_PROFILE": "your-aws-profile",
104
- "AWS_REGION": "us-east-1"
108
+ "AWS_DEFAULT_REGION": "us-east-1",
109
+ "FASTMCP_LOG_LEVEL": "ERROR"
105
110
  }
106
111
  }
107
112
  }
108
113
  }
109
114
  ```
110
115
 
111
-
112
116
  or docker after a successful `docker build -t awslabs/redshift-mcp-server:latest .`:
113
117
 
114
118
  ```json
@@ -122,7 +126,7 @@ or docker after a successful `docker build -t awslabs/redshift-mcp-server:latest
122
126
  "--interactive",
123
127
  "--env", "AWS_ACCESS_KEY_ID=[your data]",
124
128
  "--env", "AWS_SECRET_ACCESS_KEY=[your data]",
125
- "--env", "AWS_REGION=[your data]",
129
+ "--env", "AWS_DEFAULT_REGION=[your data]",
126
130
  "awslabs/redshift-mcp-server:latest"
127
131
  ]
128
132
  }
@@ -132,7 +136,8 @@ or docker after a successful `docker build -t awslabs/redshift-mcp-server:latest
132
136
 
133
137
  ### Environment Variables
134
138
 
135
- - `AWS_REGION`: AWS region to use (default: `us-east-1`)
139
+ - `AWS_REGION`: AWS region to use (overrides all other region settings)
140
+ - `AWS_DEFAULT_REGION`: Default AWS region (used if AWS_REGION not set and no region in profile)
136
141
  - `AWS_PROFILE`: AWS profile to use (optional, uses default if not specified)
137
142
  - `FASTMCP_LOG_LEVEL`: Logging level (`DEBUG`, `INFO`, `WARNING`, `ERROR`)
138
143
  - `LOG_FILE`: Path to log file (optional, logs to stdout if not specified)
@@ -444,7 +449,6 @@ Your AWS credentials need the following IAM permissions:
444
449
  "redshift-serverless:ListWorkgroups",
445
450
  "redshift-serverless:GetWorkgroup",
446
451
  "redshift-data:ExecuteStatement",
447
- "redshift-data:BatchExecuteStatement",
448
452
  "redshift-data:DescribeStatement",
449
453
  "redshift-data:GetStatementResult"
450
454
  ],
@@ -21,7 +21,11 @@ This MCP server provides tools to discover, explore, and query Amazon Redshift c
21
21
  ### AWS Client Requirements
22
22
 
23
23
  1. **Credentials**: Configure AWS credentials via AWS CLI, or environment variables
24
- 2. **Permissions**: Ensure your AWS credentials have the required permissions (see [Permissions](#permissions) section)
24
+ 2. **Region**: Configure AWS region using one of the following (in order of precedence):
25
+ - `AWS_REGION` environment variable (highest priority)
26
+ - `AWS_DEFAULT_REGION` environment variable
27
+ - Region specified in your AWS profile configuration
28
+ 3. **Permissions**: Ensure your AWS credentials have the required permissions (see [Permissions](#permissions) section)
25
29
 
26
30
  ## Installation
27
31
 
@@ -39,7 +43,7 @@ Configure the MCP server in your MCP client configuration (e.g., for Amazon Q De
39
43
  "args": ["awslabs.redshift-mcp-server@latest"],
40
44
  "env": {
41
45
  "AWS_PROFILE": "default",
42
- "AWS_REGION": "us-east-1",
46
+ "AWS_DEFAULT_REGION": "us-east-1",
43
47
  "FASTMCP_LOG_LEVEL": "INFO"
44
48
  },
45
49
  "disabled": false,
@@ -48,6 +52,7 @@ Configure the MCP server in your MCP client configuration (e.g., for Amazon Q De
48
52
  }
49
53
  }
50
54
  ```
55
+
51
56
  ### Windows Installation
52
57
 
53
58
  For Windows users, the MCP server configuration format is slightly different:
@@ -68,16 +73,15 @@ For Windows users, the MCP server configuration format is slightly different:
68
73
  "awslabs.redshift-mcp-server.exe"
69
74
  ],
70
75
  "env": {
71
- "FASTMCP_LOG_LEVEL": "ERROR",
72
76
  "AWS_PROFILE": "your-aws-profile",
73
- "AWS_REGION": "us-east-1"
77
+ "AWS_DEFAULT_REGION": "us-east-1",
78
+ "FASTMCP_LOG_LEVEL": "ERROR"
74
79
  }
75
80
  }
76
81
  }
77
82
  }
78
83
  ```
79
84
 
80
-
81
85
  or docker after a successful `docker build -t awslabs/redshift-mcp-server:latest .`:
82
86
 
83
87
  ```json
@@ -91,7 +95,7 @@ or docker after a successful `docker build -t awslabs/redshift-mcp-server:latest
91
95
  "--interactive",
92
96
  "--env", "AWS_ACCESS_KEY_ID=[your data]",
93
97
  "--env", "AWS_SECRET_ACCESS_KEY=[your data]",
94
- "--env", "AWS_REGION=[your data]",
98
+ "--env", "AWS_DEFAULT_REGION=[your data]",
95
99
  "awslabs/redshift-mcp-server:latest"
96
100
  ]
97
101
  }
@@ -101,7 +105,8 @@ or docker after a successful `docker build -t awslabs/redshift-mcp-server:latest
101
105
 
102
106
  ### Environment Variables
103
107
 
104
- - `AWS_REGION`: AWS region to use (default: `us-east-1`)
108
+ - `AWS_REGION`: AWS region to use (overrides all other region settings)
109
+ - `AWS_DEFAULT_REGION`: Default AWS region (used if AWS_REGION not set and no region in profile)
105
110
  - `AWS_PROFILE`: AWS profile to use (optional, uses default if not specified)
106
111
  - `FASTMCP_LOG_LEVEL`: Logging level (`DEBUG`, `INFO`, `WARNING`, `ERROR`)
107
112
  - `LOG_FILE`: Path to log file (optional, logs to stdout if not specified)
@@ -413,7 +418,6 @@ Your AWS credentials need the following IAM permissions:
413
418
  "redshift-serverless:ListWorkgroups",
414
419
  "redshift-serverless:GetWorkgroup",
415
420
  "redshift-data:ExecuteStatement",
416
- "redshift-data:BatchExecuteStatement",
417
421
  "redshift-data:DescribeStatement",
418
422
  "redshift-data:GetStatementResult"
419
423
  ],
@@ -14,4 +14,4 @@
14
14
 
15
15
  """awslabs.redshift-mcp-server"""
16
16
 
17
- __version__ = '0.0.6'
17
+ __version__ = '0.0.8'
@@ -14,26 +14,35 @@
14
14
 
15
15
  """Redshift MCP Server constants."""
16
16
 
17
- # Defaults
18
- DEFAULT_AWS_REGION = 'us-east-1'
17
+ # System
18
+ CLIENT_CONNECT_TIMEOUT = 60
19
+ CLIENT_READ_TIMEOUT = 600
20
+ CLIENT_RETRIES = {'max_attempts': 5, 'mode': 'adaptive'}
21
+ CLIENT_USER_AGENT_NAME = 'awslabs/mcp/redshift-mcp-server'
19
22
  DEFAULT_LOG_LEVEL = 'WARNING'
20
-
21
- # Timeouts (seconds), etc
22
- CLIENT_TIMEOUT = 60
23
- DATA_CLIENT_TIMEOUT = 60
24
23
  QUERY_TIMEOUT = 3600
25
- QUERY_POLL_INTERVAL = 2
24
+ QUERY_POLL_INTERVAL = 1
25
+ SESSION_KEEPALIVE = 600
26
26
 
27
27
  # Best practices
28
28
 
29
29
  CLIENT_BEST_PRACTICES = """
30
30
  ## AWS Client Best Practices
31
31
 
32
- ### Authentication
32
+ ### Authentication and Configuration
33
33
 
34
34
  - Default AWS credentials chain (IAM roles, ~/.aws/credentials, etc.).
35
35
  - AWS_PROFILE environment variable (if set).
36
- - AWS_REGION environment variable (if set).
36
+ - Region configuration (in order of precedence):
37
+ - AWS_REGION environment variable (highest priority)
38
+ - AWS_DEFAULT_REGION environment variable
39
+ - Region specified in AWS profile configuration
40
+
41
+ ### Error Handling
42
+
43
+ - Always print out AWS client errors in full to help diagnose configuration issues.
44
+ - For region-related errors, suggest checking AWS_REGION, AWS_DEFAULT_REGION, or AWS profile configuration.
45
+ - For credential errors, suggest verifying AWS credentials setup and permissions.
37
46
  """
38
47
 
39
48
  REDSHIFT_BEST_PRACTICES = """
@@ -77,7 +86,7 @@ SELECT
77
86
  source_database,
78
87
  schema_option
79
88
  FROM pg_catalog.svv_all_schemas
80
- WHERE database_name = {}
89
+ WHERE database_name = :database_name
81
90
  ORDER BY schema_name;
82
91
  """
83
92
 
@@ -90,7 +99,7 @@ SELECT
90
99
  table_type,
91
100
  remarks
92
101
  FROM pg_catalog.svv_all_tables
93
- WHERE database_name = {} AND schema_name = {}
102
+ WHERE database_name = :database_name AND schema_name = :schema_name
94
103
  ORDER BY table_name;
95
104
  """
96
105
 
@@ -109,7 +118,7 @@ SELECT
109
118
  numeric_scale,
110
119
  remarks
111
120
  FROM pg_catalog.svv_all_columns
112
- WHERE database_name = {} AND schema_name = {} AND table_name = {}
121
+ WHERE database_name = :database_name AND schema_name = :schema_name AND table_name = :table_name
113
122
  ORDER BY ordinal_position;
114
123
  """
115
124