awslabs.dynamodb-mcp-server 1.0.0__py3-none-any.whl → 1.0.2__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.

Potentially problematic release.


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

awslabs/__init__.py CHANGED
@@ -1,13 +1,16 @@
1
1
  # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
5
6
  #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
8
- # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
9
- # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
10
- # and limitations under the License.
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.
11
14
 
12
15
  # This file is part of the awslabs namespace.
13
16
  # It is intentionally minimal to support PEP 420 namespace packages.
@@ -1,13 +1,16 @@
1
1
  # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
4
- # with the License. A copy of the License is located at
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
5
6
  #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # http://www.apache.org/licenses/LICENSE-2.0
7
8
  #
8
- # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
9
- # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
10
- # and limitations under the License.
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.
11
14
 
12
15
  """awslabs.dynamodb-mcp-server"""
13
16
 
@@ -1,3 +1,17 @@
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
+
1
15
  import os
2
16
  from functools import wraps
3
17
  from typing import Any, Callable, Dict, List, Literal, Optional
@@ -1,3 +1,17 @@
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
+
1
15
  #!/usr/bin/env python3
2
16
 
3
17
  import boto3
@@ -40,8 +54,51 @@ from typing import Any, Dict, List, Literal, Union
40
54
 
41
55
  app = FastMCP(
42
56
  name='dynamodb-server',
43
- instructions='The official MCP Server for interacting with AWS DynamoDB',
44
- version='0.1.1',
57
+ instructions="""The official MCP Server for interacting with AWS DynamoDB
58
+
59
+ IMPORTANT: DynamoDB Attribute Value Format
60
+ -----------------------------------------
61
+ When working with DynamoDB, all attribute values must be specified with their data types.
62
+ Each attribute value is represented as a dictionary with a single key-value pair where the key
63
+ is the data type and the value is the data itself:
64
+
65
+ - S: String
66
+ Example: {"S": "Hello"}
67
+
68
+ - N: Number (sent as a string)
69
+ Example: {"N": "123.45"}
70
+
71
+ - B: Binary data (Base64-encoded)
72
+ Example: {"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"}
73
+
74
+ - BOOL: Boolean value
75
+ Example: {"BOOL": true}
76
+
77
+ - NULL: Null value
78
+ Example: {"NULL": true}
79
+
80
+ - L: List of AttributeValue objects
81
+ Example: {"L": [{"S": "Cookies"}, {"S": "Coffee"}, {"N": "3.14159"}]}
82
+
83
+ - M: Map of attribute name/value pairs
84
+ Example: {"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}}
85
+
86
+ - SS: String Set (array of strings)
87
+ Example: {"SS": ["Giraffe", "Hippo", "Zebra"]}
88
+
89
+ - NS: Number Set (array of strings representing numbers)
90
+ Example: {"NS": ["42.2", "-19", "7.5", "3.14"]}
91
+
92
+ - BS: Binary Set (array of Base64-encoded binary data objects)
93
+ Example: {"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]}
94
+
95
+ Common usage examples:
96
+ - Primary key: {"userId": {"S": "user123"}}
97
+ - Composite key: {"userId": {"S": "user123"}, "timestamp": {"N": "1612345678"}}
98
+ - Expression attribute values: {":minScore": {"N": "100"}, ":active": {"BOOL": true}}
99
+ - Complete item: {"userId": {"S": "user123"}, "score": {"N": "100"}, "data": {"B": "binarydata=="}}
100
+ """,
101
+ version='0.1.2',
45
102
  )
46
103
 
47
104
 
@@ -67,7 +124,9 @@ index_name = Field(
67
124
  default=None,
68
125
  description='The name of a GSI',
69
126
  )
