You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(dynamodb): improving Database Analysis Queries and changing the query results output format (#1578)
* Improve source_analyer tool
cr: https://code.amazon.com/reviews/CR-228084467
* commiting the test files
* Improving Database Analysis Queries and changes to data modeller
cr: https://code.amazon.com/reviews/CR-228322116
* Cleaning up queries and data modeller prompt
cr: https://code.amazon.com/reviews/CR-228364585
* adding extra condition to ignore system or performance schema related queries
cr: https://code.amazon.com/reviews/CR-228364585
* Fixing secret and formating issue
* Fixing the unit tests
* Increasing the test coverage
* Increasing the test coverage
* add some more test for markdown formater
* Update the readme
* Adding precommit changes
* Removing the unreachable code
* Increasing coverage for partially covered lines on markdown_formatter.py
@@ -11,30 +11,34 @@ Right now the DynamoDB MCP server contains two tools that support data modeling
11
11
*`dynamodb_data_modeling` - Retrieves the complete DynamoDB Data Modeling Expert prompt
12
12
*`source_db_analyzer` - Executes predefined SQL queries against source databases to analyze schema and access patterns
13
13
14
-
## Migration Notice
14
+
## Instructions
15
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.
16
+
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.”
1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/) or the [GitHub README](https://github.com/astral-sh/uv#installation)
21
+
2. Install Python using `uv python install 3.10`
22
+
3. Set up AWS credentials with access to AWS services
23
23
24
-
### Recommended: AWS API MCP Server
24
+
* Consider setting up Read-only permission if you don't want the LLM to modify any resources
25
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).
26
+
### Installation
27
27
28
-
### Not Recommended: Legacy Version
28
+
Use the configurations below to install the MCP without configuring the MySQL source database analyzer.
29
29
30
-
If you must use the previous operational tools, you can pin to version 1.0.9, though this is not recommended:
30
+
| Cursor | VS Code |
31
+
|:------:|:-------:|
32
+
| [](https://cursor.com/en/install-mcp?name=awslabs.dynamodb-mcp-server&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMnV2eCUyMGF3c2xhYnMuZHluYW1vZGItbWNwLXNlcnZlciU0MGxhdGVzdCUyMiUyQyUyMmVudiUyMiUzQSU3QiUyMkREQi1NQ1AtUkVBRE9OTFklMjIlM0ElMjJ0cnVlJTIyJTJDJTIyQVdTX1BST0ZJTEUlMjIlM0ElMjJkZWZhdWx0JTIyJTJDJTIyQVdTX1JFR0lPTiUyMiUzQSUyMnVzLXdlc3QtMiUyMiUyQyUyMkZBU1RNQ1BfTE9HX0xFVkVMJTIyJTNBJTIyRVJST1IlMjIlN0QlMkMlMjJkaXNhYmxlZCUyMiUzQWZhbHNlJTJDJTIyYXV0b0FwcHJvdmUlMjIlM0ElNUIlNUQlN0Q%3D)| [](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) |
33
+
34
+
Add the MCP to your favorite agentic tools. (e.g. for Amazon Q Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
31
35
32
36
```json
33
37
{
34
38
"mcpServers": {
35
39
"awslabs.dynamodb-mcp-server": {
36
40
"command": "uvx",
37
-
"args": ["awslabs.dynamodb-mcp-server@1.0.9"],
41
+
"args": ["awslabs.dynamodb-mcp-server@latest"],
38
42
"env": {
39
43
"DDB-MCP-READONLY": "true",
40
44
"AWS_PROFILE": "default",
@@ -48,9 +52,57 @@ If you must use the previous operational tools, you can pin to version 1.0.9, th
48
52
}
49
53
```
50
54
51
-
##Instructions
55
+
### Windows Installation
52
56
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.”
57
+
For Windows users, the MCP server configuration format is slightly different:
58
+
59
+
```json
60
+
{
61
+
"mcpServers": {
62
+
"awslabs.dynamodb-mcp-server": {
63
+
"disabled": false,
64
+
"timeout": 60,
65
+
"type": "stdio",
66
+
"command": "uv",
67
+
"args": [
68
+
"tool",
69
+
"run",
70
+
"--from",
71
+
"awslabs.dynamodb-mcp-server@latest",
72
+
"awslabs.dynamodb-mcp-server.exe"
73
+
],
74
+
"env": {
75
+
"FASTMCP_LOG_LEVEL": "ERROR",
76
+
"AWS_PROFILE": "your-aws-profile",
77
+
"AWS_REGION": "us-west-2"
78
+
}
79
+
}
80
+
}
81
+
}
82
+
```
83
+
84
+
or docker after a successful `docker build -t awslabs/dynamodb-mcp-server .`:
85
+
86
+
```json
87
+
{
88
+
"mcpServers": {
89
+
"awslabs.dynamodb-mcp-server": {
90
+
"command": "docker",
91
+
"args": [
92
+
"run",
93
+
"--rm",
94
+
"--interactive",
95
+
"--env",
96
+
"FASTMCP_LOG_LEVEL=ERROR",
97
+
"awslabs/dynamodb-mcp-server:latest"
98
+
],
99
+
"env": {},
100
+
"disabled": false,
101
+
"autoApprove": []
102
+
}
103
+
}
104
+
}
105
+
```
54
106
55
107
## Source Database Integration
56
108
@@ -108,28 +160,30 @@ Add these environment variables to DynamoDB MCP Server configuration to enable M
108
160
}
109
161
```
110
162
111
-
## Prerequisites
163
+
## Migration Notice
112
164
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
165
+
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.
116
166
117
-
* Consider setting up Read-only permission if you don't want the LLM to modify any resources
| [](https://cursor.com/en/install-mcp?name=awslabs.dynamodb-mcp-server&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMnV2eCUyMGF3c2xhYnMuZHluYW1vZGItbWNwLXNlcnZlciU0MGxhdGVzdCUyMiUyQyUyMmVudiUyMiUzQSU3QiUyMkREQi1NQ1AtUkVBRE9OTFklMjIlM0ElMjJ0cnVlJTIyJTJDJTIyQVdTX1BST0ZJTEUlMjIlM0ElMjJkZWZhdWx0JTIyJTJDJTIyQVdTX1JFR0lPTiUyMiUzQSUyMnVzLXdlc3QtMiUyMiUyQyUyMkZBU1RNQ1BfTE9HX0xFVkVMJTIyJTNBJTIyRVJST1IlMjIlN0QlMkMlMjJkaXNhYmxlZCUyMiUzQWZhbHNlJTJDJTIyYXV0b0FwcHJvdmUlMjIlM0ElNUIlNUQlN0Q%3D)| [](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) |
173
+
### Recommended: AWS API MCP Server
124
174
125
-
Add the MCP to your favorite agentic tools. (e.g. for Amazon Q Developer CLI MCP, `~/.aws/amazonq/mcp.json`):
175
+
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).
176
+
177
+
### Not Recommended: Legacy Version
178
+
179
+
If you must use the previous operational tools, you can pin to version 1.0.9, though this is not recommended:
126
180
127
181
```json
128
182
{
129
183
"mcpServers": {
130
184
"awslabs.dynamodb-mcp-server": {
131
185
"command": "uvx",
132
-
"args": ["awslabs.dynamodb-mcp-server@latest"],
186
+
"args": ["awslabs.dynamodb-mcp-server@1.0.9"],
133
187
"env": {
134
188
"DDB-MCP-READONLY": "true",
135
189
"AWS_PROFILE": "default",
@@ -142,82 +196,3 @@ Add the MCP to your favorite agentic tools. (e.g. for Amazon Q Developer CLI MCP
142
196
}
143
197
}
144
198
```
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 commit comments