awslabs.dynamodb-mcp-server 2.0.1__tar.gz → 2.0.2__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.

Potentially problematic release.


This version of awslabs.dynamodb-mcp-server might be problematic. Click here for more details.

Files changed (35) hide show
  1. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/Dockerfile +2 -2
  2. awslabs_dynamodb_mcp_server-2.0.2/PKG-INFO +256 -0
  3. awslabs_dynamodb_mcp_server-2.0.2/README.md +223 -0
  4. awslabs_dynamodb_mcp_server-2.0.2/awslabs/__init__.py +36 -0
  5. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/awslabs/dynamodb_mcp_server/__init__.py +1 -1
  6. awslabs_dynamodb_mcp_server-2.0.2/awslabs/dynamodb_mcp_server/database_analysis_queries.py +210 -0
  7. awslabs_dynamodb_mcp_server-2.0.2/awslabs/dynamodb_mcp_server/database_analyzers.py +383 -0
  8. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/awslabs/dynamodb_mcp_server/prompts/dynamodb_architect.md +13 -0
  9. awslabs_dynamodb_mcp_server-2.0.2/awslabs/dynamodb_mcp_server/server.py +246 -0
  10. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/pyproject.toml +3 -2
  11. awslabs_dynamodb_mcp_server-2.0.2/tests/__init__.py +14 -0
  12. awslabs_dynamodb_mcp_server-2.0.2/tests/conftest.py +30 -0
  13. awslabs_dynamodb_mcp_server-2.0.2/tests/test_dynamodb_server.py +211 -0
  14. awslabs_dynamodb_mcp_server-2.0.2/tests/test_source_db_integration.py +480 -0
  15. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/uv.lock +19 -1
  16. awslabs_dynamodb_mcp_server-2.0.1/PKG-INFO +0 -164
  17. awslabs_dynamodb_mcp_server-2.0.1/README.md +0 -132
  18. awslabs_dynamodb_mcp_server-2.0.1/awslabs/__init__.py +0 -16
  19. awslabs_dynamodb_mcp_server-2.0.1/awslabs/dynamodb_mcp_server/server.py +0 -81
  20. awslabs_dynamodb_mcp_server-2.0.1/tests/test_dynamodb_server.py +0 -53
  21. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/.gitignore +0 -0
  22. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/.python-version +0 -0
  23. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/CHANGELOG.md +0 -0
  24. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/LICENSE +0 -0
  25. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/NOTICE +0 -0
  26. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/awslabs/dynamodb_mcp_server/common.py +0 -0
  27. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/docker-healthcheck.sh +0 -0
  28. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/tests/evals/README.md +0 -0
  29. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/tests/evals/dynamic_evaluators.py +0 -0
  30. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/tests/evals/evaluation_registry.py +0 -0
  31. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/tests/evals/logging_config.py +0 -0
  32. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/tests/evals/multiturn_evaluator.py +0 -0
  33. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/tests/evals/scenarios.py +0 -0
  34. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/tests/evals/test_dspy_evals.py +0 -0
  35. {awslabs_dynamodb_mcp_server-2.0.1 → awslabs_dynamodb_mcp_server-2.0.2}/uv-requirements.txt +0 -0
@@ -13,7 +13,7 @@
13
13
  # limitations under the License.
14
14
 
15
15
  # dependabot should continue to update this to the latest hash.
16
- FROM public.ecr.aws/docker/library/python:3.13.5-alpine3.21@sha256:c9a09c45a4bcc618c7f7128585b8dd0d41d0c31a8a107db4c8255ffe0b69375d AS uv
16
+ FROM public.ecr.aws/docker/library/python:3.13-alpine@sha256:070342a0cc1011532c0e69972cce2bbc6cc633eba294bae1d12abea8bd05303b AS uv
17
17
 
18
18
  # Install the project into `/app`
19
19
  WORKDIR /app
@@ -61,7 +61,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
61
61
  # Make the directory just in case it doesn't exist