70
- key: Dict[str, KeyAttributeValue] = Field(description='The primary key of an item')
127
+ key: Dict[str, KeyAttributeValue] = Field(
128
+ description='The primary key of an item. Must use DynamoDB attribute value format (see IMPORTANT note about DynamoDB Attribute Value Format).'
129
+ )
71
130
  filter_expression: str = Field(
72
131
  default=None,
73
132
  description='Filter conditions expression that DynamoDB applies to filter out data',
@@ -80,7 +139,8 @@ expression_attribute_names: Dict[str, str] = Field(
80
139
  default=None, description='Substitution tokens for attribute names in an expression.'
81
140
  )
82
141
  expression_attribute_values: Dict[str, AttributeValue] = Field(
83
- default=None, description='Values that can be substituted in an expression'
142
+ default=None,
143
+ description='Values that can be substituted in an expression. Must use DynamoDB attribute value format (see IMPORTANT note about DynamoDB Attribute Value Format).',
84
144
  )
85
145
  select: Select = Field(
86
146
  default=None,
@@ -88,7 +148,8 @@ select: Select = Field(
88
148
  )
89
149
  limit: int = Field(default=None, description='The maximum number of items to evaluate', ge=1)
90
150
  exclusive_start_key: Dict[str, KeyAttributeValue] = Field(
91
- default=None, description='Use the LastEvaluatedKey from the previous call.'
151
+ default=None,
152
+ description='Use the LastEvaluatedKey from the previous call. Must use DynamoDB attribute value format (see IMPORTANT note about DynamoDB Attribute Value Format).',
92
153
  )
93
154
 
94
155
  billing_mode: Literal['PROVISIONED', 'PAY_PER_REQUEST'] = Field(
@@ -310,7 +371,7 @@ async def get_item(
310
371
  async def put_item(
311
372
  table_name: str = table_name,
312
373
  item: Dict[str, AttributeValue] = Field(
313
- description='A map of attribute name/value pairs, one for each attribute.'
374
+ description='A map of attribute name/value pairs, one for each attribute. Must use DynamoDB attribute value format (see IMPORTANT note about DynamoDB Attribute Value Format).'
314
375
  ),
315
376
  condition_expression: str = Field(
316
377
  default=None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awslabs.dynamodb-mcp-server
3
- Version: 1.0.0
3
+ Version: 1.0.2
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/
@@ -116,7 +116,7 @@ Add the MCP to your favorite agentic tools. e.g. for Amazon Q Developer CLI MCP,
116
116
  }
117
117
  ```
118
118
 
119
- or docker after a succesful `docker build -t awslabs/dynamodb-mcp-server .`:
119
+ or docker after a successful `docker build -t awslabs/dynamodb-mcp-server .`:
120
120
 
121
121
  ```json
122
122
  {
@@ -0,0 +1,10 @@
1
+ awslabs/__init__.py,sha256=WuqxdDgUZylWNmVoPKiK7qGsTB_G4UmuXIrJ-VBwDew,731
2
+ awslabs/dynamodb_mcp_server/__init__.py,sha256=fjepFDvi4XcDm6PyjZL6NcA7CqQF4lyficHovM3yrdk,673
3
+ awslabs/dynamodb_mcp_server/common.py,sha256=aj1uOGa63TQdM3r75Zht74y1OGgUblDEQ-0h1RZHfn0,11422
4
+ awslabs/dynamodb_mcp_server/server.py,sha256=V-fhlA3dHVTSlK8hDomRGciFI0C8sY4KFzRH5G3GdyQ,34815
5
+ awslabs_dynamodb_mcp_server-1.0.2.dist-info/METADATA,sha256=GmLNGdrsYLWw2lfw7OwvH6mpefi8HmfQ4IOU2ZQyCaw,5893
6
+ awslabs_dynamodb_mcp_server-1.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ awslabs_dynamodb_mcp_server-1.0.2.dist-info/entry_points.txt,sha256=Vn6TvAN9d67Lsbkcs0UcIiOBI5xDpNBm_MOOzc1h-YU,88
8
+ awslabs_dynamodb_mcp_server-1.0.2.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
9
+ awslabs_dynamodb_mcp_server-1.0.2.dist-info/licenses/NOTICE,sha256=47UMmTFkf8rUc_JaJfdWe6NsAJQOcZNPZIL6JzU_k5U,95
10
+ awslabs_dynamodb_mcp_server-1.0.2.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- awslabs/__init__.py,sha256=47wJeKcStxEJwX7SVVV2pnAWYR8FxcaYoT3YTmZ5Plg,674
2
- awslabs/dynamodb_mcp_server/__init__.py,sha256=v9gwAZRDfCdRfC-s0e9gUXPK3rzXrdHjBywl4e05cGs,616
3
- awslabs/dynamodb_mcp_server/common.py,sha256=TP05-UxC7b_IUfuO_Y-DsySPfkAmPl29ltgleemHfWk,10806
4
- awslabs/dynamodb_mcp_server/server.py,sha256=yjEvGXecHaUnwoDLy5UPy_A5repNLltduXQclejy9pA,32307
5
- awslabs_dynamodb_mcp_server-1.0.0.dist-info/METADATA,sha256=8yuKIKsejg7ubjyTkzzddk1w_snPyo1myTQZ8YqOJLA,5892
6
- awslabs_dynamodb_mcp_server-1.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- awslabs_dynamodb_mcp_server-1.0.0.dist-info/entry_points.txt,sha256=Vn6TvAN9d67Lsbkcs0UcIiOBI5xDpNBm_MOOzc1h-YU,88
8
- awslabs_dynamodb_mcp_server-1.0.0.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
9
- awslabs_dynamodb_mcp_server-1.0.0.dist-info/licenses/NOTICE,sha256=47UMmTFkf8rUc_JaJfdWe6NsAJQOcZNPZIL6JzU_k5U,95
10
- awslabs_dynamodb_mcp_server-1.0.0.dist-info/RECORD,,