awslabs.dynamodb-mcp-server 1.0.8__tar.gz → 2.0.1__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 (30) hide show
  1. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/CHANGELOG.md +18 -0
  2. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/PKG-INFO +35 -49
  3. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/README.md +32 -48
  4. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/awslabs/dynamodb_mcp_server/__init__.py +1 -1
  5. awslabs_dynamodb_mcp_server-2.0.1/awslabs/dynamodb_mcp_server/common.py +53 -0
  6. awslabs_dynamodb_mcp_server-2.0.1/awslabs/dynamodb_mcp_server/server.py +81 -0
  7. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/pyproject.toml +3 -1
  8. awslabs_dynamodb_mcp_server-2.0.1/tests/evals/README.md +357 -0
  9. awslabs_dynamodb_mcp_server-2.0.1/tests/evals/dynamic_evaluators.py +251 -0
  10. awslabs_dynamodb_mcp_server-2.0.1/tests/evals/evaluation_registry.py +243 -0
  11. awslabs_dynamodb_mcp_server-2.0.1/tests/evals/logging_config.py +77 -0
  12. awslabs_dynamodb_mcp_server-2.0.1/tests/evals/multiturn_evaluator.py +376 -0
  13. awslabs_dynamodb_mcp_server-2.0.1/tests/evals/scenarios.py +244 -0
  14. awslabs_dynamodb_mcp_server-2.0.1/tests/evals/test_dspy_evals.py +338 -0
  15. awslabs_dynamodb_mcp_server-2.0.1/tests/test_dynamodb_server.py +53 -0
  16. awslabs_dynamodb_mcp_server-2.0.1/uv.lock +3219 -0
  17. awslabs_dynamodb_mcp_server-1.0.8/awslabs/dynamodb_mcp_server/common.py +0 -334
  18. awslabs_dynamodb_mcp_server-1.0.8/awslabs/dynamodb_mcp_server/server.py +0 -951
  19. awslabs_dynamodb_mcp_server-1.0.8/tests/test_dynamodb_server.py +0 -930
  20. awslabs_dynamodb_mcp_server-1.0.8/tests/test_readonly_delete_table.py +0 -14
  21. awslabs_dynamodb_mcp_server-1.0.8/uv.lock +0 -1594
  22. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/.gitignore +0 -0
  23. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/.python-version +0 -0
  24. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/Dockerfile +0 -0
  25. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/LICENSE +0 -0
  26. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/NOTICE +0 -0
  27. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/awslabs/__init__.py +0 -0
  28. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/awslabs/dynamodb_mcp_server/prompts/dynamodb_architect.md +0 -0
  29. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/docker-healthcheck.sh +0 -0
  30. {awslabs_dynamodb_mcp_server-1.0.8 → awslabs_dynamodb_mcp_server-2.0.1}/uv-requirements.txt +0 -0
@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.0.0] - 2025-09-11
9
+
10
+ ### Removed
11
+
12
+ - **BREAKING CHANGE:** DynamoDB Native API functions have been removed in favour of the [AWS API MCP Server](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server).
13
+
14
+ - The following functionality has been removed:
15
+ - Table Operations
16
+ - Item Operations
17
+ - Query and Scan Operations
18
+ - Backup and Recovery Operations
19
+ - Time to Live Operations
20
+ - Export Operations
21
+ - Tags and Resource Policies Operations
22
+ - Miscellaneous Operations (describe endpoints and describe limits)
23
+
24
+ - **Migration:** Use the AWS API MCP Server to perform these operations going forward.
25
+
8
26
  ## [1.0.0] - 2025-05-26
9
27
 
10
28
  ### Removed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awslabs.dynamodb-mcp-server
3
- Version: 1.0.8
3
+ Version: 2.0.1
4
4
  Summary: The official MCP Server for interacting with AWS DynamoDB
5
5
  Project-URL: homepage, https://awslabs.github.io/mcp/
