gms-mcp 0.1.17__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.
Files changed (122) hide show
  1. gms_mcp-0.1.17/.github/workflows/ci.yml +48 -0
  2. gms_mcp-0.1.17/.github/workflows/publish.yml +123 -0
  3. gms_mcp-0.1.17/.gitignore +20 -0
  4. gms_mcp-0.1.17/CHANGELOG.md +32 -0
  5. gms_mcp-0.1.17/LICENSE +22 -0
  6. gms_mcp-0.1.17/PKG-INFO +162 -0
  7. gms_mcp-0.1.17/README.md +136 -0
  8. gms_mcp-0.1.17/RELEASING.md +52 -0
  9. gms_mcp-0.1.17/cli/__init__.py +1 -0
  10. gms_mcp-0.1.17/cli/agent_setup.py +32 -0
  11. gms_mcp-0.1.17/cli/docs/CLI_HELPER_TOOLS.md +951 -0
  12. gms_mcp-0.1.17/cli/docs/README.md +246 -0
  13. gms_mcp-0.1.17/cli/docs/TEST_SUITE_GUIDE.md +237 -0
  14. gms_mcp-0.1.17/cli/gms +14 -0
  15. gms_mcp-0.1.17/cli/gms.bat +16 -0
  16. gms_mcp-0.1.17/cli/install.py +30 -0
  17. gms_mcp-0.1.17/cli/reports/CLI_CRITICAL_FIXES_REPORT.md +188 -0
  18. gms_mcp-0.1.17/cli/reports/CLI_DIRECTORY_VALIDATION_IMPLEMENTATION.md +188 -0
  19. gms_mcp-0.1.17/cli/reports/CLI_TOOL_IMPROVEMENTS_REPORT.md +241 -0
  20. gms_mcp-0.1.17/cli/reports/CONSTRUCTOR_VALIDATION_IMPLEMENTATION_SUMMARY.md +153 -0
  21. gms_mcp-0.1.17/cli/test_config.py +79 -0
  22. gms_mcp-0.1.17/cli/tests/python/commands/__init__.py +8 -0
  23. gms_mcp-0.1.17/cli/tests/python/commands/asset_commands.py +50 -0
  24. gms_mcp-0.1.17/cli/tests/python/commands/event_commands.py +38 -0
  25. gms_mcp-0.1.17/cli/tests/python/commands/maintenance_commands.py +68 -0
  26. gms_mcp-0.1.17/cli/tests/python/commands/room_commands.py +81 -0
  27. gms_mcp-0.1.17/cli/tests/python/commands/runner_commands.py +33 -0
  28. gms_mcp-0.1.17/cli/tests/python/commands/workflow_commands.py +32 -0
  29. gms_mcp-0.1.17/cli/tests/python/conftest.py +20 -0
  30. gms_mcp-0.1.17/cli/tests/python/debug_validate_json.py +1 -0
  31. gms_mcp-0.1.17/cli/tests/python/run_all_tests.py +182 -0
  32. gms_mcp-0.1.17/cli/tests/python/test_agent_setup.py +277 -0
  33. gms_mcp-0.1.17/cli/tests/python/test_all_phases.py +465 -0
  34. gms_mcp-0.1.17/cli/tests/python/test_asset_helper.py +627 -0
  35. gms_mcp-0.1.17/cli/tests/python/test_assets_comprehensive.py +1046 -0
  36. gms_mcp-0.1.17/cli/tests/python/test_auto_maintenance_comprehensive.py +1543 -0
  37. gms_mcp-0.1.17/cli/tests/python/test_command_modules_comprehensive.py +1003 -0
  38. gms_mcp-0.1.17/cli/tests/python/test_config.py +16 -0
  39. gms_mcp-0.1.17/cli/tests/python/test_directory_validation_fixed.py +290 -0
  40. gms_mcp-0.1.17/cli/tests/python/test_event_helper.py +173 -0
  41. gms_mcp-0.1.17/cli/tests/python/test_event_validation.py +348 -0
  42. gms_mcp-0.1.17/cli/tests/python/test_final_verification.py +85 -0
  43. gms_mcp-0.1.17/cli/tests/python/test_install_polish.py +58 -0
  44. gms_mcp-0.1.17/cli/tests/python/test_introspection.py +484 -0
  45. gms_mcp-0.1.17/cli/tests/python/test_maintenance_purge.py +96 -0
  46. gms_mcp-0.1.17/cli/tests/python/test_master_cli.py +150 -0
  47. gms_mcp-0.1.17/cli/tests/python/test_mcp_direct.py +103 -0
  48. gms_mcp-0.1.17/cli/tests/python/test_room_instance_helper.py +908 -0
  49. gms_mcp-0.1.17/cli/tests/python/test_room_layer_helper.py +658 -0
  50. gms_mcp-0.1.17/cli/tests/python/test_room_operations.py +504 -0
  51. gms_mcp-0.1.17/cli/tests/python/test_update_notifier.py +115 -0
  52. gms_mcp-0.1.17/cli/tests/python/test_utils_comprehensive.py +991 -0
  53. gms_mcp-0.1.17/cli/tests/python/test_workflow.py +74 -0
  54. gms_mcp-0.1.17/cli/tests/python/test_workflow_enhanced.py +550 -0
  55. gms_mcp-0.1.17/cli/update_test_imports.py +196 -0
  56. gms_mcp-0.1.17/pyproject.toml +69 -0
  57. gms_mcp-0.1.17/scripts/ci_version.py +148 -0
  58. gms_mcp-0.1.17/scripts/first_pypi_upload.ps1 +34 -0
  59. gms_mcp-0.1.17/scripts/first_pypi_upload.sh +22 -0
  60. gms_mcp-0.1.17/setup.cfg +4 -0
  61. gms_mcp-0.1.17/src/gms_helpers/__init__.py +2 -0
  62. gms_mcp-0.1.17/src/gms_helpers/__main__.py +7 -0
  63. gms_mcp-0.1.17/src/gms_helpers/agent_setup.py +164 -0
  64. gms_mcp-0.1.17/src/gms_helpers/asset_helper.py +1961 -0
  65. gms_mcp-0.1.17/src/gms_helpers/assets.py +1223 -0
  66. gms_mcp-0.1.17/src/gms_helpers/auto_maintenance.py +615 -0
  67. gms_mcp-0.1.17/src/gms_helpers/base_asset.py +91 -0
  68. gms_mcp-0.1.17/src/gms_helpers/cli.py +8 -0
  69. gms_mcp-0.1.17/src/gms_helpers/commands/__init__.py +1 -0
  70. gms_mcp-0.1.17/src/gms_helpers/commands/asset_commands.py +41 -0
  71. gms_mcp-0.1.17/src/gms_helpers/commands/event_commands.py +29 -0
  72. gms_mcp-0.1.17/src/gms_helpers/commands/maintenance_commands.py +58 -0
  73. gms_mcp-0.1.17/src/gms_helpers/commands/room_commands.py +71 -0
  74. gms_mcp-0.1.17/src/gms_helpers/commands/runner_commands.py +107 -0
  75. gms_mcp-0.1.17/src/gms_helpers/commands/workflow_commands.py +25 -0
  76. gms_mcp-0.1.17/src/gms_helpers/config.py +35 -0
  77. gms_mcp-0.1.17/src/gms_helpers/event_helper.py +748 -0
  78. gms_mcp-0.1.17/src/gms_helpers/gms.py +649 -0
  79. gms_mcp-0.1.17/src/gms_helpers/install.py +148 -0
  80. gms_mcp-0.1.17/src/gms_helpers/introspection.py +660 -0
  81. gms_mcp-0.1.17/src/gms_helpers/maintenance/__init__.py +33 -0
  82. gms_mcp-0.1.17/src/gms_helpers/maintenance/audit/__init__.py +19 -0
  83. gms_mcp-0.1.17/src/gms_helpers/maintenance/audit/reference_collector.py +468 -0
  84. gms_mcp-0.1.17/src/gms_helpers/maintenance/clean_unused_assets.py +186 -0
  85. gms_mcp-0.1.17/src/gms_helpers/maintenance/event_sync.py +452 -0
  86. gms_mcp-0.1.17/src/gms_helpers/maintenance/lint.py +268 -0
  87. gms_mcp-0.1.17/src/gms_helpers/maintenance/orphan_cleanup.py +273 -0
  88. gms_mcp-0.1.17/src/gms_helpers/maintenance/orphans.py +198 -0
  89. gms_mcp-0.1.17/src/gms_helpers/maintenance/path_utils.py +108 -0
  90. gms_mcp-0.1.17/src/gms_helpers/maintenance/prune.py +173 -0
  91. gms_mcp-0.1.17/src/gms_helpers/maintenance/static_search.py +202 -0
  92. gms_mcp-0.1.17/src/gms_helpers/maintenance/tidy_json.py +93 -0
  93. gms_mcp-0.1.17/src/gms_helpers/maintenance/trash/__init__.py +79 -0
  94. gms_mcp-0.1.17/src/gms_helpers/maintenance/validate_paths.py +304 -0
  95. gms_mcp-0.1.17/src/gms_helpers/reference_scanner.py +472 -0
  96. gms_mcp-0.1.17/src/gms_helpers/room_helper.py +209 -0
  97. gms_mcp-0.1.17/src/gms_helpers/room_instance_helper.py +388 -0
  98. gms_mcp-0.1.17/src/gms_helpers/room_layer_helper.py +315 -0
  99. gms_mcp-0.1.17/src/gms_helpers/runner.py +564 -0
  100. gms_mcp-0.1.17/src/gms_helpers/templates/ui_gameover_killed_by/label.create.gml +13 -0
  101. gms_mcp-0.1.17/src/gms_helpers/templates/ui_gameover_killed_by/name.create.gml +8 -0
  102. gms_mcp-0.1.17/src/gms_helpers/templates/ui_gameover_killed_by/sprite.create.gml +5 -0
  103. gms_mcp-0.1.17/src/gms_helpers/test_invalid.json +1 -0
  104. gms_mcp-0.1.17/src/gms_helpers/utils.py +750 -0
  105. gms_mcp-0.1.17/src/gms_helpers/workflow.py +401 -0
  106. gms_mcp-0.1.17/src/gms_mcp/POST_MORTEM_STDIO_DEADLOCKS.md +42 -0
  107. gms_mcp-0.1.17/src/gms_mcp/README.md +84 -0
  108. gms_mcp-0.1.17/src/gms_mcp/__init__.py +5 -0
  109. gms_mcp-0.1.17/src/gms_mcp/__main__.py +7 -0
  110. gms_mcp-0.1.17/src/gms_mcp/bootstrap_server.py +130 -0
  111. gms_mcp-0.1.17/src/gms_mcp/cli.py +14 -0
  112. gms_mcp-0.1.17/src/gms_mcp/gamemaker_mcp_server.py +3260 -0
  113. gms_mcp-0.1.17/src/gms_mcp/install.py +399 -0
  114. gms_mcp-0.1.17/src/gms_mcp/requirements.txt +3 -0
  115. gms_mcp-0.1.17/src/gms_mcp/update_notifier.py +87 -0
  116. gms_mcp-0.1.17/src/gms_mcp.egg-info/PKG-INFO +162 -0
  117. gms_mcp-0.1.17/src/gms_mcp.egg-info/SOURCES.txt +120 -0
  118. gms_mcp-0.1.17/src/gms_mcp.egg-info/dependency_links.txt +1 -0
  119. gms_mcp-0.1.17/src/gms_mcp.egg-info/entry_points.txt +4 -0
  120. gms_mcp-0.1.17/src/gms_mcp.egg-info/requires.txt +5 -0
  121. gms_mcp-0.1.17/src/gms_mcp.egg-info/top_level.txt +2 -0
  122. gms_mcp-0.1.17/test_project.yyp +1 -0
