awslabs.sagemaker-ai-mcp-server 1.0.5__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.
- awslabs_sagemaker_ai_mcp_server-1.0.5/.gitignore +63 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/.python-version +1 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/CHANGELOG.md +12 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/LICENSE +175 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/NOTICE +2 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/PKG-INFO +380 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/README.md +347 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/__init__.py +17 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/README.md +143 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/__init__.py +20 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/aws_helper.py +148 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/consts.py +80 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/logging_helper.py +55 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/sagemaker_hyperpod/__init__.py +17 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/sagemaker_hyperpod/hyperpod_cluster_node_handler.py +1434 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/sagemaker_hyperpod/hyperpod_stack_handler.py +698 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/sagemaker_hyperpod/models.py +249 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/awslabs/sagemaker_ai_mcp_server/server.py +204 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/pyproject.toml +143 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/__init__.py +13 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/conftest.py +20 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/test_aws_helper.py +241 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/test_hyperpod_cluster_node_handler.py +1591 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/test_hyperpod_stack_handler.py +1263 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/test_init.py +55 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/test_logging_helper.py +92 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/test_main.py +240 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/test_models.py +744 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/tests/test_server.py +232 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/uv-requirements.txt +23 -0
- awslabs_sagemaker_ai_mcp_server-1.0.5/uv.lock +1594 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
share/python-wheels/
|
|
20
|
+
*.egg-info/
|
|
21
|
+
.installed.cfg
|
|
22
|
+
*.egg
|
|
23
|
+
MANIFEST
|
|
24
|
+
|
|
25
|
+
# Virtual environments
|
|
26
|
+
.venv
|
|
27
|
+
env/
|
|
28
|
+
venv/
|
|
29
|
+
ENV/
|
|
30
|
+
|
|
31
|
+
# IDE
|
|
32
|
+
.idea/
|
|
33
|
+
.vscode/
|
|
34
|
+
*.swp
|
|
35
|
+
*.swo
|
|
36
|
+
|
|
37
|
+
# Testing
|
|
38
|
+
.tox/
|
|
39
|
+
.coverage
|
|
40
|
+
.coverage.*
|
|
41
|
+
htmlcov/
|
|
42
|
+
.pytest_cache/
|
|
43
|
+
|
|
44
|
+
# Ruff
|
|
45
|
+
.ruff_cache/
|
|
46
|
+
|
|
47
|
+
# Build
|
|
48
|
+
*.manifest
|
|
49
|
+
*.spec
|
|
50
|
+
.pybuilder/
|
|
51
|
+
target/
|
|
52
|
+
build
|
|
53
|
+
|
|
54
|
+
# Environments
|
|
55
|
+
.env
|
|
56
|
+
.env.local
|
|
57
|
+
.env.*.local
|
|
58
|
+
|
|
59
|
+
# PyPI
|
|
60
|
+
.pypirc
|
|
61
|
+
|
|
62
|
+
# MCP param
|
|
63
|
+
*-params.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.10
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## Unreleased
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial project setup
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: awslabs.sagemaker-ai-mcp-server
|
|
3
|
+
Version: 1.0.5
|
|
4
|
+
Summary: MCP server for AWS SageMaker AI
|
|
5
|
+
Project-URL: homepage, https://awslabs.github.io/mcp/
|
|
6
|
+
Project-URL: docs, https://awslabs.github.io/mcp/servers/sagemaker-ai-mcp-server/
|
|
7
|
+
Project-URL: documentation, https://awslabs.github.io/mcp/servers/sagemaker-ai-mcp-server/
|
|
8
|
+
Project-URL: repository, https://github.com/awslabs/mcp.git
|
|
9
|
+
Project-URL: changelog, https://github.com/awslabs/mcp/blob/main/src/sagemaker-ai-mcp-server/CHANGELOG.md
|
|
10
|
+
Author: Amazon Web Services
|
|
11
|
+
Author-email: AWSLabs MCP <203918161+awslabs-mcp@users.noreply.github.com>, Yunlin Qi <qiyunlin@amazon.com>
|
|
12
|
+
License: Apache-2.0
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
License-File: NOTICE
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Requires-Dist: boto3>=1.34.0
|
|
25
|
+
Requires-Dist: cachetools>=5.3.0
|
|
26
|
+
Requires-Dist: loguru>=0.7.0
|
|
27
|
+
Requires-Dist: mcp[cli]>=1.23.0
|
|
28
|
+
Requires-Dist: pydantic>=2.10.6
|
|
29
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
30
|
+
Requires-Dist: requests-auth-aws-sigv4
|
|
31
|
+
Requires-Dist: requests>=2.31.0
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# Amazon SageMaker AI MCP Server
|
|
35
|
+
|
|
36
|
+
The Amazon SageMaker AI MCP server provides agents with tools to enable high-performance, low-cost AI/ML model development. Currently, this server includes tools for managing SageMaker HyperPod clusters.
|
|
37
|
+
|
|
38
|
+
## Available Features
|
|
39
|
+
|
|
40
|
+
### SageMaker HyperPod
|
|
41
|
+
|
|
42
|
+
Provides comprehensive tools for managing SageMaker HyperPod clusters orchestrated with Amazon EKS or Slurm, including cluster deployment, node management, and lifecycle operations. See the [HyperPod documentation](https://github.com/awslabs/mcp/blob/main/src/sagemaker-ai-mcp-server/awslabs/sagemaker_ai_mcp_server/README.md) for detailed information on the supported tools.
|
|
43
|
+
|
|
44
|
+
## Prerequisites
|
|
45
|
+
|
|
46
|
+
* [Install Python 3.10+](https://www.python.org/downloads/release/python-3100/)
|
|
47
|
+
* [Install the `uv` package manager](https://docs.astral.sh/uv/getting-started/installation/)
|
|
48
|
+
* [Install and configure the AWS CLI with credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
|
|
49
|
+
|
|
50
|
+
## Quickstart
|
|
51
|
+
|
|
52
|
+
This quickstart guide walks you through the steps to configure the Amazon SageMaker AI MCP Server for use with Kiro, Cursor, and other compatible IDEs.
|
|
53
|
+
|
|
54
|
+
| Kiro | Cursor | VS Code |
|
|
55
|
+
|:----:|:------:|:-------:|
|
|
56
|
+
| [](https://kiro.dev/launch/mcp/add?name=awslabs.sagemaker-ai-mcp-server&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.sagemaker-ai-mcp-server%40latest%22%2C%22--allow-write%22%2C%22--allow-sensitive-data-access%22%5D%2C%22env%22%3A%7B%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%7D) | [](https://cursor.com/en/install-mcp?name=awslabs.sagemaker-ai-mcp-server&config=eyJhdXRvQXBwcm92ZSI6W10sImRpc2FibGVkIjpmYWxzZSwiY29tbWFuZCI6InV2eCBhd3NsYWJzLnNhZ2VtYWtlci1haS1tY3Atc2VydmVyQGxhdGVzdCAtLWFsbG93LXdyaXRlIC0tYWxsb3ctc2Vuc2l0aXZlLWRhdGEtYWNjZXNzIiwiZW52Ijp7IkZBU1RNQ1BfTE9HX0xFVkVMIjoiRVJST1IifSwidHJhbnNwb3J0VHlwZSI6InN0ZGlvIn0%3D) | [](https://insiders.vscode.dev/redirect/mcp/install?name=SageMaker%20AI%20MCP%20Server&config=%7B%22autoApprove%22%3A%5B%5D%2C%22disabled%22%3Afalse%2C%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22awslabs.sagemaker-ai-mcp-server%40latest%22%2C%22--allow-write%22%2C%22--allow-sensitive-data-access%22%5D%2C%22env%22%3A%7B%22FASTMCP_LOG_LEVEL%22%3A%22ERROR%22%7D%2C%22transportType%22%3A%22stdio%22%7D) |
|
|
57
|
+
|
|
58
|
+
**Set up Kiro**
|
|
59
|
+
|
|
60
|
+
See the [Kiro IDE documentation](https://kiro.dev/docs/mcp/configuration/) or the [Kiro CLI documentation](https://kiro.dev/docs/cli/mcp/configuration/) for details.
|
|
61
|
+
|
|
62
|
+
For global configuration, edit ~/.kiro/settings/mcp.json. For project-specific configuration, edit .kiro/settings/mcp.json in your project directory.
|
|
63
|
+
|
|
64
|
+
The example below includes both the `--allow-write` flag for mutating operations and the `--allow-sensitive-data-access` flag for accessing logs and events:
|
|
65
|
+
|
|
66
|
+
**For Mac/Linux:**
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"awslabs.sagemaker-ai-mcp-server": {
|
|
72
|
+
"command": "uvx",
|
|
73
|
+
"args": [
|
|
74
|
+
"awslabs.sagemaker-ai-mcp-server@latest",
|
|
75
|
+
"--allow-write",
|
|
76
|
+
"--allow-sensitive-data-access"
|
|
77
|
+
],
|
|
78
|
+
"env": {
|
|
79
|
+
"FASTMCP_LOG_LEVEL": "ERROR"
|
|
80
|
+
},
|
|
81
|
+
"autoApprove": [],
|
|
82
|
+
"disabled": false
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**For Windows:**
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
{
|
|
92
|
+
"mcpServers": {
|
|
93
|
+
"awslabs.sagemaker-ai-mcp-server": {
|
|
94
|
+
"command": "uvx",
|
|
95
|
+
"args": [
|
|
96
|
+
"--from",
|
|
97
|
+
"awslabs.sagemaker-ai-mcp-server@latest",
|
|
98
|
+
"awslabs.sagemaker-ai-mcp-server.exe",
|
|
99
|
+
"--allow-write",
|
|
100
|
+
"--allow-sensitive-data-access"
|
|
101
|
+
],
|
|
102
|
+
"env": {
|
|
103
|
+
"FASTMCP_LOG_LEVEL": "ERROR"
|
|
104
|
+
},
|
|
105
|
+
"autoApprove": [],
|
|
106
|
+
"disabled": false
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Verify your setup by running the `/tools` command in the Kiro CLI to see the available SageMaker AI MCP tools.
|
|
113
|
+
|
|
114
|
+
Note that this is a basic quickstart. We recommend to use SageMaker AI MCP server in conjunction with [AWS API MCP Server](https://awslabs.github.io/mcp/servers/aws-api-mcp-server), [AWS Knowledge MCP Server](https://awslabs.github.io/mcp/servers/aws-knowledge-mcp-server)/[AWS Documentation MCP Server](https://awslabs.github.io/mcp/servers/aws-documentation-mcp-server), and [AWS EKS MCP Server](https://awslabs.github.io/mcp/servers/eks-mcp-server) to gain complete coverage for all SageMaker APIs and effectively troubleshoot common issues.
|
|
115
|
+
|
|
116
|
+
## Configurations
|
|
117
|
+
|
|
118
|
+
### Arguments
|
|
119
|
+
|
|
120
|
+
The `args` field in the MCP server definition specifies the command-line arguments passed to the server when it starts. These arguments control how the server is executed and configured. For example:
|
|
121
|
+
|
|
122
|
+
**For Mac/Linux:**
|
|
123
|
+
```
|
|
124
|
+
{
|
|
125
|
+
"mcpServers": {
|
|
126
|
+
"awslabs.sagemaker-ai-mcp-server": {
|
|
127
|
+
"command": "uvx",
|
|
128
|
+
"args": [
|
|
129
|
+
"awslabs.sagemaker-ai-mcp-server@latest",
|
|
130
|
+
"--allow-write",
|
|
131
|
+
"--allow-sensitive-data-access"
|
|
132
|
+
],
|
|
133
|
+
"env": {
|
|
134
|
+
"AWS_PROFILE": "your-profile",
|
|
135
|
+
"AWS_REGION": "us-east-1"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**For Windows:**
|
|
143
|
+
```
|
|
144
|
+
{
|
|
145
|
+
"mcpServers": {
|
|
146
|
+
"awslabs.sagemaker-ai-mcp-server": {
|
|
147
|
+
"command": "uvx",
|
|
148
|
+
"args": [
|
|
149
|
+
"--from",
|
|
150
|
+
"awslabs.sagemaker-ai-mcp-server@latest",
|
|
151
|
+
"awslabs.sagemaker-ai-mcp-server.exe",
|
|
152
|
+
"--allow-write",
|
|
153
|
+
"--allow-sensitive-data-access"
|
|
154
|
+
],
|
|
155
|
+
"env": {
|
|
156
|
+
"AWS_PROFILE": "your-profile",
|
|
157
|
+
"AWS_REGION": "us-east-1"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
#### Command Format
|
|
165
|
+
|
|
166
|
+
The command format differs between operating systems:
|
|
167
|
+
|
|
168
|
+
**For Mac/Linux:**
|
|
169
|
+
* `awslabs.sagemaker-ai-mcp-server@latest` - Specifies the latest package/version specifier for the MCP client config.
|
|
170
|
+
|
|
171
|
+
**For Windows:**
|
|
172
|
+
* `--from awslabs.sagemaker-ai-mcp-server@latest awslabs.sagemaker-ai-mcp-server.exe` - Windows requires the `--from` flag to specify the package and the `.exe` extension.
|
|
173
|
+
|
|
174
|
+
#### `--allow-write` (optional)
|
|
175
|
+
|
|
176
|
+
Enables write access mode, which allows mutating operations (e.g., create, update, delete resources).
|
|
177
|
+
|
|
178
|
+
* Default: true (The server runs in write mode by default)
|
|
179
|
+
* Example: remove `--allow-write` from the `args` list in your MCP server definition to switch to readonly mode.
|
|
180
|
+
|
|
181
|
+
#### `--allow-sensitive-data-access` (optional)
|
|
182
|
+
|
|
183
|
+
Enables access to sensitive data such as logs, events, and resource details. This flag is required for tools that access potentially sensitive information.
|
|
184
|
+
|
|
185
|
+
* Default: true (Access to sensitive data is allowed by default)
|
|
186
|
+
* Example: remove `--allow-sensitive-data-access` from the `args` list in your MCP server definition to disable it.
|
|
187
|
+
|
|
188
|
+
### Environment variables
|
|
189
|
+
|
|
190
|
+
The `env` field in the MCP server definition allows you to configure environment variables that control the behavior of the SageMaker AI MCP server. For example:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
{
|
|
194
|
+
"mcpServers": {
|
|
195
|
+
"awslabs.sagemaker-ai-mcp-server": {
|
|
196
|
+
"env": {
|
|
197
|
+
"FASTMCP_LOG_LEVEL": "ERROR",
|
|
198
|
+
"AWS_PROFILE": "my-profile",
|
|
199
|
+
"AWS_REGION": "us-west-2"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
#### `FASTMCP_LOG_LEVEL` (optional)
|
|
207
|
+
|
|
208
|
+
Sets the logging level verbosity for the server.
|
|
209
|
+
|
|
210
|
+
* Valid values: "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
|
|
211
|
+
* Default: "WARNING"
|
|
212
|
+
* Example: `"FASTMCP_LOG_LEVEL": "ERROR"`
|
|
213
|
+
|
|
214
|
+
#### `AWS_PROFILE` (optional)
|
|
215
|
+
|
|
216
|
+
Specifies the AWS profile to use for authentication.
|
|
217
|
+
|
|
218
|
+
* Default: None (If not set, uses default AWS credentials).
|
|
219
|
+
* Example: `"AWS_PROFILE": "my-profile"`
|
|
220
|
+
|
|
221
|
+
#### `AWS_REGION` (optional)
|
|
222
|
+
|
|
223
|
+
Specifies the AWS region where SageMaker resources are managed, which will be used for all AWS service operations.
|
|
224
|
+
|
|
225
|
+
* Default: None (If not set, uses default AWS region).
|
|
226
|
+
* Example: `"AWS_REGION": "us-west-2"`
|
|
227
|
+
|
|
228
|
+
## Security & Permissions
|
|
229
|
+
|
|
230
|
+
### Features
|
|
231
|
+
|
|
232
|
+
The SageMaker AI MCP Server implements the following security features:
|
|
233
|
+
|
|
234
|
+
1. **AWS Authentication**: Uses AWS credentials from the environment for secure authentication.
|
|
235
|
+
2. **SSL Verification**: Enforces SSL verification for all AWS API calls.
|
|
236
|
+
3. **Resource Tagging**: Tags all created resources for traceability.
|
|
237
|
+
4. **Least Privilege**: Uses IAM roles with appropriate permissions.
|
|
238
|
+
5. **Stack Protection**: Ensures CloudFormation stacks for HyperPod can only be modified by the tool that created them.
|
|
239
|
+
|
|
240
|
+
### Considerations
|
|
241
|
+
|
|
242
|
+
When using the SageMaker AI MCP Server, consider the following:
|
|
243
|
+
|
|
244
|
+
* **AWS Credentials**: The server needs permission to create and manage SageMaker AI resources.
|
|
245
|
+
* **Network Security**: Configure VPC and security groups properly for SageMaker AI resources.
|
|
246
|
+
* **Authentication**: Use appropriate authentication mechanisms for AWS resources.
|
|
247
|
+
* **Authorization**: Configure IAM properly for AWS resources.
|
|
248
|
+
* **Data Protection**: Encrypt sensitive data in SageMaker AI resources.
|
|
249
|
+
* **Logging and Monitoring**: Enable logging and monitoring for SageMaker AI resources.
|
|
250
|
+
|
|
251
|
+
### Permissions
|
|
252
|
+
|
|
253
|
+
The SageMaker AI MCP Server can be used for production environments with proper security controls in place. The server runs in read-only mode by default, which is recommended and considered generally safer for production environments. Only explicitly enable write access when necessary. Below are the HyperPod MCP tools available in read-only versus write-access mode:
|
|
254
|
+
|
|
255
|
+
* **Read-only mode (default)**: `manage_hyperpod_stacks` (with operation="describe"), `manage_hyperpod_cluster_nodes` (with operations="list_clusters", "list_nodes", "describe_node").
|
|
256
|
+
* **Write-access mode**: (require `--allow-write`): `manage_hyperpod_stacks` (with "deploy", "delete"), `manage_hyperpod_cluster_nodes` (with operations="update_software", "batch_delete").
|
|
257
|
+
|
|
258
|
+
#### `autoApprove` (optional)
|
|
259
|
+
|
|
260
|
+
An array within the MCP server definition that lists tool names to be automatically approved by the MCP Server client, bypassing user confirmation for those specific tools. For example:
|
|
261
|
+
|
|
262
|
+
**For Mac/Linux:**
|
|
263
|
+
```
|
|
264
|
+
{
|
|
265
|
+
"mcpServers": {
|
|
266
|
+
"awslabs.sagemaker-ai-mcp-server": {
|
|
267
|
+
"command": "uvx",
|
|
268
|
+
"args": [
|
|
269
|
+
"awslabs.sagemaker-ai-mcp-server@latest"
|
|
270
|
+
],
|
|
271
|
+
"env": {
|
|
272
|
+
"AWS_PROFILE": "sagemaker-ai-mcp-readonly-profile",
|
|
273
|
+
"AWS_REGION": "us-east-1",
|
|
274
|
+
"FASTMCP_LOG_LEVEL": "INFO"
|
|
275
|
+
},
|
|
276
|
+
"autoApprove": [
|
|
277
|
+
"manage_hyperpod_stacks",
|
|
278
|
+
"manage_hyperpod_cluster_nodes"
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**For Windows:**
|
|
286
|
+
```
|
|
287
|
+
{
|
|
288
|
+
"mcpServers": {
|
|
289
|
+
"awslabs.sagemaker-ai-mcp-server": {
|
|
290
|
+
"command": "uvx",
|
|
291
|
+
"args": [
|
|
292
|
+
"--from",
|
|
293
|
+
"awslabs.sagemaker-ai-mcp-server@latest",
|
|
294
|
+
"awslabs.sagemaker-ai-mcp-server.exe"
|
|
295
|
+
],
|
|
296
|
+
"env": {
|
|
297
|
+
"AWS_PROFILE": "sagemaker-ai-mcp-readonly-profile",
|
|
298
|
+
"AWS_REGION": "us-east-1",
|
|
299
|
+
"FASTMCP_LOG_LEVEL": "INFO"
|
|
300
|
+
},
|
|
301
|
+
"autoApprove": [
|
|
302
|
+
"manage_hyperpod_stacks",
|
|
303
|
+
"manage_hyperpod_cluster_nodes"
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Role Scoping Recommendations
|
|
311
|
+
|
|
312
|
+
In accordance with security best practices, we recommend the following:
|
|
313
|
+
|
|
314
|
+
1. **Create dedicated IAM roles** to be used by the SageMaker AI MCP Server with the principle of "least privilege."
|
|
315
|
+
2. **Use separate roles** for read-only and write operations.
|
|
316
|
+
3. **Implement resource tagging** to limit actions to resources created by the server.
|
|
317
|
+
4. **Enable AWS CloudTrail** to audit all API calls made by the server.
|
|
318
|
+
5. **Regularly review** the permissions granted to the server's IAM role.
|
|
319
|
+
6. **Use IAM Access Analyzer** to identify unused permissions that can be removed.
|
|
320
|
+
|
|
321
|
+
### Sensitive Information Handling
|
|
322
|
+
|
|
323
|
+
**IMPORTANT**: Do not pass secrets or sensitive information via allowed input mechanisms:
|
|
324
|
+
|
|
325
|
+
* Do not include secrets or credentials in CloudFormation templates.
|
|
326
|
+
* Do not pass sensitive information directly in the prompt to the model.
|
|
327
|
+
* Avoid using MCP tools for creating secrets, as this would require providing the secret data to the model.
|
|
328
|
+
|
|
329
|
+
**CloudFormation Template Security**:
|
|
330
|
+
|
|
331
|
+
* Only use CloudFormation templates from trustworthy sources.
|
|
332
|
+
* The server relies on CloudFormation API validation for template content and does not perform its own validation.
|
|
333
|
+
* Audit CloudFormation templates before applying them to your cluster.
|
|
334
|
+
|
|
335
|
+
**Instead of passing secrets through MCP**:
|
|
336
|
+
|
|
337
|
+
* Use AWS Secrets Manager or Parameter Store to store sensitive information.
|
|
338
|
+
* Configure proper IAM roles for service accounts.
|
|
339
|
+
* Use IAM roles for service accounts (IRSA) for AWS service access.
|
|
340
|
+
|
|
341
|
+
### File System Access and Operating Mode
|
|
342
|
+
|
|
343
|
+
**Important**: This MCP server is intended for **STDIO mode only** as a local server using a single user's credentials. The server runs with the same permissions as the user who started it and has complete access to the file system.
|
|
344
|
+
|
|
345
|
+
#### Security and Access Considerations
|
|
346
|
+
|
|
347
|
+
- **Full File System Access**: The server can read from and write to any location on the file system where the user has permissions
|
|
348
|
+
- **Host File System Sharing**: When using this server, the host file system is directly accessible
|
|
349
|
+
- **Do Not Modify for Network Use**: This server is designed for local STDIO use only; network operation introduces additional security risks
|
|
350
|
+
|
|
351
|
+
#### Common File Operations
|
|
352
|
+
|
|
353
|
+
The MCP server can create a templated params json file to a user-specified absolute file path during hyperpod cluster creation.
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
## General Best Practices
|
|
357
|
+
|
|
358
|
+
* **Resource Naming**: Use descriptive names for SageMaker AI resources.
|
|
359
|
+
* **Error Handling**: Check for errors in tool responses and handle them appropriately.
|
|
360
|
+
* **Resource Cleanup**: Delete unused resources to avoid unnecessary costs.
|
|
361
|
+
* **Monitoring**: Monitor resource status regularly.
|
|
362
|
+
* **Security**: Follow AWS security best practices for SageMaker AI resources.
|
|
363
|
+
* **Backup**: Regularly backup important SageMaker AI resources.
|
|
364
|
+
|
|
365
|
+
## General Troubleshooting
|
|
366
|
+
|
|
367
|
+
* **Permission Errors**: Verify that your AWS credentials have the necessary permissions.
|
|
368
|
+
* **CloudFormation Errors**: Check the CloudFormation console for stack creation errors.
|
|
369
|
+
* **SageMaker API Errors**: Verify that the HyperPod cluster is running and accessible.
|
|
370
|
+
* **Network Issues**: Check VPC and security group configurations.
|
|
371
|
+
* **Client Errors**: Verify that the MCP client is configured correctly.
|
|
372
|
+
* **Log Level**: Increase the log level to DEBUG for more detailed logs.
|
|
373
|
+
|
|
374
|
+
For service-specific issues, consult the relevant service documentation:
|
|
375
|
+
- [HyperPod Documentation](https://github.com/awslabs/mcp/blob/main/src/sagemaker-ai-mcp-server/awslabs/sagemaker_ai_mcp_server/README.md)
|
|
376
|
+
- [Amazon SageMaker AI Documentation](https://docs.aws.amazon.com/sagemaker/)
|
|
377
|
+
|
|
378
|
+
## Version
|
|
379
|
+
|
|
380
|
+
Current MCP server version: 1.0.0
|