feat: add built-in MCP server - #136
Open
LibraHp wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a native MCP server directly inside CinematicUnityExplorer.
The MCP server is implemented entirely in C# and runs inside the game process. It does not require Node.js, an
external bridge process, or any additional runtime dependency.
The implementation supports both legacy SSE and Streamable HTTP transports, selectable from the in-game MCP settings
panel.
Preview
Changes
Built-in MCP server
src/MCP/.initializenotifications/initializedpingtools/listtools/callRuntime game-control tools
Add MCP tools for:
IL2CPP compatibility
wrapper type.
System.Collections.Generic.List<T>into IL2CPP Unity APIs whereIl2CppSystem.Collections.Generic.List<T>is required.HTTP transports
MCP settings UI
Add a scrollable MCP settings panel with the same visual style as the other CUE panels.
The panel provides controls for:
The UI also displays runtime status and generates client configuration information for Agent/MCP clients.
Documentation
Add:
docs/MCP.mddocs/MCP_SECURITY.mdThe documentation describes:
Security considerations
The MCP server is disabled by default and binds to
127.0.0.1by default.Mutation and dangerous operations are protected by runtime checks:
Users should only enable write access for trusted local MCP clients and should use a recoverable test save.
Compatibility
The implementation is intended to support:
The MCP transport and runtime code does not depend on Node.js or an external process.
Testing
Dropdown.OptionDataentries, which avoids the IL2CPPList<T>type mismatch.mcp-server/Node.js adapter are not part of this PR.