Skip to content

Conversation

@dsarno
Copy link
Owner

@dsarno dsarno commented Nov 11, 2025

Note

Replace legacy Python-based workflow with uvx + FastMCP, add HTTP transport and dynamic tool discovery/registration, and remove old Python tool registry/sync with corresponding UI and test updates.

  • Server (FastMCP):
    • Add custom tool registry (Server/custom_tools_manager.py, Server/fastmcp_tool_registry.py) and HTTP/stdio transport configuration; update server.py to register endpoints and support --transport http with host/port.
    • Migrate from embedded Python server; remove legacy UnityMcpServer~/src files (Dockerfile, configs, resources, tools, telemetry, tests) and add Server/pyproject.toml deps (FastAPI/uvicorn).
  • Editor (Services/UI):
    • Add reflection-based tool discovery (IToolDiscoveryService, ToolDiscoveryService); wire into MCPServiceLocator.
    • Replace Python/uv paths with uvx detection and overrides in PathResolverService; add GetUvxPackageSourcePath.
    • Revamp Editor Window: introduce Transport (HTTP/stdio), HTTP URL and Unity socket port fields; replace UV/Python overrides with UVX; remove server download/rebuild controls.
  • Removals:
    • Delete legacy Python tool registry/sync services and related tests (IPythonToolRegistryService, PythonToolRegistryService, IToolSyncService, ToolSyncService).
  • Tests/Utils:
    • Update Codex config tests to use uvx/mcp-for-unity; improve temp asset cleanup in material/prefab tests; prune obsolete tests; ignore additional files in test project.

Written by Cursor Bugbot for commit a7e0bd2. This will update automatically on new commits. Configure here.

msanatan and others added 21 commits October 31, 2025 16:12
We'll reference the remote server in GitHub and configure clients to use `uvx`
- Replaced local server execution with uvx package-based configuration for improved reliability
- Added GetUvxCommand helper to generate correct package version command string
- Updated config generation to use `uvx mcp-for-unity` instead of local Python server
- Modified Codex and client configuration validation to support uvx-based setup
- Removed unused server source directory handling and related preferences
- Updated tests to verify uvx command generation
We don't commit temp folders, tests are expected to clean up after themselves
- Replaced local server path detection with uvx-based package installation from git repository
- Updated all configuration generators to use structured uvx command parts (command, --from URL, package)
- Renamed UV path references to UVX for clarity and consistency
- Added GetUvxCommandParts() helper to centralize uvx command generation
- Added GetMcpServerGitUrl() to handle git repository URL construction
- Updated client configuration validation
- Added GetUvxPackageSourcePath method to locate unity-mcp package in uv cache by traversing git checkouts
- Replaced hardcoded "Dummy" path in PythonToolSyncProcessor with dynamic path resolution
- Added validation for Server directory structure and pyproject.toml to ensure correct package location
Key thing is that MCPForUnity/UnityMcpServer/src is still deleted
…ystem

- Removed PythonToolsAsset and file-based sync processor in favor of attribute-based tool discovery
- Implemented CustomToolRegistrationProcessor with automatic registration on startup and script reload
- Added registration enable/disable preference and force re-registration capability
- Implemented HTTP transport option with configurable URL/port alongside existing stdio mode
- Added cache management service with menu item to clear uvx package cache
- Updated config builder to generate transport-specific arguments and VSCode type field based on selected mode
- Replaced separate host/port arguments with single --http-url parameter for cleaner configuration
- Updated server to parse URL and allow individual host/port overrides when needed
- Consolidated HTTP client implementation with connection testing and tool execution support
…rt flag

- Replaced --enable-http-server flag with --transport choice parameter (stdio/http) for clearer intent
- Removed redundant HTTP port field from UI since HTTP mode uses the same URL/port as MCP client
- Simplified server startup logic by consolidating transport mode determination
- Changed HTTP mode to use URL-based configuration instead of command-line arguments
- Added proper cleanup of incompatible fields when switching between stdio and HTTP transports
- Moved uvx command parsing inside stdio-specific block to avoid unnecessary processing in HTTP mode
…sistency

The unity_instances resource was using force_refresh=False, which returned
cached instances (5-second cache). This caused a mismatch with set_active_instance
which uses force_refresh=True, leading to instances being shown in the resource
that no longer existed when trying to set them as active.

By changing to force_refresh=True, the resource now always shows current instances
that match what set_active_instance sees, fixing the instance switching issue.
@greptile-apps
Copy link

greptile-apps bot commented Nov 11, 2025

Skipped: This PR changes more files than the configured file change limit: (156 files found, 100 file limit)

@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

46 files out of 155 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/instance-discovery-cache-consistency

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.

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.

3 participants