awslabs.mysql-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.
- awslabs/__init__.py +9 -6
- awslabs/mysql_mcp_server/__init__.py +10 -7
- awslabs/mysql_mcp_server/mutable_sql_detector.py +10 -9
- awslabs/mysql_mcp_server/server.py +9 -6
- {awslabs_mysql_mcp_server-1.0.0.dist-info → awslabs_mysql_mcp_server-1.0.2.dist-info}/METADATA +10 -5
- awslabs_mysql_mcp_server-1.0.2.dist-info/RECORD +10 -0
- awslabs_mysql_mcp_server-1.0.0.dist-info/RECORD +0 -10
- {awslabs_mysql_mcp_server-1.0.0.dist-info → awslabs_mysql_mcp_server-1.0.2.dist-info}/WHEEL +0 -0
- {awslabs_mysql_mcp_server-1.0.0.dist-info → awslabs_mysql_mcp_server-1.0.2.dist-info}/entry_points.txt +0 -0
- {awslabs_mysql_mcp_server-1.0.0.dist-info → awslabs_mysql_mcp_server-1.0.2.dist-info}/licenses/LICENSE +0 -0
- {awslabs_mysql_mcp_server-1.0.0.dist-info → awslabs_mysql_mcp_server-1.0.2.dist-info}/licenses/NOTICE +0 -0
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")
|
|
4
|
-
#
|
|
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
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
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,14 +1,17 @@
|
|
|
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")
|
|
4
|
-
#
|
|
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
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
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.mysql_mcp_server"""
|
|
13
16
|
|
|
14
|
-
__version__ = '0.0.
|
|
17
|
+
__version__ = '0.0.1'
|
|
@@ -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")
|
|
4
|
-
#
|
|
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
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
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
|
import re
|
|
13
16
|
|
|
@@ -89,8 +92,6 @@ SYSTEM_REGEX = re.compile(
|
|
|
89
92
|
|
|
90
93
|
# -- Suspicious pattern detection (SQL injection, stacked queries, etc.) --
|
|
91
94
|
SUSPICIOUS_PATTERNS = [
|
|
92
|
-
r'--.*$', # single-line comment
|
|
93
|
-
r'/\*.*?\*/', # multi-line comment
|
|
94
95
|
r"(?i)'.*?--", # comment injection
|
|
95
96
|
r'(?i)\bor\b\s+\d+\s*=\s*\d+', # numeric tautology
|
|
96
97
|
r"(?i)\bor\b\s*'[^']+'\s*=\s*'[^']+'", # string tautology
|
|
@@ -98,7 +99,7 @@ SUSPICIOUS_PATTERNS = [
|
|
|
98
99
|
r'(?i)\bdrop\b', # DROP
|
|
99
100
|
r'(?i)\btruncate\b', # TRUNCATE
|
|
100
101
|
r'(?i)\bgrant\b|\brevoke\b', # GRANT or REVOKE
|
|
101
|
-
r'(
|
|
102
|
+
r';\s*(?!($|\s*--|\s*/\*))(?=\S)', # stacked queries, excluding semicolons followed by comments or whitespace
|
|
102
103
|
r'(?i)\bsleep\s*\(', # time-based injection
|
|
103
104
|
r'(?i)\bload_file\s*\(', # file read
|
|
104
105
|
r'(?i)\binto\s+outfile\b', # file write
|
|
@@ -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")
|
|
4
|
-
#
|
|
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
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
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 mysql MCP Server implementation."""
|
|
13
16
|
|
{awslabs_mysql_mcp_server-1.0.0.dist-info → awslabs_mysql_mcp_server-1.0.2.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.mysql-mcp-server
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: An AWS Labs Model Context Protocol (MCP) server for mysql
|
|
5
5
|
Project-URL: homepage, https://awslabs.github.io/mcp/
|
|
6
6
|
Project-URL: docs, https://awslabs.github.io/mcp/servers/mysql-mcp-server/
|
|
@@ -24,7 +24,7 @@ Requires-Python: >=3.10
|
|
|
24
24
|
Requires-Dist: boto3>=1.38.14
|
|
25
25
|
Requires-Dist: botocore>=1.38.14
|
|
26
26
|
Requires-Dist: loguru>=0.7.0
|
|
27
|
-
Requires-Dist: mcp[cli]>=1.
|
|
27
|
+
Requires-Dist: mcp[cli]>=1.11.0
|
|
28
28
|
Requires-Dist: pydantic>=2.10.6
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
|
|
@@ -52,7 +52,11 @@ An AWS Labs Model Context Protocol (MCP) server for Aurora MySQL
|
|
|
52
52
|
|
|
53
53
|
## Installation
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
| Cursor | VS Code |
|
|
56
|
+
|:------:|:-------:|
|
|
57
|
+
| [](https://cursor.com/install-mcp?name=awslabs.mysql-mcp-server&config=eyJjb21tYW5kIjoidXZ4IGF3c2xhYnMubXlzcWwtbWNwLXNlcnZlckBsYXRlc3QgLS1yZXNvdXJjZV9hcm4gW3lvdXIgZGF0YV0gLS1zZWNyZXRfYXJuIFt5b3VyIGRhdGFdIC0tZGF0YWJhc2UgW3lvdXIgZGF0YV0gLS1yZWdpb24gW3lvdXIgZGF0YV0gLS1yZWFkb25seSBUcnVlIiwiZW52Ijp7IkFXU19QUk9GSUxFIjoieW91ci1hd3MtcHJvZmlsZSIsIkFXU19SRUdJT04iOiJ1cy1lYXN0LTEiLCJGQVNUTUNQX0xPR19MRVZFTCI6IkVSUk9SIn0sImRpc2FibGVkIjpmYWxzZSwiYXV0b0FwcHJvdmUiOltdfQ%3D%3D) | [](https://insiders.vscode.dev/redirect/mcp/install?name=MySQL%20MCP%20Server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.mysql-mcp-server%40latest%22%2C%22--resource_arn%22%2C%22%5Byour%20data%5D%22%2C%22--secret_arn%22%2C%22%5Byour%20data%5D%22%2C%22--database%22%2C%22%5Byour%20data%5D%22%2C%22--region%22%2C%22%5Byour%20data%5D%22%2C%22--readonly%22%2C%22True%22%5D%2C%22env%22%3A%7B%22AWS_PROFILE%22%3A%22your-aws-profile%22%2C%22AWS_REGION%22%3A%22us-east-1%22%2C%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D) |
|
|
58
|
+
|
|
59
|
+
Configure the MCP server in your MCP client configuration (e.g., for Amazon Q Developer CLI, edit `~/.aws/amazonq/mcp.json`):
|
|
56
60
|
|
|
57
61
|
```json
|
|
58
62
|
{
|
|
@@ -86,7 +90,8 @@ Here are some ways you can work with MCP across AWS, and we'll be adding support
|
|
|
86
90
|
3. Run 'docker build -t awslabs/mysql-mcp-server:latest .'
|
|
87
91
|
|
|
88
92
|
### Add or update your LLM client's config with following:
|
|
89
|
-
|
|
93
|
+
|
|
94
|
+
```json
|
|
90
95
|
{
|
|
91
96
|
"mcpServers": {
|
|
92
97
|
"awslabs.mysql-mcp-server": {
|
|
@@ -108,7 +113,7 @@ Here are some ways you can work with MCP across AWS, and we'll be adding support
|
|
|
108
113
|
}
|
|
109
114
|
}
|
|
110
115
|
}
|
|
111
|
-
|
|
116
|
+
```
|
|
112
117
|
|
|
113
118
|
NOTE: By default, only read-only queries are allowed and it is controlled by --readonly parameter above. Set it to False if you also want to allow writable DML or DDL.
|
|
114
119
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
awslabs/__init__.py,sha256=WuqxdDgUZylWNmVoPKiK7qGsTB_G4UmuXIrJ-VBwDew,731
|
|
2
|
+
awslabs/mysql_mcp_server/__init__.py,sha256=d2Baps_eB9YMf1OJzYtW8RU48KuSOzZFlmB83qEYWR0,670
|
|
3
|
+
awslabs/mysql_mcp_server/mutable_sql_detector.py,sha256=0apKy3GK8WOxKZshj7vKTRcLdSIM7GA6Ee_8-dr41UQ,4224
|
|
4
|
+
awslabs/mysql_mcp_server/server.py,sha256=zNo-8J4d4VJmIfwDGkBZG0vD8pC19-HZf9HH-WD2qzU,12501
|
|
5
|
+
awslabs_mysql_mcp_server-1.0.2.dist-info/METADATA,sha256=_v3Wwz6x3ubvIg2-1gQN8SFdVxzxYO8Otij4V0IBRBE,6061
|
|
6
|
+
awslabs_mysql_mcp_server-1.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
+
awslabs_mysql_mcp_server-1.0.2.dist-info/entry_points.txt,sha256=dQAG1BpfKE6diUKtCqzxwvWfPxDWGIEa87YcEb0T4rc,82
|
|
8
|
+
awslabs_mysql_mcp_server-1.0.2.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
9
|
+
awslabs_mysql_mcp_server-1.0.2.dist-info/licenses/NOTICE,sha256=lpdr2_2JGgD-RqTEnqMJttKCZVvC88gX4rbk0m8UifU,92
|
|
10
|
+
awslabs_mysql_mcp_server-1.0.2.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
awslabs/__init__.py,sha256=47wJeKcStxEJwX7SVVV2pnAWYR8FxcaYoT3YTmZ5Plg,674
|
|
2
|
-
awslabs/mysql_mcp_server/__init__.py,sha256=_BajTXfPB4ubIrro0PBWJrVdwecctN3j2BaUo18DdL4,613
|
|
3
|
-
awslabs/mysql_mcp_server/mutable_sql_detector.py,sha256=iaZZz1_p2VRBkJPclcGMSUU51Vo70lDMK_o2fntvQ5w,4162
|
|
4
|
-
awslabs/mysql_mcp_server/server.py,sha256=ZXOlEihzW1UzzV6XyPdb99y2iQhgIncwzgd_doOfP9U,12444
|
|
5
|
-
awslabs_mysql_mcp_server-1.0.0.dist-info/METADATA,sha256=WfpTHiXutj2xUlvOMgBQqpykVcpVXDik4gwiO_ePqCo,4842
|
|
6
|
-
awslabs_mysql_mcp_server-1.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
7
|
-
awslabs_mysql_mcp_server-1.0.0.dist-info/entry_points.txt,sha256=dQAG1BpfKE6diUKtCqzxwvWfPxDWGIEa87YcEb0T4rc,82
|
|
8
|
-
awslabs_mysql_mcp_server-1.0.0.dist-info/licenses/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
|
|
9
|
-
awslabs_mysql_mcp_server-1.0.0.dist-info/licenses/NOTICE,sha256=lpdr2_2JGgD-RqTEnqMJttKCZVvC88gX4rbk0m8UifU,92
|
|
10
|
-
awslabs_mysql_mcp_server-1.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|