6
6
  Project-URL: docs, https://awslabs.github.io/mcp/servers/dynamodb-mcp-server/
@@ -22,9 +22,11 @@ Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3.13
23
23
  Requires-Python: >=3.10
24
24
  Requires-Dist: boto3==1.40.5
25
+ Requires-Dist: dspy-ai>=2.6.27
25
26
  Requires-Dist: loguru==0.7.3
26
27
  Requires-Dist: mcp[cli]==1.12.4
27
28
  Requires-Dist: pydantic==2.11.7
29
+ Requires-Dist: strands-agents>=1.5.0
28
30
  Requires-Dist: typing-extensions==4.14.1
29
31
  Description-Content-Type: text/markdown
30
32
 
@@ -32,64 +34,48 @@ Description-Content-Type: text/markdown
32
34
 
33
35
  The official MCP Server for interacting with AWS DynamoDB
34
36
 
35
- This comprehensive server provides both operational DynamoDB management and expert design guidance, featuring 30+ operational tools for managing DynamoDB tables, items, indexes, backups, and more, expert data modeling guidance.
37
+ This server provides expert DynamoDB design guidance and data modeling assistance.
36
38
 
37
39
  ## Available MCP Tools
38
40
 
39
41
  ### Design & Modeling
40
42
  - `dynamodb_data_modeling` - Retrieves the complete DynamoDB Data Modeling Expert prompt
41
43
 
42
- ### Table Operations
43
- - `create_table` - Creates a new DynamoDB table with optional secondary indexes
44
- - `delete_table` - Deletes a table and all of its items
45
- - `describe_table` - Returns table information including status, creation time, key schema and indexes
46
- - `list_tables` - Returns a paginated list of table names in your account
47
- - `update_table` - Modifies table settings including provisioned throughput, global secondary indexes, and DynamoDB Streams configuration
48
-
49
- ### Item Operations
50
- - `get_item` - Returns attributes for an item with the given primary key
51
- - `put_item` - Creates a new item or replaces an existing item in a table
52
- - `update_item` - Edits an existing item's attributes, or adds a new item if it does not already exist
53
- - `delete_item` - Deletes a single item in a table by primary key
54
-
55
- ### Query and Scan Operations
56
- - `query` - Returns items from a table or index matching a partition key value, with optional sort key filtering
57
- - `scan` - Returns items and attributes by scanning a table or secondary index
58
-
59
- ### Backup and Recovery
60
- - `create_backup` - Creates a backup of a DynamoDB table
61
- - `describe_backup` - Describes an existing backup of a table
62
- - `list_backups` - Returns a list of table backups
63
- - `restore_table_from_backup` - Creates a new table from a backup
64
- - `describe_continuous_backups` - Returns continuous backup and point in time recovery status
65
- - `update_continuous_backups` - Enables or disables point in time recovery
66
-
67
- ### Time to Live (TTL)
68
- - `update_time_to_live` - Enables or disables Time to Live (TTL) for the specified table
69
- - `describe_time_to_live` - Returns the Time to Live (TTL) settings for a table
70
-
71
- ### Export Operations
72
- - `describe_export` - Returns information about a table export
73
- - `list_exports` - Returns a list of table exports
74
-
75
- ### Tags and Resource Policies
76
- - `put_resource_policy` - Attaches a resource-based policy document to a table or stream
77
- - `get_resource_policy` - Returns the resource-based policy document attached to a table or stream
78
- - `tag_resource` - Adds tags to a DynamoDB resource
79
- - `untag_resource` - Removes tags from a DynamoDB resource
80
- - `list_tags_of_resource` - Returns tags for a DynamoDB resource
81
-
82
- ### Misc
83
- - `describe_limits` - Returns the current provisioned-capacity quotas for your AWS account
84
- - `describe_endpoints` - Returns DynamoDB endpoints for the current region
44
+ ## Migration Notice
85
45
 
