Skip to content

Conversation

@msanatan
Copy link
Contributor

@msanatan msanatan commented Nov 29, 2025

Update mcp-for-unity script entry point from "main:main" to "src.main:main" to match the actual module structure after moving main.py into the src directory.

Summary by CodeRabbit

  • Chores
    • Updated console script entry-point configuration for the mcp-for-unity command.

✏️ Tip: You can customize this high-level summary in your review settings.

Update mcp-for-unity script entry point from "main:main" to "src.main:main" to match the actual module structure after moving main.py into the src directory.
@msanatan msanatan self-assigned this Nov 29, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 29, 2025

Walkthrough

The console script entry point in Server/pyproject.toml is updated from mcp-for-unity = "main:main" to mcp-for-unity = "src.main:main", reflecting a change in module path resolution for the package.

Changes

Cohort / File(s) Summary
Console Script Entry Point Update
Server/pyproject.toml
Updated [project.scripts] entry point for mcp-for-unity from "main:main" to "src.main:main" to reflect the module structure change.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A script once called from main so plain,
Now hops through src to find its domain,
One little path change, nothing arcane—
The entry point dances, updated again! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately describes the main change: fixing the CLI entry point path in pyproject.toml by updating it to match the new module structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adfc6f5 and 9356c10.

📒 Files selected for processing (1)
  • Server/pyproject.toml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: JohanHoltby
Repo: CoplayDev/unity-mcp PR: 309
File: MCPForUnity/Editor/Helpers/ServerInstaller.cs:478-508
Timestamp: 2025-10-13T13:41:00.086Z
Learning: In the MCPForUnityTools feature (MCPForUnity/Editor/Helpers/ServerInstaller.cs), the design intentionally forces users to have only one .py file per MCPForUnityTools folder to keep file tracking simple. Package-style tools (subdirectories with __init__.py) are not supported.
Learnt from: dsarno
Repo: CoplayDev/unity-mcp PR: 265
File: README.md:204-204
Timestamp: 2025-09-05T16:22:04.960Z
Learning: In the Unity MCP project, the ServerInstaller.cs creates a symlink from ~/Library/AppSupport to ~/Library/Application Support on macOS to mitigate argument parsing and quoting issues in some MCP clients. The README documentation should use the shortened AppSupport path, not the full "Application Support" path with spaces.
Learnt from: dsarno
Repo: CoplayDev/unity-mcp PR: 265
File: README.md:204-204
Timestamp: 2025-09-05T16:22:04.960Z
Learning: In the Unity MCP project, the ServerInstaller.cs creates a symlink from ~/Library/AppSupport to ~/Library/Application Support on macOS to mitigate argument parsing and quoting issues in some MCP clients. The README documentation should use the shortened AppSupport path, not the full "Application Support" path with spaces.
Learnt from: dsarno
Repo: CoplayDev/unity-mcp PR: 265
File: README.md:204-204
Timestamp: 2025-09-05T16:22:04.960Z
Learning: In the Unity MCP project, the ServerInstaller.cs creates a symlink from ~/Library/AppSupport to ~/Library/Application Support on macOS to avoid spaces in paths that can cause arg parsing and quoting issues in some MCP clients. The README documentation should use the shortened AppSupport path, not the full "Application Support" path.
📚 Learning: 2025-10-13T13:41:00.086Z
Learnt from: JohanHoltby
Repo: CoplayDev/unity-mcp PR: 309
File: MCPForUnity/Editor/Helpers/ServerInstaller.cs:478-508
Timestamp: 2025-10-13T13:41:00.086Z
Learning: In the MCPForUnityTools feature (MCPForUnity/Editor/Helpers/ServerInstaller.cs), the design intentionally forces users to have only one .py file per MCPForUnityTools folder to keep file tracking simple. Package-style tools (subdirectories with __init__.py) are not supported.

Applied to files:

  • Server/pyproject.toml
📚 Learning: 2025-10-13T13:27:23.040Z
Learnt from: msanatan
Repo: CoplayDev/unity-mcp PR: 316
File: TestProjects/UnityMCPTests/Assets/Tests/EditMode/Resources.meta:1-8
Timestamp: 2025-10-13T13:27:23.040Z
Learning: UnityMcpBridge is a legacy project kept for backwards compatibility; MCPForUnity is the only active Unity plugin project. GUID collisions between UnityMcpBridge and MCPForUnity are acceptable.

Applied to files:

  • Server/pyproject.toml
🔇 Additional comments (1)
Server/pyproject.toml (1)

24-24: The repository clone failed, preventing direct verification of the module structure. However, based on the original review comment structure, I can provide a rewritten version that clarifies the verification requirement:


Confirm the src.main module exists with the entry point function before merging.

The entry point has been updated to reference src.main:main, which requires:

  1. Server/src/main.py exists and contains a callable main() function
  2. The build system is properly configured for src-layout discovery

The following command can verify this:

cd Server
[ -f "src/main.py" ] && grep -n "def main\s*(" src/main.py

Ensure the module structure matches this entry point before the PR is merged.



Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@msanatan msanatan merged commit 06c1dfe into CoplayDev:main Nov 29, 2025
1 check passed
@msanatan msanatan deleted the fix-pyproject-start-script branch November 29, 2025 02:43
dsarno added a commit to dsarno/unity-mcp that referenced this pull request Dec 2, 2025
* 'main' of https://github.com/CoplayDev/unity-mcp:
  chore: bump version to 8.1.4
  Fix Claude Windows config and CLI status refresh (CoplayDev#412)
  chore: bump version to 8.1.3
  fix: restrict fastmcp version to avoid potential KeyError (CoplayDev#411)
  chore: bump version to 8.1.2
  Revert project script change
  chore: bump version to 8.1.1
  Fix CLI entry point path in pyproject.toml (CoplayDev#407)
  Fix manage prefabs (CoplayDev#405)
  Remove automatic version bumping from README files and switch to unversioned git URLs
  chore: bump version to 8.1.0
  Add distribution settings for Asset Store vs git defaults (CoplayDev#404)
  Add CodeBuddy CLI configurator (CoplayDev#403)
  Fix stdio reloads (CoplayDev#402)
  Simplify MCP client configs (CoplayDev#401)
  chore: bump version to 8.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant