awslabs.mysql-mcp-server 0.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.
@@ -0,0 +1,559 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/linux,python,windows,macOS,VisualStudioCode
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=linux,python,windows,macOS,VisualStudioCode
3
+
4
+ ### Linux ###
5
+ *~
6
+
7
+ # temporary files which can be created if a process still has a handle open of a deleted file
8
+ .fuse_hidden*
9
+
10
+ # KDE directory preferences
11
+ .directory
12
+
13
+ # Linux trash folder which might appear on any partition or disk
14
+ .Trash-*
15
+
16
+ # .nfs files are created when an open file is removed but is still being accessed
17
+ .nfs*
18
+
19
+ ### macOS ###
20
+ # General
21
+ .DS_Store
22
+ .AppleDouble
23
+ .LSOverride
24
+
25
+ # Icon must end with two \r
26
+ Icon
27
+
28
+
29
+ # Thumbnails
30
+ ._*
31
+
32
+ # Files that might appear in the root of a volume
33
+ .DocumentRevisions-V100
34
+ .fseventsd
35
+ .Spotlight-V100
36
+ .TemporaryItems
37
+ .Trashes
38
+ .VolumeIcon.icns
39
+ .com.apple.timemachine.donotpresent
40
+
41
+ # Directories potentially created on remote AFP share
42
+ .AppleDB
43
+ .AppleDesktop
44
+ Network Trash Folder
45
+ Temporary Items
46
+ .apdisk
47
+
48
+ ### macOS Patch ###
49
+ # iCloud generated files
50
+ *.icloud
51
+
52
+ ### Python ###
53
+ # Byte-compiled / optimized / DLL files
54
+ __pycache__/
55
+ *.py[cod]
56
+ *$py.class
57
+
58
+ # C extensions
59
+ *.so
60
+
61
+ # Distribution / packaging
62
+ .Python
63
+ build/
64
+ develop-eggs/
65
+ dist/
66
+ downloads/
67
+ eggs/
68
+ .eggs/
69
+ lib/
70
+ lib64/
71
+ parts/
72
+ sdist/
73
+ var/
74
+ wheels/
75
+ share/python-wheels/
76
+ *.egg-info/
77
+ .installed.cfg
78
+ *.egg
79
+ MANIFEST
80
+
81
+ # PyInstaller
82
+ # Usually these files are written by a python script from a template
83
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
84
+ *.manifest
85
+ *.spec
86
+
87
+ # Installer logs
88
+ pip-log.txt
89
+ pip-delete-this-directory.txt
90
+
91
+ # Unit test / coverage reports
92
+ htmlcov/
93
+ .tox/
94
+ .nox/
95
+ .coverage
96
+ .coverage.*
97
+ .cache
98
+ nosetests.xml
99
+ coverage.xml
100
+ *.cover
101
+ *.py,cover
102
+ .hypothesis/
103
+ .pytest_cache/
104
+ cover/
105
+
106
+ # Translations
107
+ *.mo
108
+ *.pot
109
+
110
+ # Django stuff:
111
+ *.log
112
+ local_settings.py
113
+ db.sqlite3
114
+ db.sqlite3-journal
115
+
116
+ # Flask stuff:
117
+ instance/
118
+ .webassets-cache
119
+
120
+ # Scrapy stuff:
121
+ .scrapy
122
+
123
+ # Sphinx documentation
124
+ docs/_build/
125
+
126
+ # PyBuilder
127
+ .pybuilder/
128
+ target/
129
+
130
+ # Jupyter Notebook
131
+ .ipynb_checkpoints
132
+
133
+ # IPython
134
+ profile_default/
135
+ ipython_config.py
136
+
137
+ # pyenv
138
+ # For a library or package, you might want to ignore these files since the code is
139
+ # intended to run in multiple environments; otherwise, check them in:
140
+ # .python-version
141
+
142
+ # pipenv
143
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
144
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
145
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
146
+ # install all needed dependencies.
147
+ #Pipfile.lock
148
+
149
+ # poetry
150
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
151
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
152
+ # commonly ignored for libraries.
153
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
154
+ #poetry.lock
155
+
156
+ # pdm
157
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
158
+ #pdm.lock
159
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
160
+ # in version control.
161
+ # https://pdm.fming.dev/#use-with-ide
162
+ .pdm.toml
163
+
164
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
165
+ __pypackages__/
166
+
167
+ # Celery stuff
168
+ celerybeat-schedule
169
+ celerybeat.pid
170
+
171
+ # SageMath parsed files
172
+ *.sage.py
173
+
174
+ # Environments
175
+ .env
176
+ .venv
177
+ env/
178
+ venv/
179
+ ENV/
180
+ env.bak/
181
+ venv.bak/
182
+ .direnv/
183
+
184
+ # Spyder project settings
185
+ .spyderproject
186
+ .spyproject
187
+
188
+ # Rope project settings
189
+ .ropeproject
190
+
191
+ # mkdocs documentation
192
+ /site
193
+
194
+ # mypy
195
+ .mypy_cache/
196
+ .dmypy.json
197
+ dmypy.json
198
+
199
+ # Pyre type checker
200
+ .pyre/
201
+
202
+ # pytype static type analyzer
203
+ .pytype/
204
+
205
+ # Cython debug symbols
206
+ cython_debug/
207
+
208
+ # PyCharm
209
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
210
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
211
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
212
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
213
+ #.idea/
214
+
215
+ ### Python Patch ###
216
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
217
+ poetry.toml
218
+
219
+ # ruff
220
+ .ruff_cache/
221
+
222
+ # LSP config files
223
+ pyrightconfig.json
224
+
225
+ ### VisualStudioCode ###
226
+ .vscode/*
227
+ !.vscode/settings.json
228
+ !.vscode/tasks.json
229
+ !.vscode/launch.json
230
+ !.vscode/extensions.json
231
+ !.vscode/*.code-snippets
232
+
233
+ # Local History for Visual Studio Code
234
+ .history/
235
+
236
+ # Built Visual Studio Code Extensions
237
+ *.vsix
238
+
239
+ ### VisualStudioCode Patch ###
240
+ # Ignore all local history of files
241
+ .history
242
+ .ionide
243
+
244
+ ### Windows ###
245
+ # Windows thumbnail cache files
246
+ Thumbs.db
247
+ Thumbs.db:encryptable
248
+ ehthumbs.db
249
+ ehthumbs_vista.db
250
+
251
+ # Dump file
252
+ *.stackdump
253
+
254
+ # Folder config file
255
+ [Dd]esktop.ini
256
+
257
+ # Recycle Bin used on file shares
258
+ $RECYCLE.BIN/
259
+
260
+ # Windows Installer files
261
+ *.cab
262
+ *.msi
263
+ *.msix
264
+ *.msm
265
+ *.msp
266
+
267
+ # Windows shortcuts
268
+ *.lnk
269
+
270
+ # End of https://www.toptal.com/developers/gitignore/api/linux,python,windows,macOS,VisualStudioCode
271
+
272
+ # Created by https://www.toptal.com/developers/gitignore/api/jetbrains+all,pycharm+all,node
273
+ # Edit at https://www.toptal.com/developers/gitignore?templates=jetbrains+all,pycharm+all,node
274
+
275
+ ### JetBrains+all ###
276
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
277
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
278
+
279
+ # User-specific stuff
280
+ .idea/**/workspace.xml
281
+ .idea/**/tasks.xml
282
+ .idea/**/usage.statistics.xml
283
+ .idea/**/dictionaries
284
+ .idea/**/shelf
285
+
286
+ # AWS User-specific
287
+ .idea/**/aws.xml
288
+
289
+ # Generated files
290
+ .idea/**/contentModel.xml
291
+
292
+ # Sensitive or high-churn files
293
+ .idea/**/dataSources/
294
+ .idea/**/dataSources.ids
295
+ .idea/**/dataSources.local.xml
296
+ .idea/**/sqlDataSources.xml
297
+ .idea/**/dynamic.xml
298
+ .idea/**/uiDesigner.xml
299
+ .idea/**/dbnavigator.xml
300
+
301
+ # Gradle
302
+ .idea/**/gradle.xml
303
+ .idea/**/libraries
304
+
305
+ # Gradle and Maven with auto-import
306
+ # When using Gradle or Maven with auto-import, you should exclude module files,
307
+ # since they will be recreated, and may cause churn. Uncomment if using
308
+ # auto-import.
309
+ # .idea/artifacts
310
+ # .idea/compiler.xml
311
+ # .idea/jarRepositories.xml
312
+ # .idea/modules.xml
313
+ # .idea/*.iml
314
+ # .idea/modules
315
+ # *.iml
316
+ # *.ipr
317
+
318
+ # CMake
319
+ cmake-build-*/
320
+
321
+ # Mongo Explorer plugin
322
+ .idea/**/mongoSettings.xml
323
+
324
+ # File-based project format
325
+ *.iws
326
+
327
+ # IntelliJ
328
+ out/
329
+
330
+ # mpeltonen/sbt-idea plugin
331
+ .idea_modules/
332
+
333
+ # JIRA plugin
334
+ atlassian-ide-plugin.xml
335
+
336
+ # Cursive Clojure plugin
337
+ .idea/replstate.xml
338
+
339
+ # SonarLint plugin
340
+ .idea/sonarlint/
341
+
342
+ # Crashlytics plugin (for Android Studio and IntelliJ)
343
+ com_crashlytics_export_strings.xml
344
+ crashlytics.properties
345
+ crashlytics-build.properties
346
+ fabric.properties
347
+
348
+ # Editor-based Rest Client
349
+ .idea/httpRequests
350
+
351
+ # Android studio 3.1+ serialized cache file
352
+ .idea/caches/build_file_checksums.ser
353
+
354
+ ### JetBrains+all Patch ###
355
+ # Ignore everything but code style settings and run configurations
356
+ # that are supposed to be shared within teams.
357
+
358
+ .idea/*
359
+
360
+ !.idea/codeStyles
361
+ !.idea/runConfigurations
362
+
363
+ ### Node ###
364
+ # Logs
365
+ logs
366
+ *.log
367
+ npm-debug.log*
368
+ yarn-debug.log*
369
+ yarn-error.log*
370
+ lerna-debug.log*
371
+ .pnpm-debug.log*
372
+
373
+ # Diagnostic reports (https://nodejs.org/api/report.html)
374
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
375
+
376
+ # Runtime data
377
+ pids
378
+ *.pid
379
+ *.seed
380
+ *.pid.lock
381
+
382
+ # Directory for instrumented libs generated by jscoverage/JSCover
383
+ lib-cov
384
+
385
+ # Coverage directory used by tools like istanbul
386
+ coverage
387
+ *.lcov
388
+
389
+ # nyc test coverage
390
+ .nyc_output
391
+
392
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
393
+ .grunt
394
+
395
+ # Bower dependency directory (https://bower.io/)
396
+ bower_components
397
+
398
+ # node-waf configuration
399
+ .lock-wscript
400
+
401
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
402
+ build/Release
403
+
404
+ # Dependency directories
405
+ node_modules/
406
+ jspm_packages/
407
+
408
+ # Snowpack dependency directory (https://snowpack.dev/)
409
+ web_modules/
410
+
411
+ # TypeScript cache
412
+ *.tsbuildinfo
413
+
414
+ # Optional npm cache directory
415
+ .npm
416
+
417
+ # Optional eslint cache
418
+ .eslintcache
419
+
420
+ # Optional stylelint cache
421
+ .stylelintcache
422
+
423
+ # Microbundle cache
424
+ .rpt2_cache/
425
+ .rts2_cache_cjs/
426
+ .rts2_cache_es/
427
+ .rts2_cache_umd/
428
+
429
+ # Optional REPL history
430
+ .node_repl_history
431
+
432
+ # Output of 'npm pack'
433
+ *.tgz
434
+
435
+ # Yarn Integrity file
436
+ .yarn-integrity
437
+
438
+ # dotenv environment variable files
439
+ .env
440
+ .env.development.local
441
+ .env.test.local
442
+ .env.production.local
443
+ .env.local
444
+
445
+ # parcel-bundler cache (https://parceljs.org/)
446
+ .cache
447
+ .parcel-cache
448
+
449
+ # Next.js build output
450
+ .next
451
+ out
452
+
453
+ # Nuxt.js build / generate output
454
+ .nuxt
455
+ dist
456
+
457
+ # Gatsby files
458
+ .cache/
459
+ # Comment in the public line in if your project uses Gatsby and not Next.js
460
+ # https://nextjs.org/blog/next-9-1#public-directory-support
461
+ # public
462
+
463
+ # vuepress build output
464
+ .vuepress/dist
465
+
466
+ # vuepress v2.x temp and cache directory
467
+ .temp
468
+
469
+ # Docusaurus cache and generated files
470
+ .docusaurus
471
+
472
+ # Serverless directories
473
+ .serverless/
474
+
475
+ # FuseBox cache
476
+ .fusebox/
477
+
478
+ # DynamoDB Local files
479
+ .dynamodb/
480
+
481
+ # TernJS port file
482
+ .tern-port
483
+
484
+ # Stores VSCode versions used for testing VSCode extensions
485
+ .vscode-test
486
+
487
+ # yarn v2
488
+ .yarn/cache
489
+ .yarn/unplugged
490
+ .yarn/build-state.yml
491
+ .yarn/install-state.gz
492
+ .pnp.*
493
+
494
+ ### Node Patch ###
495
+ # Serverless Webpack directories
496
+ .webpack/
497
+
498
+ # Optional stylelint cache
499
+
500
+ # SvelteKit build / generate output
501
+ .svelte-kit
502
+
503
+ ### PyCharm+all ###
504
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
505
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
506
+
507
+ # User-specific stuff
508
+
509
+ # AWS User-specific
510
+
511
+ # Generated files
512
+
513
+ # Sensitive or high-churn files
514
+
515
+ # Gradle
516
+
517
+ # Gradle and Maven with auto-import
518
+ # When using Gradle or Maven with auto-import, you should exclude module files,
519
+ # since they will be recreated, and may cause churn. Uncomment if using
520
+ # auto-import.
521
+ # .idea/artifacts
522
+ # .idea/compiler.xml
523
+ # .idea/jarRepositories.xml
524
+ # .idea/modules.xml
525
+ # .idea/*.iml
526
+ # .idea/modules
527
+ # *.iml
528
+ # *.ipr
529
+
530
+ # CMake
531
+
532
+ # Mongo Explorer plugin
533
+
534
+ # File-based project format
535
+
536
+ # IntelliJ
537
+
538
+ # mpeltonen/sbt-idea plugin
539
+
540
+ # JIRA plugin
541
+
542
+ # Cursive Clojure plugin
543
+
544
+ # SonarLint plugin
545
+
546
+ # Crashlytics plugin (for Android Studio and IntelliJ)
547
+
548
+ # Editor-based Rest Client
549
+
550
+ # Android studio 3.1+ serialized cache file
551
+
552
+ ### PyCharm+all Patch ###
553
+ # Ignore everything but code style settings and run configurations
554
+ # that are supposed to be shared within teams.
555
+
556
+
557
+
558
+ # End of https://www.toptal.com/developers/gitignore/api/jetbrains+all,pycharm+all,node
559
+ samples/mcp-integration-with-nova-canvas/output/*
@@ -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,75 @@
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
+ #FROM public.ecr.aws/sam/build-python3.10:1.137.1-20250411084548
13
+ FROM public.ecr.aws/sam/build-python3.10@sha256:04cdbe84bec08d17d621192bc3f0a9e4a85a83f2ac99aa9241659dfac0d845ea AS uv
14
+
15
+ # Install the project into `/app`
16
+ WORKDIR /app
17
+
18
+ # Enable bytecode compilation
19
+ ENV UV_COMPILE_BYTECODE=1
20
+
21
+ # Copy from the cache instead of linking since it's a mounted volume
22
+ ENV UV_LINK_MODE=copy
23
+
24
+ # Prefer the system python
25
+ ENV UV_PYTHON_PREFERENCE=only-system
26
+
27
+ # Run without updating the uv.lock file like running with `--frozen`
28
+ ENV UV_FROZEN=true
29
+
30
+ # Copy the required files first
31
+ COPY pyproject.toml uv.lock ./
32
+
33
+ # Install the project's dependencies using the lockfile and settings
34
+ RUN --mount=type=cache,target=/root/.cache/uv \
35
+ pip install uv && \
36
+ uv sync --frozen --no-install-project --no-dev --no-editable
37
+
38
+ # Then, add the rest of the project source code and install it
39
+ # Installing separately from its dependencies allows optimal layer caching
40
+ COPY . /app
41
+ RUN --mount=type=cache,target=/root/.cache/uv \
42
+ uv sync --frozen --no-dev --no-editable
43
+
44
+ # Make the directory just in case it doesn't exist
45
+ RUN mkdir -p /root/.local
46
+
47
+ FROM public.ecr.aws/sam/build-python3.10@sha256:04cdbe84bec08d17d621192bc3f0a9e4a85a83f2ac99aa9241659dfac0d845ea
48
+
49
+ # Place executables in the environment at the front of the path and include other binaries
50
+ ENV PATH="/app/.venv/bin:$PATH:/usr/sbin"
51
+
52
+ # Install lsof for the healthcheck
53
+ # Install other tools as needed for the MCP server
54
+ # Add non-root user and ability to change directory into /root
55
+ RUN yum update -y && \
56
+ yum install -y lsof && \
57
+ yum clean all -y && \
58
+ rm -rf /var/cache/yum && \
59
+ groupadd --force --system app && \
60
+ useradd app -g app -d /app && \
61
+ chmod o+x /root
62
+
63
+ # Get the project from the uv layer
64
+ COPY --from=uv --chown=app:app /root/.local /root/.local
65
+ COPY --from=uv --chown=app:app /app/.venv /app/.venv
66
+
67
+ # Get healthcheck script
68
+ COPY ./docker-healthcheck.sh /usr/local/bin/docker-healthcheck.sh
69
+
70
+ # Run as non-root
71
+ USER app
72
+
73
+ # When running the container, add --db-path and a bind mount to the host's db file
74
+ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "docker-healthcheck.sh" ]
75
+ ENTRYPOINT ["awslabs.mysql-mcp-server"]