86
- ## Instructions
46
+ 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 favour 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.
47
+
48
+ ### Recommended: AWS API MCP Server
49
+
50
+ For operational DynamoDB management, use the [AWS API MCP Server](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server) which provides comprehensive AWS service management including all DynamoDB operations. [Migration guide available here](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server).
51
+
52
+ ### Not Recommended: Legacy Version
53
+
54
+ If you must use the previous operational tools, you can pin to version 1.0.9, though this is not recommended:
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "awslabs.dynamodb-mcp-server": {
60
+ "command": "uvx",
61
+ "args": ["awslabs.dynamodb-mcp-server@1.0.9"],
62
+ "env": {
63
+ "DDB-MCP-READONLY": "true",
64
+ "AWS_PROFILE": "default",
65
+ "AWS_REGION": "us-west-2",
66
+ "FASTMCP_LOG_LEVEL": "ERROR"
67
+ },
68
+ "disabled": false,
69
+ "autoApprove": []
70
+ }
71
+ }
72
+ }
73
+ ```
87
74
 
88
- The official MCP Server for interacting with AWS DynamoDB provides a comprehensive set of tools for both designing and managing DynamoDB resources.
75
+ ## Instructions
89
76
 
90
- To use these tools, ensure you have proper AWS credentials configured with appropriate permissions for DynamoDB operations. The server will automatically use credentials from environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN) or other standard AWS credential sources.
77
+ This MCP Server provides DynamoDB design and modeling guidance only. 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).
91
78
 
92
- All tools support an optional `region_name` parameter to specify which AWS region to operate in. If not provided, it will use the AWS_REGION environment variable or default to 'us-west-2'.
93
79
 
94
80
  ## Prerequisites
95
81
 
@@ -2,64 +2,48 @@
2
2
 
3
3
  The official MCP Server for interacting with AWS DynamoDB
4
4
 
5
- This comprehensive server provides both operational DynamoDB management and expert design guidance, featuring 30+ operational tools for managing DynamoDB tables, items, indexes, backups, and more, expert data modeling guidance.
5
+ This server provides expert DynamoDB design guidance and data modeling assistance.
6
6
 
7
7
  ## Available MCP Tools
8
8
 
9
9
  ### Design & Modeling
10
10
  - `dynamodb_data_modeling` - Retrieves the complete DynamoDB Data Modeling Expert prompt
11
11
 
12
- ### Table Operations
13
- - `create_table` - Creates a new DynamoDB table with optional secondary indexes
14
- - `delete_table` - Deletes a table and all of its items
15
- - `describe_table` - Returns table information including status, creation time, key schema and indexes
16
- - `list_tables` - Returns a paginated list of table names in your account
17
- - `update_table` - Modifies table settings including provisioned throughput, global secondary indexes, and DynamoDB Streams configuration
18
-
19
- ### Item Operations
20
- - `get_item` - Returns attributes for an item with the given primary key
21
- - `put_item` - Creates a new item or replaces an existing item in a table
22
- - `update_item` - Edits an existing item's attributes, or adds a new item if it does not already exist
23
- - `delete_item` - Deletes a single item in a table by primary key
24
-
25
- ### Query and Scan Operations
26
- - `query` - Returns items from a table or index matching a partition key value, with optional sort key filtering
27
- - `scan` - Returns items and attributes by scanning a table or secondary index
28
-
29
- ### Backup and Recovery
30
- - `create_backup` - Creates a backup of a DynamoDB table
31
- - `describe_backup` - Describes an existing backup of a table
32
- - `list_backups` - Returns a list of table backups
33
- - `restore_table_from_backup` - Creates a new table from a backup
34
- - `describe_continuous_backups` - Returns continuous backup and point in time recovery status
35
- - `update_continuous_backups` - Enables or disables point in time recovery
36
-
37
- ### Time to Live (TTL)
38
- - `update_time_to_live` - Enables or disables Time to Live (TTL) for the specified table
39
- - `describe_time_to_live` - Returns the Time to Live (TTL) settings for a table
40
-
41
- ### Export Operations
42
- - `describe_export` - Returns information about a table export
43
- - `list_exports` - Returns a list of table exports
44
-
45
- ### Tags and Resource Policies
46
- - `put_resource_policy` - Attaches a resource-based policy document to a table or stream
47
- - `get_resource_policy` - Returns the resource-based policy document attached to a table or stream
48
- - `tag_resource` - Adds tags to a DynamoDB resource
49
- - `untag_resource` - Removes tags from a DynamoDB resource
50
- - `list_tags_of_resource` - Returns tags for a DynamoDB resource
51
-
52
- ### Misc
53
- - `describe_limits` - Returns the current provisioned-capacity quotas for your AWS account
54
- - `describe_endpoints` - Returns DynamoDB endpoints for the current region
12
+ ## Migration Notice
55
13
 
56
- ## Instructions
14
+ 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 favour 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.
15
+
16
+ ### Recommended: AWS API MCP Server
17
+
18
+ For operational DynamoDB management, use the [AWS API MCP Server](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server) which provides comprehensive AWS service management including all DynamoDB operations. [Migration guide available here](https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server).
19
+
20
+ ### Not Recommended: Legacy Version
21
+
22
+ If you must use the previous operational tools, you can pin to version 1.0.9, though this is not recommended:
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "awslabs.dynamodb-mcp-server": {
28
+ "command": "uvx",
29
+ "args": ["awslabs.dynamodb-mcp-server@1.0.9"],
30
+ "env": {
31
+ "DDB-MCP-READONLY": "true",
32
+ "AWS_PROFILE": "default",
33
+ "AWS_REGION": "us-west-2",
34
+ "FASTMCP_LOG_LEVEL": "ERROR"
35
+ },
36
+ "disabled": false,
37
+ "autoApprove": []
38
+ }
39
+ }
40
+ }
41
+ ```
57
42
 
