gms-mcp 0.1.9.dev2300__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 (114) hide show
  1. gms_mcp-0.1.9.dev2300/.github/workflows/publish.yml +101 -0
  2. gms_mcp-0.1.9.dev2300/.gitignore +20 -0
  3. gms_mcp-0.1.9.dev2300/CHANGELOG.md +20 -0
  4. gms_mcp-0.1.9.dev2300/LICENSE +22 -0
  5. gms_mcp-0.1.9.dev2300/PKG-INFO +123 -0
  6. gms_mcp-0.1.9.dev2300/README.md +100 -0
  7. gms_mcp-0.1.9.dev2300/RELEASING.md +52 -0
  8. gms_mcp-0.1.9.dev2300/cli/__init__.py +1 -0
  9. gms_mcp-0.1.9.dev2300/cli/agent_setup.py +32 -0
  10. gms_mcp-0.1.9.dev2300/cli/docs/CLI_HELPER_TOOLS.md +945 -0
  11. gms_mcp-0.1.9.dev2300/cli/docs/README.md +246 -0
  12. gms_mcp-0.1.9.dev2300/cli/docs/TEST_SUITE_GUIDE.md +237 -0
  13. gms_mcp-0.1.9.dev2300/cli/gms +14 -0
  14. gms_mcp-0.1.9.dev2300/cli/gms.bat +16 -0
  15. gms_mcp-0.1.9.dev2300/cli/install.py +30 -0
  16. gms_mcp-0.1.9.dev2300/cli/reports/CLI_CRITICAL_FIXES_REPORT.md +188 -0
  17. gms_mcp-0.1.9.dev2300/cli/reports/CLI_DIRECTORY_VALIDATION_IMPLEMENTATION.md +188 -0
  18. gms_mcp-0.1.9.dev2300/cli/reports/CLI_TOOL_IMPROVEMENTS_REPORT.md +241 -0
  19. gms_mcp-0.1.9.dev2300/cli/reports/CONSTRUCTOR_VALIDATION_IMPLEMENTATION_SUMMARY.md +153 -0
  20. gms_mcp-0.1.9.dev2300/cli/test_config.py +79 -0
  21. gms_mcp-0.1.9.dev2300/cli/tests/python/commands/__init__.py +8 -0
  22. gms_mcp-0.1.9.dev2300/cli/tests/python/commands/asset_commands.py +50 -0
  23. gms_mcp-0.1.9.dev2300/cli/tests/python/commands/event_commands.py +38 -0
  24. gms_mcp-0.1.9.dev2300/cli/tests/python/commands/maintenance_commands.py +68 -0
  25. gms_mcp-0.1.9.dev2300/cli/tests/python/commands/room_commands.py +81 -0
  26. gms_mcp-0.1.9.dev2300/cli/tests/python/commands/runner_commands.py +33 -0
  27. gms_mcp-0.1.9.dev2300/cli/tests/python/commands/workflow_commands.py +32 -0
  28. gms_mcp-0.1.9.dev2300/cli/tests/python/conftest.py +12 -0
  29. gms_mcp-0.1.9.dev2300/cli/tests/python/debug_validate_json.py +1 -0
  30. gms_mcp-0.1.9.dev2300/cli/tests/python/run_all_tests.py +170 -0
  31. gms_mcp-0.1.9.dev2300/cli/tests/python/test_agent_setup.py +277 -0
  32. gms_mcp-0.1.9.dev2300/cli/tests/python/test_all_phases.py +465 -0
  33. gms_mcp-0.1.9.dev2300/cli/tests/python/test_asset_helper.py +627 -0
  34. gms_mcp-0.1.9.dev2300/cli/tests/python/test_assets_comprehensive.py +1046 -0
  35. gms_mcp-0.1.9.dev2300/cli/tests/python/test_auto_maintenance_comprehensive.py +1543 -0
  36. gms_mcp-0.1.9.dev2300/cli/tests/python/test_command_modules_comprehensive.py +1003 -0
  37. gms_mcp-0.1.9.dev2300/cli/tests/python/test_config.py +16 -0
  38. gms_mcp-0.1.9.dev2300/cli/tests/python/test_directory_validation_fixed.py +290 -0
  39. gms_mcp-0.1.9.dev2300/cli/tests/python/test_event_helper.py +173 -0
  40. gms_mcp-0.1.9.dev2300/cli/tests/python/test_event_validation.py +348 -0
  41. gms_mcp-0.1.9.dev2300/cli/tests/python/test_final_verification.py +85 -0
  42. gms_mcp-0.1.9.dev2300/cli/tests/python/test_master_cli.py +150 -0
  43. gms_mcp-0.1.9.dev2300/cli/tests/python/test_mcp_direct.py +103 -0
  44. gms_mcp-0.1.9.dev2300/cli/tests/python/test_room_instance_helper.py +908 -0
  45. gms_mcp-0.1.9.dev2300/cli/tests/python/test_room_layer_helper.py +658 -0
  46. gms_mcp-0.1.9.dev2300/cli/tests/python/test_room_operations.py +504 -0
  47. gms_mcp-0.1.9.dev2300/cli/tests/python/test_utils_comprehensive.py +991 -0
  48. gms_mcp-0.1.9.dev2300/cli/tests/python/test_workflow.py +74 -0
  49. gms_mcp-0.1.9.dev2300/cli/tests/python/test_workflow_enhanced.py +550 -0
  50. gms_mcp-0.1.9.dev2300/cli/update_test_imports.py +196 -0
  51. gms_mcp-0.1.9.dev2300/pyproject.toml +57 -0
  52. gms_mcp-0.1.9.dev2300/scripts/ci_version.py +148 -0
  53. gms_mcp-0.1.9.dev2300/scripts/first_pypi_upload.ps1 +34 -0
  54. gms_mcp-0.1.9.dev2300/scripts/first_pypi_upload.sh +22 -0
  55. gms_mcp-0.1.9.dev2300/setup.cfg +4 -0
  56. gms_mcp-0.1.9.dev2300/src/gms_helpers/__init__.py +2 -0
  57. gms_mcp-0.1.9.dev2300/src/gms_helpers/__main__.py +7 -0
  58. gms_mcp-0.1.9.dev2300/src/gms_helpers/agent_setup.py +154 -0
  59. gms_mcp-0.1.9.dev2300/src/gms_helpers/asset_helper.py +1928 -0
  60. gms_mcp-0.1.9.dev2300/src/gms_helpers/assets.py +1223 -0
  61. gms_mcp-0.1.9.dev2300/src/gms_helpers/auto_maintenance.py +615 -0
  62. gms_mcp-0.1.9.dev2300/src/gms_helpers/base_asset.py +91 -0
  63. gms_mcp-0.1.9.dev2300/src/gms_helpers/cli.py +8 -0
  64. gms_mcp-0.1.9.dev2300/src/gms_helpers/commands/__init__.py +1 -0
  65. gms_mcp-0.1.9.dev2300/src/gms_helpers/commands/asset_commands.py +41 -0
  66. gms_mcp-0.1.9.dev2300/src/gms_helpers/commands/event_commands.py +29 -0
  67. gms_mcp-0.1.9.dev2300/src/gms_helpers/commands/maintenance_commands.py +58 -0
  68. gms_mcp-0.1.9.dev2300/src/gms_helpers/commands/room_commands.py +71 -0
  69. gms_mcp-0.1.9.dev2300/src/gms_helpers/commands/runner_commands.py +107 -0
  70. gms_mcp-0.1.9.dev2300/src/gms_helpers/commands/workflow_commands.py +25 -0
  71. gms_mcp-0.1.9.dev2300/src/gms_helpers/config.py +35 -0
  72. gms_mcp-0.1.9.dev2300/src/gms_helpers/event_helper.py +748 -0
  73. gms_mcp-0.1.9.dev2300/src/gms_helpers/gms.py +649 -0
  74. gms_mcp-0.1.9.dev2300/src/gms_helpers/install.py +148 -0
  75. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/__init__.py +33 -0
  76. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/audit/__init__.py +19 -0
  77. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/audit/reference_collector.py +468 -0
  78. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/clean_unused_assets.py +186 -0
  79. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/event_sync.py +452 -0
  80. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/lint.py +268 -0
  81. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/orphan_cleanup.py +273 -0
  82. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/orphans.py +192 -0
  83. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/path_utils.py +108 -0
  84. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/prune.py +173 -0
  85. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/static_search.py +202 -0
  86. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/tidy_json.py +93 -0
  87. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/trash/__init__.py +15 -0
  88. gms_mcp-0.1.9.dev2300/src/gms_helpers/maintenance/validate_paths.py +304 -0
  89. gms_mcp-0.1.9.dev2300/src/gms_helpers/reference_scanner.py +472 -0
  90. gms_mcp-0.1.9.dev2300/src/gms_helpers/room_helper.py +209 -0
  91. gms_mcp-0.1.9.dev2300/src/gms_helpers/room_instance_helper.py +388 -0
  92. gms_mcp-0.1.9.dev2300/src/gms_helpers/room_layer_helper.py +315 -0
  93. gms_mcp-0.1.9.dev2300/src/gms_helpers/runner.py +564 -0
  94. gms_mcp-0.1.9.dev2300/src/gms_helpers/templates/ui_gameover_killed_by/label.create.gml +13 -0
  95. gms_mcp-0.1.9.dev2300/src/gms_helpers/templates/ui_gameover_killed_by/name.create.gml +8 -0
  96. gms_mcp-0.1.9.dev2300/src/gms_helpers/templates/ui_gameover_killed_by/sprite.create.gml +5 -0
  97. gms_mcp-0.1.9.dev2300/src/gms_helpers/test_invalid.json +1 -0
  98. gms_mcp-0.1.9.dev2300/src/gms_helpers/utils.py +750 -0
  99. gms_mcp-0.1.9.dev2300/src/gms_helpers/workflow.py +401 -0
  100. gms_mcp-0.1.9.dev2300/src/gms_mcp/POST_MORTEM_STDIO_DEADLOCKS.md +42 -0
  101. gms_mcp-0.1.9.dev2300/src/gms_mcp/README.md +66 -0
  102. gms_mcp-0.1.9.dev2300/src/gms_mcp/__init__.py +5 -0
  103. gms_mcp-0.1.9.dev2300/src/gms_mcp/__main__.py +7 -0
  104. gms_mcp-0.1.9.dev2300/src/gms_mcp/bootstrap_server.py +90 -0
  105. gms_mcp-0.1.9.dev2300/src/gms_mcp/cli.py +14 -0
  106. gms_mcp-0.1.9.dev2300/src/gms_mcp/gamemaker_mcp_server.py +3042 -0
  107. gms_mcp-0.1.9.dev2300/src/gms_mcp/install.py +392 -0
  108. gms_mcp-0.1.9.dev2300/src/gms_mcp/requirements.txt +3 -0
  109. gms_mcp-0.1.9.dev2300/src/gms_mcp.egg-info/PKG-INFO +123 -0
  110. gms_mcp-0.1.9.dev2300/src/gms_mcp.egg-info/SOURCES.txt +112 -0
  111. gms_mcp-0.1.9.dev2300/src/gms_mcp.egg-info/dependency_links.txt +1 -0
  112. gms_mcp-0.1.9.dev2300/src/gms_mcp.egg-info/entry_points.txt +4 -0
  113. gms_mcp-0.1.9.dev2300/src/gms_mcp.egg-info/requires.txt +1 -0
  114. gms_mcp-0.1.9.dev2300/src/gms_mcp.egg-info/top_level.txt +2 -0
