awslabs.dynamodb-mcp-server 1.0.0__tar.gz → 1.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 (21) hide show
  1. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/Dockerfile +12 -9
  2. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/PKG-INFO +2 -2
  3. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/README.md +1 -1
  4. awslabs_dynamodb_mcp_server-1.0.2/awslabs/__init__.py +16 -0
  5. awslabs_dynamodb_mcp_server-1.0.2/awslabs/dynamodb_mcp_server/__init__.py +17 -0
  6. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/awslabs/dynamodb_mcp_server/common.py +14 -0
  7. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/awslabs/dynamodb_mcp_server/server.py +67 -6
  8. awslabs_dynamodb_mcp_server-1.0.2/docker-healthcheck.sh +26 -0
  9. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/pyproject.toml +1 -1
  10. awslabs_dynamodb_mcp_server-1.0.0/.pre-commit-config.yaml +0 -14
  11. awslabs_dynamodb_mcp_server-1.0.0/awslabs/__init__.py +0 -13
  12. awslabs_dynamodb_mcp_server-1.0.0/awslabs/dynamodb_mcp_server/__init__.py +0 -14
  13. awslabs_dynamodb_mcp_server-1.0.0/docker-healthcheck.sh +0 -12
  14. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/.gitignore +0 -0
  15. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/.python-version +0 -0
  16. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/CHANGELOG.md +0 -0
  17. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/LICENSE +0 -0
  18. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/NOTICE +0 -0
  19. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/tests/test_dynamodb_server.py +0 -0
  20. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/tests/test_readonly_delete_table.py +0 -0
  21. {awslabs_dynamodb_mcp_server-1.0.0 → awslabs_dynamodb_mcp_server-1.0.2}/uv.lock +0 -0
@@ -1,16 +1,19 @@
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
  #FROM public.ecr.aws/sam/build-python3.10:1.137.1-20250411084548
13
- FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1 AS uv
16
+ FROM public.ecr.aws/sam/build-python3.10@sha256:d821662474d65f3cf2fc97dba2fa807a3adb580d02895fc4545527812550ea65 AS uv
14
17
 
15
18
  # Install the project into `/app`
16
19
  WORKDIR /app
@@ -32,7 +35,7 @@ COPY pyproject.toml uv.lock ./
32
35
 
33
36
  # Install the project's dependencies using the lockfile and settings
34
37
  RUN --mount=type=cache,target=/root/.cache/uv \
35
- pip install uv && \
38
+ pip install uv==0.7.11 && \
36
39
  uv sync --frozen --no-install-project --no-dev --no-editable
37
40
 
38
41
  # Then, add the rest of the project source code and install it
@@ -44,7 +47,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
44
47
  # Make the directory just in case it doesn't exist
45
48
  RUN mkdir -p /root/.local
46
49
 
47
- FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1
50
+ FROM public.ecr.aws/sam/build-python3.10@sha256:d821662474d65f3cf2fc97dba2fa807a3adb580d02895fc4545527812550ea65
48
51
 
49
52
  # Place executables in the environment at the front of the path and include other binaries
50
53
  ENV PATH="/app/.venv/bin:$PATH:/usr/sbin"
@@ -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
  {
@@ -86,7 +86,7 @@ Add the MCP to your favorite agentic tools. e.g. for Amazon Q Developer CLI MCP,
86
86
  }
87
87
  ```
88
88
 
89
- or docker after a succesful `docker build -t awslabs/dynamodb-mcp-server .`:
89
+ or docker after a successful `docker build -t awslabs/dynamodb-mcp-server .`:
90
90
 
91
91
  ```json
92
92
  {
@@ -0,0 +1,16 @@
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.
@@ -0,0 +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
+
15
+ """awslabs.dynamodb-mcp-server"""
16
+
17
+ __version__ = '0.0.0'
@@ -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,
@@ -0,0 +1,26 @@
1
+ #!/bin/sh
2
+
3
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ if [ "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l)" -ne "0" ]; then
18
+ echo -n "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l) awslabs.* streams found";
19
+ exit 0;
20
+ else
21
+ echo -n "Zero awslabs.* streams found";
22
+ exit 1;
23
+ fi;
24
+
25
+ echo -n "Never should reach here";
26
+ exit 99;
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "awslabs.dynamodb-mcp-server"
3
- version = "1.0.0"
3
+ version = "1.0.2"
4
4
  description = "The official MCP Server for interacting with AWS DynamoDB"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -1,14 +0,0 @@
1
- repos:
2
- - repo: https://github.com/astral-sh/ruff-pre-commit
3
- rev: v0.9.6
4
- hooks:
5
- - id: ruff
6
- args: [--fix]
7
- - id: ruff-format
8
-
9
- - repo: https://github.com/commitizen-tools/commitizen
10
- rev: v3.13.0
11
- hooks:
12
- - id: commitizen
13
- - id: commitizen-branch
14
- stages: [push]
@@ -1,13 +0,0 @@
1
- # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
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
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
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.
11
-
12
- # This file is part of the awslabs namespace.
13
- # It is intentionally minimal to support PEP 420 namespace packages.
@@ -1,14 +0,0 @@
1
- # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
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
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- #
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.
11
-
12
- """awslabs.dynamodb-mcp-server"""
13
-
14
- __version__ = '0.0.0'
@@ -1,12 +0,0 @@
1
- #!/bin/sh
2
-
3
- if [ "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l)" -ne "0" ]; then
4
- echo -n "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l) awslabs.* streams found";
5
- exit 0;
6
- else
7
- echo -n "Zero awslabs.* streams found";
8
- exit 1;
9
- fi;
10
-
11
- echo -n "Never should reach here";
12
- exit 99;