Context
We are planning to upgrade the current UMG MCP (Model Context Protocol) implementation to use the Gemini CLI Skills architecture. This represents a shift from a generic protocol adapter to a native integration with the Gemini CLI.
MCP vs. Skills: A Technical Comparison
Current Approach: MCP (Model Context Protocol)
- Architecture: Client-Server. The Python script runs a standalone server (HTTP/Stdio) that listens for JSON-RPC messages.
- Workflow: User -> Gemini CLI -> MCP Client -> Network/Pipe -> UMG MCP Server (Python) -> UE5.
- Pros: Standardized, client-agnostic.
- Cons: Requires managing a server process, serialization overhead, and connection handling.
Target Approach: Gemini CLI Skill
- Architecture: Native Plugin/Module. The Python logic is loaded or registered directly by the Gemini CLI runtime.
- Workflow: User -> Gemini CLI (Native Function Call) -> Direct Python Call -> UE5.
- Pros: Tighter integration, state persistence is easier to manage within the session, simplified architecture (no separate server loop needed).
- Cons: Specific to Gemini CLI environment.
Proposed Changes
We aim to keep the modification strict to the Python layer, preserving the C++ plugin as-is.
1. Python Layer (Major Changes)
We need to refactor \Resources/Python/.
- Decouple Logic: Ensure existing logic in \UmgMcpServer.py\ and subsystems (Widget, Animation, etc.) is separated from the MCP server boilerplate.
- Skill Wrapper: Create a new entry point (e.g., \UmgMcpSkill.py) that exposes the core functionalities as importable, annotated functions that Gemini CLI can recognize as tools/skills.
- Configuration: Update \mcp_config.py\ or equivalent to support Skill registration parameters.
2. C++ Layer (No Changes Expected)
- The C++ plugin (\Source/UmgMcp/) acts as the command receiver/executor inside Unreal Engine.
- As long as the Python script communicates with UE5 (via the existing socket/bridge mechanism) using the same payload format, no C++ changes are required.
Verification Plan
- Create a prototype Skill definition.
- Verify communication with the running UE5 Editor.
- Compare latency and usability against the old MCP implementation.
Context
We are planning to upgrade the current UMG MCP (Model Context Protocol) implementation to use the Gemini CLI Skills architecture. This represents a shift from a generic protocol adapter to a native integration with the Gemini CLI.
MCP vs. Skills: A Technical Comparison
Current Approach: MCP (Model Context Protocol)
Target Approach: Gemini CLI Skill
Proposed Changes
We aim to keep the modification strict to the Python layer, preserving the C++ plugin as-is.
1. Python Layer (Major Changes)
We need to refactor \Resources/Python/.
2. C++ Layer (No Changes Expected)
Verification Plan