@@ -0,0 +1,101 @@
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
+ - "dev"
15
+ - "prerelease"
16
+ tags:
17
+ - "v*"
18
+ workflow_dispatch:
19
+ inputs:
20
+ version:
21
+ description: "Publish a packaging-only post-release (example: 0.1.0.post1)"
22
+ required: false
23
+ type: string
24
+
25
+ jobs:
26
+ compute:
27
+ runs-on: ubuntu-latest
28
+ outputs:
29
+ version: ${{ steps.ver.outputs.version }}
30
+ should_publish: ${{ steps.ver.outputs.should_publish }}
31
+ reason: ${{ steps.ver.outputs.reason }}
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ with:
35
+ fetch-depth: 0
36
+ - uses: actions/setup-python@v5
37
+ with:
38
+ python-version: "3.12"
39
+ - name: Install version tooling
40
+ run: python -m pip install -U packaging
41
+ - name: Compute version
42
+ id: ver
43
+ env:
44
+ VERSION_OVERRIDE: ${{ inputs.version }}
45
+ run: python scripts/ci_version.py
46
+ - name: Summary
47
+ run: |
48
+ echo "version=${{ steps.ver.outputs.version }}"
49
+ echo "should_publish=${{ steps.ver.outputs.should_publish }}"
50
+ echo "reason=${{ steps.ver.outputs.reason }}"
51
+
52
+ build:
53
+ needs: compute
54
+ if: needs.compute.outputs.should_publish == 'true'
55
+ runs-on: ubuntu-latest
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ with:
59
+ fetch-depth: 0
60
+ - uses: actions/setup-python@v5
61
+ with:
62
+ python-version: "3.12"
63
+ - name: Install build tooling
64
+ run: python -m pip install -U build
65
+ - name: Build
66
+ env:
67
+ SETUPTOOLS_SCM_PRETEND_VERSION: ${{ needs.compute.outputs.version }}
68
+ run: python -m build
69
+ - name: Upload build artifacts
70
+ uses: actions/upload-artifact@v4
71
+ with:
72
+ name: dist
73
+ path: dist/*
74
+
75
+ publish:
76
+ needs: [compute, build]
77
+ if: needs.compute.outputs.should_publish == 'true'
78
+ runs-on: ubuntu-latest
79
+ permissions:
80
+ id-token: write
81
+ contents: read
82
+ steps:
83
+ - uses: actions/checkout@v4
84
+ - uses: actions/download-artifact@v4
85
+ with:
86
+ name: dist
87
+ path: dist
88
+ - name: Verify PyPI project exists
89
+ shell: bash
90
+ run: |
91
+ set -euo pipefail
92
+ PROJECT="$(python3 -c 'import tomllib, pathlib; print(tomllib.load(pathlib.Path("pyproject.toml").open("rb"))["project"]["name"])')"
93
+ CODE="$(curl -sS -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/${PROJECT}/json" || true)"
94
+ if [ "${CODE}" != "200" ]; then
95
+ echo "::error::PyPI project '${PROJECT}' does not exist yet (HTTP ${CODE})."
96
+ echo "::error::You must do the first upload manually (user identity) before Trusted Publishing can work."
97
+ echo "::error::Run scripts/first_pypi_upload.ps1 (Windows) or scripts/first_pypi_upload.sh (macOS/Linux)."
98
+ exit 1
99
+ fi
100
+ - name: Publish to PyPI (Trusted Publishing)
101
+ 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,20 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [Unreleased]
6
+
7
+ ### Fixed
8
+ - **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.
9
+ - **MCP Stdio Deadlocks**: Resolved "silent hangs" in Cursor by isolating subprocess stdin (`DEVNULL`) and disabling streaming logs (`ctx.log()`) during active execution.
10
+ - **Windows Performance**: Defaulted to in-process execution for MCP tools, making them near-instant on Windows and bypassing shim/wrapper overhead.
11
+ - **Asset Creation Defaults**: Assets created without an explicit `parent_path` now correctly default to the project root (mirroring GameMaker IDE behavior).
12
+ - **Invalid Room Schema**: Fixed invalid JSON generation for room `.yy` files by ensuring all 8 view slots include required fields (`hborder`, `objectId`, etc.).
13
+ - **FastMCP Parameter Conflict**: Renamed `constructor` parameter to `is_constructor` in `gm_create_script` to resolve internal naming conflicts in FastMCP.
14
+
15
+ ### Changed
16
+ - **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.
17
+ - MCP tools now default to `skip_maintenance=True` and `maintenance_verbose=False` for faster feedback loops.
18
+ - `gm_maintenance_dedupe_resources` now defaults to `auto=True` to prevent interactive prompt hangs.
19
+ - Removed legacy `test_mcp_streaming_runner.py` in favor of the more stable direct/non-streaming architecture.
20
+ - CLI test suite now imports `gms_helpers` directly from `src` and uses module invocation, removing legacy shim modules.
@@ -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,123 @@
1
+ Metadata-Version: 2.4
2
+ Name: gms-mcp
3
+ Version: 0.1.9.dev2300
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
+ Dynamic: license-file
23
+
24
+ # GameMaker MCP Tools
25
+
26
+ This repo provides:
27
+ - `gms`: a Python CLI for GameMaker project operations (asset creation, maintenance, runner, etc).
28
+ - `gms-mcp`: an MCP server that exposes the same operations as MCP tools (Cursor is the primary example client).
29
+ - `gms-mcp-init`: generates shareable MCP config files for a workspace.
30
+
31
+ ## Install (recommended: pipx)
32
+
33
+ ```powershell
34
+ pipx install gms-mcp
35
+ ```
36
+
37
+ ## Local Development Setup
38
+
39
+ If you are working on the `gms-mcp` codebase itself, follow these steps to set up a local development environment:
40
+
41
+ 1. **Clone and install in editable mode**:
42
+ ```powershell
43
+ git checkout dev
44
+ pip install -e .
45
+ ```
46
+
47
+ 2. **Initialize local and global MCP servers for testing**:
48
+ We recommend setting up two separate MCP server configurations in Cursor to test your changes:
49
+
50
+ * **Global (`gms-global`)**: For general use across all your GameMaker projects.
51
+ * **Local (`gms-local`)**: Specifically for testing your current changes to the server.
52
+
53
+ Run these commands from the project root:
54
+ ```powershell
55
+ # Global setup (names it 'gms-global' in Cursor)
56
+ gms-mcp-init --cursor-global --server-name gms-global --mode python-module --python python --non-interactive
57
+
58
+ # Local setup (names it 'gms-local' in Cursor)
59
+ gms-mcp-init --cursor --server-name gms-local --mode python-module --python python --non-interactive
60
+ ```
61
+
62
+ 3. **Verify in Cursor**:
63
+ Go to **Cursor Settings > Features > MCP** to see your new servers. You may need to click "Reload" or restart Cursor to see changes.
64
+
65
+ ## Publishing (maintainers)
66
+
67
+ Publishing is automated via GitHub Actions (PyPI Trusted Publishing) on every push to `main` and on tags `v*`.
68
+ See `RELEASING.md` for the one-time PyPI setup and the first manual upload helper scripts.
69
+
70
+ ## Use with a GameMaker project (multi-project friendly)
71
+
72
+ Run this inside each GameMaker project workspace (or repo) to generate config:
73
+
74
+ ```powershell
75
+ gms-mcp-init --cursor
76
+ ```
77
+
78
+ This writes `.cursor/mcp.json` and attempts to auto-detect the `.yyp` location to set `GM_PROJECT_ROOT`.
79
+
80
+ For a one-time setup that works across many projects, write Cursor's global config instead:
81
+
82
+ ```powershell
83
+ gms-mcp-init --cursor-global
84
+ ```
85
+
86
+ Generate example configs for other MCP-capable clients:
87
+
88
+ ```powershell
89
+ gms-mcp-init --vscode --windsurf --antigravity
90
+ ```
91
+
92
+ Or generate everything at once:
93
+
94
+ ```powershell
95
+ gms-mcp-init --all
96
+ ```
97
+
98
+ ## Monorepos / multiple `.yyp`
99
+
100
+ If multiple `.yyp` projects are detected in a workspace:
101
+ - `gms-mcp-init` will warn and (when interactive) prompt you to pick one.
102
+ - In non-interactive environments, it defaults `GM_PROJECT_ROOT` to `${workspaceFolder}` (safe).
103
+
104
+ Force a specific project root:
105
+
106
+ ```powershell
107
+ gms-mcp-init --cursor --gm-project-root path\\to\\project
108
+ ```
109
+
110
+ Preview output without writing files:
111
+
112
+ ```powershell
113
+ gms-mcp-init --cursor --dry-run
114
+ ```
115
+
116
+ ## CLI usage
117
+
118
+ Run from a project directory (or pass `--project-root`):
119
+
120
+ ```powershell
121
+ gms --version
122
+ gms --project-root . asset create script my_function --parent-path "folders/Scripts.yy"
123
+ ```
@@ -0,0 +1,100 @@
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
+ - `gms-mcp-init`: generates shareable MCP config files for a workspace.
7
+
8
+ ## Install (recommended: pipx)
9
+
10
+ ```powershell
11
+ pipx install gms-mcp
12
+ ```
13
+
14
+ ## Local Development Setup
15
+
16
+ If you are working on the `gms-mcp` codebase itself, follow these steps to set up a local development environment:
17
+
18
+ 1. **Clone and install in editable mode**:
19
+ ```powershell
20
+ git checkout dev
21
+ pip install -e .
22
+ ```
23
+
24
+ 2. **Initialize local and global MCP servers for testing**:
25
+ We recommend setting up two separate MCP server configurations in Cursor to test your changes:
26
+
27
+ * **Global (`gms-global`)**: For general use across all your GameMaker projects.
28
+ * **Local (`gms-local`)**: Specifically for testing your current changes to the server.
29
+
30
+ Run these commands from the project root:
31
+ ```powershell
32
+ # Global setup (names it 'gms-global' in Cursor)
33
+ gms-mcp-init --cursor-global --server-name gms-global --mode python-module --python python --non-interactive
34
+
35
+ # Local setup (names it 'gms-local' in Cursor)
36
+ gms-mcp-init --cursor --server-name gms-local --mode python-module --python python --non-interactive
37
+ ```
38
+
39
+ 3. **Verify in Cursor**:
40
+ Go to **Cursor Settings > Features > MCP** to see your new servers. You may need to click "Reload" or restart Cursor to see changes.
41
+
42
+ ## Publishing (maintainers)
43
+
44
+ Publishing is automated via GitHub Actions (PyPI Trusted Publishing) on every push to `main` and on tags `v*`.
45
+ See `RELEASING.md` for the one-time PyPI setup and the first manual upload helper scripts.
46
+
47
+ ## Use with a GameMaker project (multi-project friendly)
48
+
49
+ Run this inside each GameMaker project workspace (or repo) to generate config:
50
+
51
+ ```powershell
52
+ gms-mcp-init --cursor
53
+ ```
54
+
55
+ This writes `.cursor/mcp.json` and attempts to auto-detect the `.yyp` location to set `GM_PROJECT_ROOT`.
56
+
57
+ For a one-time setup that works across many projects, write Cursor's global config instead:
58
+
59
+ ```powershell
60
+ gms-mcp-init --cursor-global
61
+ ```
62
+
63
+ Generate example configs for other MCP-capable clients:
64
+
65
+ ```powershell
66
+ gms-mcp-init --vscode --windsurf --antigravity
67
+ ```
68
+
69
+ Or generate everything at once:
70
+
71
+ ```powershell
72
+ gms-mcp-init --all
73
+ ```
74
+
75
+ ## Monorepos / multiple `.yyp`
76
+
77
+ If multiple `.yyp` projects are detected in a workspace:
78
+ - `gms-mcp-init` will warn and (when interactive) prompt you to pick one.
79
+ - In non-interactive environments, it defaults `GM_PROJECT_ROOT` to `${workspaceFolder}` (safe).
80
+
81
+ Force a specific project root:
82
+
83
+ ```powershell
84
+ gms-mcp-init --cursor --gm-project-root path\\to\\project
85
+ ```
86
+
87
+ Preview output without writing files:
88
+
89
+ ```powershell
90
+ gms-mcp-init --cursor --dry-run
91
+ ```
92
+
93
+ ## CLI usage
94
+
95
+ Run from a project directory (or pass `--project-root`):
96
+
97
+ ```powershell
98
+ gms --version
99
+ gms --project-root . asset create script my_function --parent-path "folders/Scripts.yy"
100
+ ```
@@ -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
+