62
62
  RUN mkdir -p /root/.local
63
63
 
64
- FROM public.ecr.aws/docker/library/python:3.13.5-alpine3.21@sha256:c9a09c45a4bcc618c7f7128585b8dd0d41d0c31a8a107db4c8255ffe0b69375d
64
+ FROM public.ecr.aws/docker/library/python:3.13-alpine@sha256:070342a0cc1011532c0e69972cce2bbc6cc633eba294bae1d12abea8bd05303b
65
65
 
66
66
  # Place executables in the environment at the front of the path and include other binaries
67
67
  ENV PATH="/app/.venv/bin:$PATH" \
@@ -0,0 +1,256 @@
1
+ Metadata-Version: 2.4
2
+ Name: awslabs.dynamodb-mcp-server
3
+ Version: 2.0.2
4
+ Summary: The official MCP Server for interacting with AWS DynamoDB
5
+ Project-URL: homepage, https://awslabs.github.io/mcp/
6
+ Project-URL: docs, https://awslabs.github.io/mcp/servers/dynamodb-mcp-server/
7
+ Project-URL: documentation, https://awslabs.github.io/mcp/servers/dynamodb-mcp-server/
8
+ Project-URL: repository, https://github.com/awslabs/mcp.git
9
+ Project-URL: changelog, https://github.com/awslabs/mcp/blob/main/src/dynamodb-mcp-server/CHANGELOG.md
10
+ Author: Amazon Web Services
11
+ Author-email: AWSLabs MCP <203918161+awslabs-mcp@users.noreply.github.com>, Erben Mo <moerben@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: awslabs-mysql-mcp-server==1.0.5
25
+ Requires-Dist: boto3==1.40.5
26
+ Requires-Dist: dspy-ai>=2.6.27
27
+ Requires-Dist: loguru==0.7.3
28
+ Requires-Dist: mcp[cli]==1.12.4
29
+ Requires-Dist: pydantic==2.11.7
30
+ Requires-Dist: strands-agents>=1.5.0
31
+ Requires-Dist: typing-extensions==4.14.1
32
+ Description-Content-Type: text/markdown
33
+
34
+ # AWS DynamoDB MCP Server
35
+
36
+ The official developer experience MCP Server for Amazon DynamoDB. This server provides DynamoDB expert design guidance and data modeling assistance.
37
+
38
+ ## Available MCP Tools
39
+
40
+ Right now the DynamoDB MCP server contains two tools that support data modeling tasks. You can design a data model in natural language by using only the `dynamodb_data_modeling` tool or you can analyze your MySQL database and convert the analysis into a DynamoDB data model by using the `source_db_analyzer` tool.
41
+
42
+ ### Design & Modeling
43
+
44
+ * `dynamodb_data_modeling` - Retrieves the complete DynamoDB Data Modeling Expert prompt
45
+ * `source_db_analyzer` - Executes predefined SQL queries against source databases to analyze schema and access patterns
46
+
47
+ ## Migration Notice
48
+
49
+ Starting with version 2.0.0, this server focuses exclusively on DynamoDB design and modeling guidance. All operational DynamoDB management tools (table operations, item operations, queries, backups, etc.) have been removed in favor of the [AWS API MCP Server](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server) which provides the same capability and more.
50
+
51
+ **This server does not do:**
52
+
53
+ - ❌ Operational DynamoDB management (CRUD operations)
54
+ - ❌ Table creation or data migration
55
+ - ❌ Direct data queries or transformations
56
+
57
+ ### Recommended: AWS API MCP Server
58
+
59
+ For operational DynamoDB management (retrieving data, managing tables, etc.), use the [AWS API MCP Server](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server) which provides comprehensive DynamoDB operations. [Migration guide available here](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server).
60
+
61
+ ### Not Recommended: Legacy Version
62
+
63
+ If you must use the previous operational tools, you can pin to version 1.0.9, though this is not recommended:
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "awslabs.dynamodb-mcp-server": {
69
+ "command": "uvx",
70
+ "args": ["awslabs.dynamodb-mcp-server@1.0.9"],
71
+ "env": {
72
+ "DDB-MCP-READONLY": "true",
73
+ "AWS_PROFILE": "default",
74
+ "AWS_REGION": "us-west-2",
75
+ "FASTMCP_LOG_LEVEL": "ERROR"
76
+ },
77
+ "disabled": false,
78
+ "autoApprove": []
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ ## Instructions
85
+
86
+ To design a data model in natural language you can simply ask your AI agent to “use my DynamoDB MCP to help me design a DynamoDB data model,” or something similar. If you want to analyze your MySQL query patterns then you can follow these additional steps below to setup connectivity and then say something like “analyze my MySQL database and then help me design a DynamoDB data model.”
87
+
88
+ ## Source Database Integration
89
+
90
+ The DynamoDB MCP server includes source database integration for database analysis and the tool `source_db_analyzer` is useful to get the actual source database schema and access patterns which helps to design the model in DynamoDB. We recommend running this tool against a non-production database instance and it currently supports Aurora MySQL with additional database support planned for future releases.
91
+
92
+ ### Prerequisites for MySQL Integration
93
+
94
+ 1. Aurora MySQL Cluster with MySQL username and password stored in AWS Secrets Manager
95
+ 2. Enable RDS Data API for your Aurora MySQL Cluster
96
+ 3. Enable Performance Schema for access pattern analysis (optional):
97
+
98
+ * Go to the parameter group for your DB instance and set performance_schema value to 1. Make sure to reboot the DB instance after the changes whenever you turn the Performance Schema on or off. Follow the [Instructions](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.Modifying.html) to modify DB parameter group in Amazon Aurora.
99
+ * After the parameter values are modified, you can run the "SHOW GLOBAL VARIABLES LIKE'%performance_schema'"; command to view the value of the performance_schema parameter of the database instance, also consider tunning the below parameters if required.
100
+ * `performance_schema_digests_size` [parameter](https://dev.mysql.com/doc/refman/8.0/en/performance-schema-system-variables.html#sysvar_performance_schema_digests_size) - Sets the maximum number of rows stored in the events_statements_summary_by_digest table for querying access pattern. (When you hit this limit, some logs will be lost, potentially missing important access patterns)
101
+ * `performance_schema_max_digest_length` [parameter](https://dev.mysql.com/doc/refman/8.0/en/performance-schema-system-variables.html#sysvar_performance_schema_max_digest_length) - Sets the maximum byte length for each individual statement digest (access pattern) that the Performance Schema stores. (Default is 1024 bytes, Complex queries might not be fully captured when you hit this limit)
102
+ * Without these Performance Schema query access patterns, DynamoDB Data Modeler tool recommends access patterns based on the information schema from the source Database.
103
+
104
+ 1. Set up AWS credentials with access to AWS services:
105
+
106
+ * Configure AWS credentials with `aws configure` or environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN) . The server will automatically use credentials from environment variables or other standard AWS credential sources.
107
+ * AWS profile with permissions to access RDS Data API and AWS Secrets Manager
108
+
109
+ ### MySQL Environment Variables
110
+
111
+ Add these environment variables to DynamoDB MCP Server configuration to enable MySQL integration:
112
+
113
+ * `MYSQL_CLUSTER_ARN`: The Resource ARN of the Aurora MySQL cluster
114
+ * `MYSQL_SECRET_ARN`: The ARN of the secret containing database credentials
115
+ * `MYSQL_DATABASE`: The name of the database to connect to
116
+ * `AWS_REGION`: AWS region of the Aurora MySQL cluster
117
+ * `MYSQL_MAX_QUERY_RESULTS`: Maximum number of rows to include in analysis output files for schema and access_pattern logs (optional, default: "500")
118
+
119
+ ### MCP configuration with MySQL Environment Variables
120
+
121
+ ```json
122
+ {
123
+ "mcpServers": {
124
+ "awslabs.dynamodb-mcp-server": {
125
+ "command": "uvx",
126
+ "args": ["awslabs.dynamodb-mcp-server@latest"],
127
+ "env": {
128
+ "DDB-MCP-READONLY": "true",
129
+ "AWS_PROFILE": "default",
130
+ "AWS_REGION": "us-west-2",
131
+ "FASTMCP_LOG_LEVEL": "ERROR",
132
+ "MYSQL_CLUSTER_ARN":"arn:aws:rds:$REGION:$ACCOUNT_ID:cluster:$CLUSTER_NAME",
133
+ "MYSQL_SECRET_ARN":"arn:aws:secretsmanager:$REGION:$ACCOUNT_ID:secret:$SECRET_NAME",
134
+ "MYSQL_DATABASE":"<DATABASE_NAME>",
135
+ "MYSQL_MAX_QUERY_RESULTS": 500
136
+ },
137
+ "disabled": false,
138
+ "autoApprove": []
139
+ }
140
+ }
141
+ }
142
+ ```
143
+
144
+ ## Prerequisites
145
+
146
+ 1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/) or the [GitHub README](https://github.com/astral-sh/uv#installation)
147
+ 2. Install Python using `uv python install 3.10`
148
+ 3. Set up AWS credentials with access to AWS services
149
+
150
+ * Consider setting up Read-only permission if you don't want the LLM to modify any resources
151
+
152
+ ## Installation
153
+
154
+ | Cursor | VS Code |
155
+ |:------:|:-------:|
156
+ | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en/install-mcp?name=awslabs.dynamodb-mcp-server&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMnV2eCUyMGF3c2xhYnMuZHluYW1vZGItbWNwLXNlcnZlciU0MGxhdGVzdCUyMiUyQyUyMmVudiUyMiUzQSU3QiUyMkREQi1NQ1AtUkVBRE9OTFklMjIlM0ElMjJ0cnVlJTIyJTJDJTIyQVdTX1BST0ZJTEUlMjIlM0ElMjJkZWZhdWx0JTIyJTJDJTIyQVdTX1JFR0lPTiUyMiUzQSUyMnVzLXdlc3QtMiUyMiUyQyUyMkZBU1RNQ1BfTE9HX0xFVkVMJTIyJTNBJTIyRVJST1IlMjIlN0QlMkMlMjJkaXNhYmxlZCUyMiUzQWZhbHNlJTJDJTIyYXV0b0FwcHJvdmUlMjIlM0ElNUIlNUQlN0Q%3D)| [![Install on VS Code](https://img.shields.io/badge/Install_on-VS_Code-FF9900?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=DynamoDB%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.dynamodb-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22DDB-MCP-READONLY%22%3A%22true%22%2C%22AWS_PROFILE%22%3A%22default%22%2C%22AWS_REGION%22%3A%22us-west-2%22%2C%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
157
+
158
+ Add the MCP to your favorite agentic tools. (e.g. for Amazon Q Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
159
+
160
+ ```json
161
+ {
162
+ "mcpServers": {
163
+ "awslabs.dynamodb-mcp-server": {
164
+ "command": "uvx",
165
+ "args": ["awslabs.dynamodb-mcp-server@latest"],
166
+ "env": {
167
+ "DDB-MCP-READONLY": "true",
168
+ "AWS_PROFILE": "default",
169
+ "AWS_REGION": "us-west-2",
170
+ "FASTMCP_LOG_LEVEL": "ERROR"
171
+ },
172
+ "disabled": false,
173
+ "autoApprove": []
174
+ }
175
+ }
176
+ }
177
+ ```
178
+
179
+ ### Windows Installation
180
+
181
+ For Windows users, the MCP server configuration format is slightly different:
182
+
183
+ ```json
184
+ {
185
+ "mcpServers": {
186
+ "awslabs.dynamodb-mcp-server": {
187
+ "disabled": false,
188
+ "timeout": 60,
189
+ "type": "stdio",
190
+ "command": "uv",
191
+ "args": [
192
+ "tool",
193
+ "run",
194
+ "--from",
195
+ "awslabs.dynamodb-mcp-server@latest",
196
+ "awslabs.dynamodb-mcp-server.exe"
197
+ ],
198
+ "env": {
199
+ "FASTMCP_LOG_LEVEL": "ERROR",
200
+ "AWS_PROFILE": "your-aws-profile",
201
+ "AWS_REGION": "us-west-2"
202
+ }
203
+ }
204
+ }
205
+ }
206
+ ```
207
+
208
+
209
+ or docker after a successful `docker build -t awslabs/dynamodb-mcp-server .`:
210
+
211
+ ```json
212
+ {
213
+ "mcpServers": {
214
+ "awslabs.dynamodb-mcp-server": {
215
+ "command": "docker",
216
+ "args": [
217
+ "run",
218
+ "--rm",
219
+ "--interactive",
220
+ "--env",
221
+ "FASTMCP_LOG_LEVEL=ERROR",
222
+ "awslabs/dynamodb-mcp-server:latest"
223
+ ],
224
+ "env": {},
225
+ "disabled": false,
226
+ "autoApprove": []
227
+ }
228
+ }
229
+ }
230
+ ```
231
+
232
+ ## Limitations & Considerations
233
+
234
+ ### **Application-Level Patterns:**
235
+
236
+ * Queries generated dynamically in application code
237
+ * Caching layer behavior (Redis, Memcached)
238
+ * Real-time vs. analytics query differentiation
239
+ * Background job access patterns
240
+
241
+ ### Business Context:
242
+
243
+ * Data consistency requirements
244
+ * Compliance and audit requirements
245
+ * Geographic distribution requirements
246
+
247
+ ### Recommendation:
248
+
249
+ Supplement analysis with documentation or natural language descriptions based on:
250
+
251
+ * Application code review
252
+ * Architecture documentation review
253
+ * Stakeholder interviews with development team
254
+ * Load testing results analysis
255
+
256
+ There are also more complex patterns that result from stored procedures, triggers, aggregations, that the tool does not currently handle consistently but we plan to improve in future iterations.
@@ -0,0 +1,223 @@
1
+ # AWS DynamoDB MCP Server
2
+
3
+ The official developer experience MCP Server for Amazon DynamoDB. This server provides DynamoDB expert design guidance and data modeling assistance.
4
+
5
+ ## Available MCP Tools
6
+
7
+ Right now the DynamoDB MCP server contains two tools that support data modeling tasks. You can design a data model in natural language by using only the `dynamodb_data_modeling` tool or you can analyze your MySQL database and convert the analysis into a DynamoDB data model by using the `source_db_analyzer` tool.
8
+
9
+ ### Design & Modeling
10
+
11
+ * `dynamodb_data_modeling` - Retrieves the complete DynamoDB Data Modeling Expert prompt
12
+ * `source_db_analyzer` - Executes predefined SQL queries against source databases to analyze schema and access patterns
13
+
14
+ ## Migration Notice
15
+
16
+ Starting with version 2.0.0, this server focuses exclusively on DynamoDB design and modeling guidance. All operational DynamoDB management tools (table operations, item operations, queries, backups, etc.) have been removed in favor of the [AWS API MCP Server](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server) which provides the same capability and more.
17
+
18
+ **This server does not do:**
19
+
20
+ - ❌ Operational DynamoDB management (CRUD operations)
21
+ - ❌ Table creation or data migration
22
+ - ❌ Direct data queries or transformations
23
+
24
+ ### Recommended: AWS API MCP Server
25
+
26
+ For operational DynamoDB management (retrieving data, managing tables, etc.), use the [AWS API MCP Server](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server) which provides comprehensive DynamoDB operations. [Migration guide available here](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server).
27
+
28
+ ### Not Recommended: Legacy Version
29
+
30
+ If you must use the previous operational tools, you can pin to version 1.0.9, though this is not recommended:
31
+
32
+ ```json
33
+ {
34
+ "mcpServers": {
35
+ "awslabs.dynamodb-mcp-server": {
36
+ "command": "uvx",
37
+ "args": ["awslabs.dynamodb-mcp-server@1.0.9"],
38
+ "env": {
39
+ "DDB-MCP-READONLY": "true",
40
+ "AWS_PROFILE": "default",
41
+ "AWS_REGION": "us-west-2",
42
+ "FASTMCP_LOG_LEVEL": "ERROR"
43
+ },
44
+ "disabled": false,
45
+ "autoApprove": []
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ ## Instructions
52
+
53
+ To design a data model in natural language you can simply ask your AI agent to “use my DynamoDB MCP to help me design a DynamoDB data model,” or something similar. If you want to analyze your MySQL query patterns then you can follow these additional steps below to setup connectivity and then say something like “analyze my MySQL database and then help me design a DynamoDB data model.”
54
+
55
+ ## Source Database Integration
56
+
57
+ The DynamoDB MCP server includes source database integration for database analysis and the tool `source_db_analyzer` is useful to get the actual source database schema and access patterns which helps to design the model in DynamoDB. We recommend running this tool against a non-production database instance and it currently supports Aurora MySQL with additional database support planned for future releases.
58
+
59
+ ### Prerequisites for MySQL Integration
60
+
61
+ 1. Aurora MySQL Cluster with MySQL username and password stored in AWS Secrets Manager
62
+ 2. Enable RDS Data API for your Aurora MySQL Cluster
63
+ 3. Enable Performance Schema for access pattern analysis (optional):
64
+
65
+ * Go to the parameter group for your DB instance and set performance_schema value to 1. Make sure to reboot the DB instance after the changes whenever you turn the Performance Schema on or off. Follow the [Instructions](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.Modifying.html) to modify DB parameter group in Amazon Aurora.
66
+ * After the parameter values are modified, you can run the "SHOW GLOBAL VARIABLES LIKE'%performance_schema'"; command to view the value of the performance_schema parameter of the database instance, also consider tunning the below parameters if required.
67
+ * `performance_schema_digests_size` [parameter](https://dev.mysql.com/doc/refman/8.0/en/performance-schema-system-variables.html#sysvar_performance_schema_digests_size) - Sets the maximum number of rows stored in the events_statements_summary_by_digest table for querying access pattern. (When you hit this limit, some logs will be lost, potentially missing important access patterns)
68
+ * `performance_schema_max_digest_length` [parameter](https://dev.mysql.com/doc/refman/8.0/en/performance-schema-system-variables.html#sysvar_performance_schema_max_digest_length) - Sets the maximum byte length for each individual statement digest (access pattern) that the Performance Schema stores. (Default is 1024 bytes, Complex queries might not be fully captured when you hit this limit)
69
+ * Without these Performance Schema query access patterns, DynamoDB Data Modeler tool recommends access patterns based on the information schema from the source Database.
70
+
71
+ 1. Set up AWS credentials with access to AWS services:
72
+
73
+ * Configure AWS credentials with `aws configure` or environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN) . The server will automatically use credentials from environment variables or other standard AWS credential sources.
74
+ * AWS profile with permissions to access RDS Data API and AWS Secrets Manager
75
+
76
+ ### MySQL Environment Variables
77
+
78
+ Add these environment variables to DynamoDB MCP Server configuration to enable MySQL integration:
79
+
80
+ * `MYSQL_CLUSTER_ARN`: The Resource ARN of the Aurora MySQL cluster
81
+ * `MYSQL_SECRET_ARN`: The ARN of the secret containing database credentials
82
+ * `MYSQL_DATABASE`: The name of the database to connect to
83
+ * `AWS_REGION`: AWS region of the Aurora MySQL cluster
84
+ * `MYSQL_MAX_QUERY_RESULTS`: Maximum number of rows to include in analysis output files for schema and access_pattern logs (optional, default: "500")
85
+
86
+ ### MCP configuration with MySQL Environment Variables
87
+
88
+ ```json
89
+ {
90
+ "mcpServers": {
91
+ "awslabs.dynamodb-mcp-server": {
92
+ "command": "uvx",
93
+ "args": ["awslabs.dynamodb-mcp-server@latest"],
94
+ "env": {
95
+ "DDB-MCP-READONLY": "true",
96
+ "AWS_PROFILE": "default",
97
+ "AWS_REGION": "us-west-2",
98
+ "FASTMCP_LOG_LEVEL": "ERROR",
99
+ "MYSQL_CLUSTER_ARN":"arn:aws:rds:$REGION:$ACCOUNT_ID:cluster:$CLUSTER_NAME",
100
+ "MYSQL_SECRET_ARN":"arn:aws:secretsmanager:$REGION:$ACCOUNT_ID:secret:$SECRET_NAME",
101
+ "MYSQL_DATABASE":"<DATABASE_NAME>",
102
+ "MYSQL_MAX_QUERY_RESULTS": 500
103
+ },
104
+ "disabled": false,
105
+ "autoApprove": []
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ ## Prerequisites
112
+
113
+ 1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/) or the [GitHub README](https://github.com/astral-sh/uv#installation)
114
+ 2. Install Python using `uv python install 3.10`
115
+ 3. Set up AWS credentials with access to AWS services
116
+
117
+ * Consider setting up Read-only permission if you don't want the LLM to modify any resources
118
+
119
+ ## Installation
120
+
121
+ | Cursor | VS Code |
122
+ |:------:|:-------:|
123
+ | [![Install MCP Server](https://cursor.com/deeplink/mcp-install-light.svg)](https://cursor.com/en/install-mcp?name=awslabs.dynamodb-mcp-server&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMnV2eCUyMGF3c2xhYnMuZHluYW1vZGItbWNwLXNlcnZlciU0MGxhdGVzdCUyMiUyQyUyMmVudiUyMiUzQSU3QiUyMkREQi1NQ1AtUkVBRE9OTFklMjIlM0ElMjJ0cnVlJTIyJTJDJTIyQVdTX1BST0ZJTEUlMjIlM0ElMjJkZWZhdWx0JTIyJTJDJTIyQVdTX1JFR0lPTiUyMiUzQSUyMnVzLXdlc3QtMiUyMiUyQyUyMkZBU1RNQ1BfTE9HX0xFVkVMJTIyJTNBJTIyRVJST1IlMjIlN0QlMkMlMjJkaXNhYmxlZCUyMiUzQWZhbHNlJTJDJTIyYXV0b0FwcHJvdmUlMjIlM0ElNUIlNUQlN0Q%3D)| [![Install on VS Code](https://img.shields.io/badge/Install_on-VS_Code-FF9900?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=DynamoDB%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.dynamodb-mcp-server%40latest%22%5D%2C%22env%22%3A%7B%22DDB-MCP-READONLY%22%3A%22true%22%2C%22AWS_PROFILE%22%3A%22default%22%2C%22AWS_REGION%22%3A%22us-west-2%22%2C%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
124
+
125
+ Add the MCP to your favorite agentic tools. (e.g. for Amazon Q Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
126
+
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "awslabs.dynamodb-mcp-server": {
131
+ "command": "uvx",
132
+ "args": ["awslabs.dynamodb-mcp-server@latest"],
133
+ "env": {
134
+ "DDB-MCP-READONLY": "true",
135
+ "AWS_PROFILE": "default",
136
+ "AWS_REGION": "us-west-2",
137
+ "FASTMCP_LOG_LEVEL": "ERROR"
138
+ },
139
+ "disabled": false,
140
+ "autoApprove": []
141
+ }
142
+ }
143
+ }
144
+ ```
145
+
146
+ ### Windows Installation
147
+
148
+ For Windows users, the MCP server configuration format is slightly different:
149
+
150
+ ```json
151
+ {
152
+ "mcpServers": {
153
+ "awslabs.dynamodb-mcp-server": {
154
+ "disabled": false,
155
+ "timeout": 60,
156
+ "type": "stdio",
157
+ "command": "uv",
158
+ "args": [
159
+ "tool",
160
+ "run",
161
+ "--from",
162
+ "awslabs.dynamodb-mcp-server@latest",
163
+ "awslabs.dynamodb-mcp-server.exe"
164
+ ],
165
+ "env": {
166
+ "FASTMCP_LOG_LEVEL": "ERROR",
167
+ "AWS_PROFILE": "your-aws-profile",
168
+ "AWS_REGION": "us-west-2"
169
+ }
170
+ }
171
+ }
172
+ }
173
+ ```
174
+
175
+
176
+ or docker after a successful `docker build -t awslabs/dynamodb-mcp-server .`:
177
+
178
+ ```json
179
+ {
180
+ "mcpServers": {
181
+ "awslabs.dynamodb-mcp-server": {
182
+ "command": "docker",
183
+ "args": [
184
+ "run",
185
+ "--rm",
186
+ "--interactive",
187
+ "--env",
188
+ "FASTMCP_LOG_LEVEL=ERROR",
189
+ "awslabs/dynamodb-mcp-server:latest"
190
+ ],
191
+ "env": {},
192
+ "disabled": false,
193
+ "autoApprove": []
194
+ }
195
+ }
196
+ }
197
+ ```
198
+
199
+ ## Limitations & Considerations
200
+
201
+ ### **Application-Level Patterns:**
202
+
203
+ * Queries generated dynamically in application code
204
+ * Caching layer behavior (Redis, Memcached)
205
+ * Real-time vs. analytics query differentiation
206
+ * Background job access patterns
207
+
208
+ ### Business Context:
209
+
210
+ * Data consistency requirements
211
+ * Compliance and audit requirements
212
+ * Geographic distribution requirements
213
+
214
+ ### Recommendation:
215
+
216
+ Supplement analysis with documentation or natural language descriptions based on:
217
+
218
+ * Application code review
219
+ * Architecture documentation review
220
+ * Stakeholder interviews with development team
221
+ * Load testing results analysis
222
+
223
+ There are also more complex patterns that result from stored procedures, triggers, aggregations, that the tool does not currently handle consistently but we plan to improve in future iterations.
@@ -0,0 +1,36 @@
1
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # This file is part of the awslabs namespace.
16
+ # It is intentionally minimal to support PEP 420 namespace packages.
17
+
18
+ # Namespace Package Configuration
19
+ #
20
+ # This line resolves namespace conflicts when multiple packages share the 'awslabs' namespace prefix.
21
+ # Without this configuration, test suites fail and build issues occur because Python cannot properly
22
+ # resolve which package owns the 'awslabs' namespace when both 'awslabs.dynamodb-mcp-server' and
23
+ # 'awslabs.mysql-mcp-server' are installed in the same environment.
24
+ #
25
+ # The extend_path() function implements PEP 420 namespace packages, allowing multiple distributions
26
+ # to contribute modules to the same namespace. This ensures that:
27
+ # 1. Both DynamoDB and MySQL MCP servers can coexist in the same Python environment
28
+ # 2. Import statements like 'from awslabs.dynamodb_mcp_server import ...' work correctly
29
+ # 3. Test discovery and execution functions properly across both packages
30
+ # 4. Build processes complete successfully without namespace collision errors
31
+ #
32
+ # This is the standard solution for namespace packages in Python and is required for proper
33
+ # multi-package namespace support in the awslabs ecosystem.
34
+
35
+ # Extend namespace to include installed packages
36
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
@@ -14,4 +14,4 @@
14
14
 
15
15
  """awslabs.dynamodb-mcp-server"""
16
16
 
17
- __version__ = '2.0.1'
17
+ __version__ = '2.0.2'