@@ -0,0 +1,48 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - "main"
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ concurrency:
12
+ group: ci-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ test:
17
+ name: test
18
+ runs-on: ${{ matrix.os }}
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ os: [ubuntu-latest, windows-latest]
23
+ python-version: ["3.11", "3.12", "3.13"]
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v5
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ cache: pip
32
+ cache-dependency-path: pyproject.toml
33
+
34
+ - name: Install dependencies
35
+ run: |
36
+ python -m pip install --upgrade pip
37
+ python -m pip install -e ".[dev]"
38
+ python -m pip install -U build
39
+
40
+ - name: Build package
41
+ run: python -m build
42
+
43
+ - name: Run test suite
44
+ run: python cli/tests/python/run_all_tests.py
45
+
46
+ - name: Run final verification
47
+ run: python -m pytest cli/tests/python/test_final_verification.py
48
+
@@ -0,0 +1,123 @@
1
+ name: Publish to PyPI
2
+
3
+ concurrency:
4
+ group: pypi-publish
5
+ cancel-in-progress: false
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ on:
11
+ push:
12
+ branches:
13
+ - "main"
14
+ tags:
15
+ - "v*"
16
+ workflow_dispatch:
17
+ inputs:
18
+ version:
19
+ description: "Publish a packaging-only post-release (example: 0.1.0.post1)"
20
+ required: false
21
+ type: string
22
+
23
+ jobs:
24
+ compute:
25
+ runs-on: ubuntu-latest
26
+ outputs:
27
+ version: ${{ steps.ver.outputs.version }}
28
+ should_publish: ${{ steps.ver.outputs.should_publish }}
29
+ reason: ${{ steps.ver.outputs.reason }}
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ with:
33
+ fetch-depth: 0
34
+ - uses: actions/setup-python@v5
35
+ with:
36
+ python-version: "3.12"
37
+ - name: Install version tooling
38
+ run: python -m pip install -U packaging
39
+ - name: Compute version
40
+ id: ver
41
+ env:
42
+ VERSION_OVERRIDE: ${{ inputs.version }}
43
+ run: python scripts/ci_version.py
44
+ - name: Summary
45
+ run: |
46
+ echo "version=${{ steps.ver.outputs.version }}"
47
+ echo "should_publish=${{ steps.ver.outputs.should_publish }}"
48
+ echo "reason=${{ steps.ver.outputs.reason }}"
49
+
50
+ test:
51
+ name: Test (${{ matrix.os }}, Py${{ matrix.python-version }})
52
+ runs-on: ${{ matrix.os }}
53
+ strategy:
54
+ fail-fast: false
55
+ matrix:
56
+ os: [ubuntu-latest, windows-latest]
57
+ python-version: ["3.11", "3.12", "3.13"]
58
+ steps:
59
+ - uses: actions/checkout@v4
60
+ - name: Set up Python ${{ matrix.python-version }}
61
+ uses: actions/setup-python@v5
62
+ with:
63
+ python-version: ${{ matrix.python-version }}
64
+ - name: Install dependencies
65
+ run: |
66
+ python -m pip install --upgrade pip
67
+ python -m pip install pytest
68
+ pip install -e .
69
+ - name: Run all tests
70
+ run: python cli/tests/python/run_all_tests.py
71
+ - name: Run final verification
72
+ run: python -m pytest cli/tests/python/test_final_verification.py
73
+
74
+ build:
75
+ needs: [compute, test]
76
+ if: needs.compute.outputs.should_publish == 'true'
77
+ runs-on: ubuntu-latest
78
+ steps:
79
+ - uses: actions/checkout@v4
80
+ with:
81
+ fetch-depth: 0
82
+ - uses: actions/setup-python@v5
83
+ with:
84
+ python-version: "3.12"
85
+ - name: Install build tooling
86
+ run: python -m pip install -U build
87
+ - name: Build
88
+ env:
89
+ SETUPTOOLS_SCM_PRETEND_VERSION: ${{ needs.compute.outputs.version }}
90
+ run: python -m build
91
+ - name: Upload build artifacts
92
+ uses: actions/upload-artifact@v4
93
+ with:
94
+ name: dist
95
+ path: dist/*
96
+
97
+ publish:
98
+ needs: [compute, build]
99
+ if: needs.compute.outputs.should_publish == 'true'
100
+ runs-on: ubuntu-latest
101
+ permissions:
102
+ id-token: write
103
+ contents: read
104
+ steps:
105
+ - uses: actions/checkout@v4
106
+ - uses: actions/download-artifact@v4
107
+ with:
108
+ name: dist
109
+ path: dist
110
+ - name: Verify PyPI project exists
111
+ shell: bash
112
+ run: |
113
+ set -euo pipefail
114
+ PROJECT="$(python3 -c 'import tomllib, pathlib; print(tomllib.load(pathlib.Path("pyproject.toml").open("rb"))["project"]["name"])')"
115
+ CODE="$(curl -sS -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/${PROJECT}/json" || true)"
116
+ if [ "${CODE}" != "200" ]; then
117
+ echo "::error::PyPI project '${PROJECT}' does not exist yet (HTTP ${CODE})."
118
+ echo "::error::You must do the first upload manually (user identity) before Trusted Publishing can work."
119
+ echo "::error::Run scripts/first_pypi_upload.ps1 (Windows) or scripts/first_pypi_upload.sh (macOS/Linux)."
120
+ exit 1
121
+ fi
122
+ - name: Publish to PyPI (Trusted Publishing)
123
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,20 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.pyo
4
+
5
+ .venv/
6
+ venv/
7
+ .gms-mcp/
8
+
9
+ .pytest_cache/
10
+ .mypy_cache/
11
+ .ruff_cache/
12
+
13
+ build/
14
+ dist/
15
+ *.egg-info/
16
+
17
+ gamemaker/
18
+ .vscode/settings.json
19
+ .cursor/mcp.json
20
+ .cursor/debug.log
@@ -0,0 +1,32 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [Unreleased]
6
+
7
+ ### Added
8
+ - **Introspection Tools**: Implemented comprehensive project introspection tools including `gm_list_assets`, `gm_read_asset`, and `gm_search_references`. These tools support all GameMaker asset types, including **Extensions** and **Included Files (Datafiles)**.
9
+ - **Asset Dependency Graph**: Added `gm_get_asset_graph` tool with both **Shallow** (structural metadata only) and **Deep** (full GML code parsing) modes for tracing relationships between objects, sprites, scripts, and more.
10
+ - **MCP Resources**: Exposed addressable, cacheable project indices and graphs via MCP resources (`gms://project/index` and `gms://project/asset-graph`) for high-performance agent context loading.
11
+ - **Project Statistics**: Added `gm_get_project_stats` for quick summaries of project asset counts by type.
12
+ - **Project-Relative Debug Logging**: Debug logs are now normalized to `.gms_mcp/logs/debug.log` within the resolved project root, ensuring logs are captured correctly in both development and installed (`pipx`) environments.
13
+ - **Purge Command**: Implemented the previously stubbed `purge` command. It now correctly identifies orphaned assets, respects `maintenance_keep.txt` and `--keep` patterns, and safely moves files to a timestamped `.maintenance_trash` folder with an automatically generated `MANIFEST.txt`.
14
+ - **CI Test Suite**: Added a comprehensive CI test job to `publish.yml` that runs the full test suite and final verification across Linux and Windows on Python 3.11, 3.12, and 3.13, ensuring project stability before every build. Updated test runner to automatically create a minimal GameMaker project environment when running in clean CI environments.
15
+ - **Coverage Tooling**: Wired up `pytest-cov` and added coverage reporting targets in `pyproject.toml`. Developers can now generate HTML and terminal coverage reports using `pytest`.
16
+
17
+ ### Fixed
18
+ - **Output Encoding**: Corrected a bug in `utils.py` where the UTF-8 fallback wrapper failed to reassign `sys.stdout` and `sys.stderr` on older Windows systems, ensuring Unicode-safe console output.
19
+ - **MCP Stdio Deadlocks**: Resolved "silent hangs" in Cursor by isolating subprocess stdin (`DEVNULL`) and disabling streaming logs (`ctx.log()`) during active execution.
20
+ - **Windows Performance**: Defaulted to in-process execution for MCP tools, making them near-instant on Windows and bypassing shim/wrapper overhead.
21
+ - **Asset Creation Defaults**: Assets created without an explicit `parent_path` now correctly default to the project root (mirroring GameMaker IDE behavior).
22
+ - **Invalid Room Schema**: Fixed invalid JSON generation for room `.yy` files by ensuring all 8 view slots include required fields (`hborder`, `objectId`, etc.).
23
+ - **FastMCP Parameter Conflict**: Renamed `constructor` parameter to `is_constructor` in `gm_create_script` to resolve internal naming conflicts in FastMCP.
24
+
25
+ ### Changed
26
+ - **Execution Model Documentation**: Updated README and tool docstrings to align with the actual high-reliability subprocess execution model (standardizing on captured output and isolated stdin).
27
+ - **Project Root Resolution**: Standardized environment variable support across MCP server and CLI tools. Both now consistently check for `GM_PROJECT_ROOT` followed by `PROJECT_ROOT`, improving consistency when running in different environments.
28
+ - **Test Suite Logs**: Improved test output by clearly labeling expected errors during negative testing as `[EXPECTED ERROR]`, reducing confusion during CI runs.
29
+ - MCP tools now default to `skip_maintenance=True` and `maintenance_verbose=False` for faster feedback loops.
30
+ - `gm_maintenance_dedupe_resources` now defaults to `auto=True` to prevent interactive prompt hangs.
31
+ - Removed legacy `test_mcp_streaming_runner.py` in favor of the more stable direct/non-streaming architecture.
32
+ - CLI test suite now imports `gms_helpers` directly from `src` and uses module invocation, removing legacy shim modules.
gms_mcp-0.1.17/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ampersand Game Studios
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: gms-mcp
3
+ Version: 0.1.17
4
+ Summary: GameMaker CLI + MCP server toolset
5
+ Author: Callum Lory, Ampersand Game Studios
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Ampersand-Game-Studios/gms-mcp
8
+ Project-URL: Repository, https://github.com/Ampersand-Game-Studios/gms-mcp
9
+ Project-URL: Issues, https://github.com/Ampersand-Game-Studios/gms-mcp/issues
10
+ Keywords: gamemaker,mcp,cursor,cli,tools
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: mcp>=1.0.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest>=9.0.0; extra == "dev"
24
+ Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
25
+ Dynamic: license-file
26
+
27
+ # GameMaker MCP Tools
28
+
29
+ This repo provides:
30
+ - `gms`: a Python CLI for GameMaker project operations (asset creation, maintenance, runner, etc).
31
+ - `gms-mcp`: an MCP server that exposes the same operations as MCP tools (Cursor is the primary example client).
32
+ - **Introspection**: complete project inspection with support for all asset types (including extensions and datafiles).
33
+ - **MCP Resources**: addressable project index and asset graph for high-performance agent context loading.
34
+ - `gms-mcp-init`: generates shareable MCP config files for a workspace. Now auto-detects environment variables like `GMS_MCP_GMS_PATH` to include in the generated config.
35
+
36
+ ## Install (recommended: pipx)
37
+
38
+ ```powershell
39
+ pipx install gms-mcp
40
+ ```
41
+
42
+ ## Local Development Setup
43
+
44
+ If you are working on the `gms-mcp` codebase itself, follow these steps to set up a local development environment:
45
+
46
+ 1. **Clone and install in editable mode**:
47
+ ```powershell
48
+ git checkout dev
49
+ pip install -e .
50
+ ```
51
+
52
+ 2. **Initialize local and global MCP servers for testing**:
53
+ We recommend setting up two separate MCP server configurations in Cursor to test your changes:
54
+
55
+ * **Global (`gms-global`)**: For general use across all your GameMaker projects.
56
+ * **Local (`gms-local`)**: Specifically for testing your current changes to the server.
57
+
58
+ Run these commands from the project root:
59
+ ```powershell
60
+ # Global setup (names it 'gms-global' in Cursor)
61
+ gms-mcp-init --cursor-global --server-name gms-global --mode python-module --python python --non-interactive
62
+
63
+ # Local setup (names it 'gms-local' in Cursor)
64
+ gms-mcp-init --cursor --server-name gms-local --mode python-module --python python --non-interactive
65
+ ```
66
+
67
+ 3. **Verify in Cursor**:
68
+ Go to **Cursor Settings > Features > MCP** to see your new servers. You may need to click "Reload" or restart Cursor to see changes.
69
+
70
+ ## Publishing (maintainers)
71
+
72
+ Publishing is automated via GitHub Actions (PyPI Trusted Publishing) on every push to `main` and on tags `v*`.
73
+ See `RELEASING.md` for the one-time PyPI setup and the first manual upload helper scripts.
74
+
75
+ ## Use with a GameMaker project (multi-project friendly)
76
+
77
+ Run this inside each GameMaker project workspace (or repo) to generate config:
78
+
79
+ ```powershell
80
+ gms-mcp-init --cursor
81
+ ```
82
+
83
+ This writes `.cursor/mcp.json` and attempts to auto-detect the `.yyp` location to set `GM_PROJECT_ROOT`.
84
+
85
+ For a one-time setup that works across many projects, write Cursor's global config instead:
86
+
87
+ ```powershell
88
+ gms-mcp-init --cursor-global
89
+ ```
90
+
91
+ Generate example configs for other MCP-capable clients:
92
+
93
+ ```powershell
94
+ gms-mcp-init --vscode --windsurf --antigravity
95
+ ```
96
+
97
+ Or generate everything at once:
98
+
99
+ ```powershell
100
+ gms-mcp-init --all
101
+ ```
102
+
103
+ ## Monorepos / multiple `.yyp`
104
+
105
+ If multiple `.yyp` projects are detected in a workspace:
106
+ - `gms-mcp-init` will warn and (when interactive) prompt you to pick one.
107
+ - In non-interactive environments, it defaults `GM_PROJECT_ROOT` to `${workspaceFolder}` (safe).
108
+
109
+ Force a specific project root:
110
+
111
+ ```powershell
112
+ gms-mcp-init --cursor --gm-project-root path\\to\\project
113
+ ```
114
+
115
+ Preview output without writing files:
116
+
117
+ ```powershell
118
+ gms-mcp-init --cursor --dry-run
119
+ ```
120
+
121
+ ## Introspection Tools
122
+
123
+ The MCP server provides comprehensive project introspection capabilities:
124
+
125
+ ### Asset Listing (`gm_list_assets`)
126
+ List all assets in your project, optionally filtered by type:
127
+ - **Supported types**: script, object, sprite, room, sound, font, shader, path, timeline, tileset, animcurve, sequence, note, folder, **extension**, **includedfile** (datafiles)
128
+
129
+ ### Asset Reading (`gm_read_asset`)
130
+ Read the complete `.yy` JSON metadata for any asset by name or path.
131
+
132
+ ### Reference Search (`gm_search_references`)
133
+ Search for patterns across project files with:
134
+ - **Scopes**: `all`, `gml`, `yy`, `scripts`, `objects`, `extensions`, `datafiles`
135
+ - **Modes**: literal string or regex
136
+ - **Options**: case sensitivity, max results
137
+
138
+ ### Asset Graph (`gm_get_asset_graph`)
139
+ Build a dependency graph of assets with two modes:
140
+ - **Shallow (fast)**: Parses `.yy` files for structural references (parent objects, sprites, etc.)
141
+ - **Deep (complete)**: Also scans all GML code for runtime references like `instance_create`, `sprite_index`, `audio_play_sound`, etc.
142
+
143
+ ### MCP Resources
144
+ Pre-built, cacheable project data for agents:
145
+ - `gms://project/index`: Complete project structure (assets, folders, room order, audio/texture groups, IDE version)
146
+ - `gms://project/asset-graph`: Asset dependency graph
147
+ - `gms://system/updates`: Returns a human-readable message if a newer version of `gms-mcp` is available on PyPI or GitHub.
148
+
149
+ ### Update Notifier
150
+ The server automatically checks for updates on startup and during common operations:
151
+ - **Tool**: `gm_check_updates` returns structured update info.
152
+ - **Auto-check**: `gm_project_info` includes an `updates` field.
153
+ - **Resource**: `gms://system/updates` provides a quick text status.
154
+
155
+ ## CLI usage
156
+
157
+ Run from a project directory (or pass `--project-root`):
158
+
159
+ ```powershell
160
+ gms --version
161
+ gms --project-root . asset create script my_function --parent-path "folders/Scripts.yy"
162
+ ```
@@ -0,0 +1,136 @@
1
+ # GameMaker MCP Tools
2
+
3
+ This repo provides:
4
+ - `gms`: a Python CLI for GameMaker project operations (asset creation, maintenance, runner, etc).
5
+ - `gms-mcp`: an MCP server that exposes the same operations as MCP tools (Cursor is the primary example client).
6
+ - **Introspection**: complete project inspection with support for all asset types (including extensions and datafiles).
7
+ - **MCP Resources**: addressable project index and asset graph for high-performance agent context loading.
8
+ - `gms-mcp-init`: generates shareable MCP config files for a workspace. Now auto-detects environment variables like `GMS_MCP_GMS_PATH` to include in the generated config.
9
+
10
+ ## Install (recommended: pipx)
11
+
12
+ ```powershell
13
+ pipx install gms-mcp
14
+ ```
15
+
16
+ ## Local Development Setup
17
+
18
+ If you are working on the `gms-mcp` codebase itself, follow these steps to set up a local development environment:
19
+
20
+ 1. **Clone and install in editable mode**:
21
+ ```powershell
22
+ git checkout dev
23
+ pip install -e .
24
+ ```
25
+
26
+ 2. **Initialize local and global MCP servers for testing**:
27
+ We recommend setting up two separate MCP server configurations in Cursor to test your changes:
28
+
29
+ * **Global (`gms-global`)**: For general use across all your GameMaker projects.
30
+ * **Local (`gms-local`)**: Specifically for testing your current changes to the server.
31
+
32
+ Run these commands from the project root:
33
+ ```powershell
34
+ # Global setup (names it 'gms-global' in Cursor)
35
+ gms-mcp-init --cursor-global --server-name gms-global --mode python-module --python python --non-interactive
36
+
37
+ # Local setup (names it 'gms-local' in Cursor)
38
+ gms-mcp-init --cursor --server-name gms-local --mode python-module --python python --non-interactive
39
+ ```
40
+
41
+ 3. **Verify in Cursor**:
42
+ Go to **Cursor Settings > Features > MCP** to see your new servers. You may need to click "Reload" or restart Cursor to see changes.
43
+
44
+ ## Publishing (maintainers)
45
+
46
+ Publishing is automated via GitHub Actions (PyPI Trusted Publishing) on every push to `main` and on tags `v*`.
47
+ See `RELEASING.md` for the one-time PyPI setup and the first manual upload helper scripts.
48
+
49
+ ## Use with a GameMaker project (multi-project friendly)
50
+
51
+ Run this inside each GameMaker project workspace (or repo) to generate config:
52
+
53
+ ```powershell
54
+ gms-mcp-init --cursor
55
+ ```
56
+
57
+ This writes `.cursor/mcp.json` and attempts to auto-detect the `.yyp` location to set `GM_PROJECT_ROOT`.
58
+
59
+ For a one-time setup that works across many projects, write Cursor's global config instead:
60
+
61
+ ```powershell
62
+ gms-mcp-init --cursor-global
63
+ ```
64
+
65
+ Generate example configs for other MCP-capable clients:
66
+
67
+ ```powershell
68
+ gms-mcp-init --vscode --windsurf --antigravity
69
+ ```
70
+
71
+ Or generate everything at once:
72
+
73
+ ```powershell
74
+ gms-mcp-init --all
75
+ ```
76
+
77
+ ## Monorepos / multiple `.yyp`
78
+
79
+ If multiple `.yyp` projects are detected in a workspace:
80
+ - `gms-mcp-init` will warn and (when interactive) prompt you to pick one.
81
+ - In non-interactive environments, it defaults `GM_PROJECT_ROOT` to `${workspaceFolder}` (safe).
82
+
83
+ Force a specific project root:
84
+
85
+ ```powershell
86
+ gms-mcp-init --cursor --gm-project-root path\\to\\project
87
+ ```
88
+
89
+ Preview output without writing files:
90
+
91
+ ```powershell
92
+ gms-mcp-init --cursor --dry-run
93
+ ```
94
+
95
+ ## Introspection Tools
96
+
97
+ The MCP server provides comprehensive project introspection capabilities:
98
+
99
+ ### Asset Listing (`gm_list_assets`)
100
+ List all assets in your project, optionally filtered by type:
101
+ - **Supported types**: script, object, sprite, room, sound, font, shader, path, timeline, tileset, animcurve, sequence, note, folder, **extension**, **includedfile** (datafiles)
102
+
103
+ ### Asset Reading (`gm_read_asset`)
104
+ Read the complete `.yy` JSON metadata for any asset by name or path.
105
+
106
+ ### Reference Search (`gm_search_references`)
107
+ Search for patterns across project files with:
108
+ - **Scopes**: `all`, `gml`, `yy`, `scripts`, `objects`, `extensions`, `datafiles`
109
+ - **Modes**: literal string or regex
110
+ - **Options**: case sensitivity, max results
111
+
112
+ ### Asset Graph (`gm_get_asset_graph`)
113
+ Build a dependency graph of assets with two modes:
114
+ - **Shallow (fast)**: Parses `.yy` files for structural references (parent objects, sprites, etc.)
115
+ - **Deep (complete)**: Also scans all GML code for runtime references like `instance_create`, `sprite_index`, `audio_play_sound`, etc.
116
+
117
+ ### MCP Resources
118
+ Pre-built, cacheable project data for agents:
119
+ - `gms://project/index`: Complete project structure (assets, folders, room order, audio/texture groups, IDE version)
120
+ - `gms://project/asset-graph`: Asset dependency graph
121
+ - `gms://system/updates`: Returns a human-readable message if a newer version of `gms-mcp` is available on PyPI or GitHub.
122
+
123
+ ### Update Notifier
124
+ The server automatically checks for updates on startup and during common operations:
125
+ - **Tool**: `gm_check_updates` returns structured update info.
126
+ - **Auto-check**: `gm_project_info` includes an `updates` field.
127
+ - **Resource**: `gms://system/updates` provides a quick text status.
128
+
129
+ ## CLI usage
130
+
131
+ Run from a project directory (or pass `--project-root`):
132
+
133
+ ```powershell
134
+ gms --version
135
+ gms --project-root . asset create script my_function --parent-path "folders/Scripts.yy"
136
+ ```
@@ -0,0 +1,52 @@
1
+ # Releasing `gms-mcp`
2
+
3
+ This project uses `setuptools-scm` + CI to control versions.
4
+
5
+ Policy:
6
+ - `main` publishes a **normal release** and bumps **patch** automatically (`X.Y.Z`).
7
+ - `dev` publishes **dev releases** (`X.Y.(Z+1).devN`).
8
+ - `prerelease` publishes **release candidates** (`X.Y.(Z+1)rcN`).
9
+ - **Post releases** (`X.Y.Z.postN`) are **manual only** and intended for packaging/deployment fixes (not code changes).
10
+
11
+ ## One-time: install tooling
12
+
13
+ ```bash
14
+ python -m pip install -U build twine
15
+ ```
16
+
17
+ ## Local build
18
+
19
+ ```bash
20
+ python -m build
21
+ ```
22
+
23
+ Artifacts are created in `dist/`.
24
+
25
+ ## First publish (manual)
26
+
27
+ PyPI Trusted Publishing cannot create a brand-new project: the project must exist first.
28
+
29
+ - Windows: `scripts/first_pypi_upload.ps1`
30
+ - macOS/Linux: `scripts/first_pypi_upload.sh`
31
+
32
+ These scripts build, validate, and upload from `dist/` using a PyPI API token.
33
+
34
+ ## Ongoing publishes (automated): GitHub Trusted Publishing
35
+
36
+ Once the project exists on PyPI (name is `gms-mcp`, shown as `GMS-MCP` on PyPI), configure a Trusted Publisher:
37
+
38
+ 1. On PyPI, open the project settings for `GMS-MCP`.
39
+ 2. Add a Trusted Publisher for:
40
+ - Owner: `Ampersand-Game-Studios`
41
+ - Repository: `gms-mcp`
42
+ - Workflow: `.github/workflows/publish.yml`
43
+ - Environment: (leave blank unless you use one)
44
+ 3. Push to `main` to publish a post-release automatically, or push a version tag like `v0.1.0` to set a new base version.
45
+
46
+ Notes:
47
+ - The GitHub Actions workflow publishes on every push to `main` (as requested). This will create many versions on PyPI.
48
+ - If you want fewer releases, change the workflow trigger to tags-only.
49
+
50
+ ## Manual post-release (packaging fix only)
51
+
52
+ Use GitHub Actions `workflow_dispatch` for `Publish to PyPI` and provide an explicit version like `0.1.0.post1`.
@@ -0,0 +1 @@
1
+ # CLI support utilities live under this directory.
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Convenience entrypoint for setting up the `gms` command.
4
+
5
+ For releases, prefer `gms` and `gms-mcp-init` entrypoints.
6
+ """
7
+
8
+ from pathlib import Path
9
+ import sys
10
+
11
+ HERE = Path(__file__).resolve().parent
12
+ REPO_ROOT = HERE.parent
13
+ SRC = REPO_ROOT / "src"
14
+ if str(SRC) not in sys.path:
15
+ sys.path.insert(0, str(SRC))
16
+
17
+ # Re-export the full implementation so `import agent_setup` behaves like the
18
+ # original module (some tests/importers expect helper functions to exist).
19
+ from gms_helpers.agent_setup import * # type: ignore # noqa: F403,E402
20
+ from gms_helpers.agent_setup import main as _main # noqa: E402
21
+
22
+ if __name__ == "__main__":
23
+ raise SystemExit(0 if _main() else 1)
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+