58
- The official MCP Server for interacting with AWS DynamoDB provides a comprehensive set of tools for both designing and managing DynamoDB resources.
43
+ ## Instructions
59
44
 
60
- To use these tools, ensure you have proper AWS credentials configured with appropriate permissions for DynamoDB operations. The server will automatically use credentials from environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN) or other standard AWS credential sources.
45
+ This MCP Server provides DynamoDB design and modeling guidance only. 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).
61
46
 
62
- All tools support an optional `region_name` parameter to specify which AWS region to operate in. If not provided, it will use the AWS_REGION environment variable or default to 'us-west-2'.
63
47
 
64
48
  ## Prerequisites
65
49
 
@@ -14,4 +14,4 @@
14
14
 
15
15
  """awslabs.dynamodb-mcp-server"""
16
16
 
17
- __version__ = '1.0.8'
17
+ __version__ = '2.0.1'
@@ -0,0 +1,53 @@
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
+ import os
16
+ from functools import wraps
17
+ from typing import Callable
18
+
19
+
20
+ def handle_exceptions(func: Callable) -> Callable:
21
+ """Decorator to handle exceptions in DynamoDB operations.
22
+
23
+ Wraps the function in a try-catch block and returns any exceptions
24
+ in a standardized error format.
25
+
26
+ Args:
27
+ func: The function to wrap
28
+
29
+ Returns:
30
+ The wrapped function that handles exceptions
31
+ """
32
+
33
+ @wraps(func)
34
+ async def wrapper(*args, **kwargs):
35
+ try:
36
+ return await func(*args, **kwargs)
37
+ except Exception as e:
38
+ return {'error': str(e)}
39
+
40
+ return wrapper
41
+
42
+
43
+ def mutation_check(func):
44
+ """Decorator to block mutations if DDB-MCP-READONLY is set to true."""
45
+
46
+ @wraps(func)
47
+ async def wrapper(*args, **kwargs):
48
+ readonly = os.environ.get('DDB-MCP-READONLY', '').lower()
49
+ if readonly in ('true', '1', 'yes'): # treat these as true
50
+ return {'error': 'Mutation not allowed: DDB-MCP-READONLY is set to true.'}
51
+ return await func(*args, **kwargs)
52
+
53
+ return wrapper
@@ -0,0 +1,81 @@
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
+ #!/usr/bin/env python3
16
+
17
+ from awslabs.dynamodb_mcp_server.common import handle_exceptions
18
+ from mcp.server.fastmcp import FastMCP
19
+ from pathlib import Path
20
+
21
+
22
+ # Define server instructions and dependencies
23
+ SERVER_INSTRUCTIONS = """The official MCP Server for AWS DynamoDB design and modeling guidance
24
+
25
+ This server provides DynamoDB design and modeling expertise.
26
+
27
+ When users ask for dynamodb operational tasks, provide EXACTLY these two options:
28
+ Option 1(RECOMMENDED): AWS API MCP Server
29
+ Migration guide: https://github.com/awslabs/mcp/tree/main/src/aws-api-mcp-server
30
+ Option 2(NOT RECOMMENDED): Legacy version 1.0.9
31
+
32
+ Available Tool:
33
+ --------------
34
+ Use the `dynamodb_data_modeling` tool to access enterprise-level DynamoDB design expertise.
35
+ This tool provides systematic methodology for creating production-ready multi-table design with
36
+ advanced optimizations, cost analysis, and integration patterns.
37
+ """
38
+
39
+
40
+ def create_server():
41
+ """Create and configure the MCP server instance."""
42
+ return FastMCP(
43
+ 'awslabs.dynamodb-mcp-server',
44
+ instructions=SERVER_INSTRUCTIONS,
45
+ )
46
+
47
+
48
+ app = create_server()
49
+
50
+
51
+ @app.tool()
52
+ @handle_exceptions
53
+ async def dynamodb_data_modeling() -> str:
54
+ """Retrieves the complete DynamoDB Data Modeling Expert prompt.
55
+
56
+ This tool returns a production-ready prompt to help user with data modeling on DynamoDB.
57
+ The prompt guides through requirements gathering, access pattern analysis, and production-ready
58
+ schema design. The prompt contains:
59
+
60
+ - Structured 2-phase workflow (requirements → final design)
61
+ - Enterprise design patterns: hot partition analysis, write sharding, sparse GSIs, and more
62
+ - Cost optimization strategies and RPS-based capacity planning
63
+ - Multi-table design philosophy with advanced denormalization patterns
64
+ - Integration guidance for OpenSearch, Lambda, and analytics
65
+
66
+ Usage: Simply call this tool to get the expert prompt.
67
+
68
+ Returns: Complete expert system prompt as text (no parameters required)
69
+ """
70
+ prompt_file = Path(__file__).parent / 'prompts' / 'dynamodb_architect.md'
71
+ architect_prompt = prompt_file.read_text(encoding='utf-8')
72
+ return architect_prompt
73
+
74
+
75
+ def main():
76
+ """Main entry point for the MCP server application."""
77
+ app.run()
78
+
79
+
80
+ if __name__ == '__main__':
81
+ main()
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "awslabs.dynamodb-mcp-server"
3
- version = "1.0.8"
3
+ version = "2.0.1"
4
4
  description = "The official MCP Server for interacting with AWS DynamoDB"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -10,6 +10,8 @@ dependencies = [
10
10
  "mcp[cli]==1.12.4",
11
11
  "pydantic==2.11.7",
12
12
  "typing-extensions==4.14.1",
13
+ "strands-agents>=1.5.0",
14
+ "dspy-ai>=2.6.27"
13
15
  ]
14
16
  license = {text = "Apache-2.0"}
15
17
  license-files = ["LICENSE", "NOTICE" ]