Unity UIToolkit MCP Server
Provides tools for accessing Unity UIToolkit documentation, code examples, and conversion from HTML/CSS to UXML/USS to assist with Unity UI development.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Unity UIToolkit MCP Serverconvert this CSS to USS for a button style"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Unity UIToolkit MCP Server
A Vibe Coded Model Context Protocol (MCP) server that provides LLM agents with access to Unity UIToolkit documentation, code examples, and conversion tools for migrating HTML/CSS to UXML/USS.
Features
This MCP server provides the following tools for working with Unity UIToolkit:
Pre-rendered Documentation (Recommended)
list_prerendered_docs: Lists all available pre-rendered Markdown documentation
read_prerendered_docs: Reads clean, LLM-friendly Markdown documentation converted from Unity's HTML docs
Note: Pre-rendered documentation is automatically fetched and converted weekly via GitHub Actions using markitdown. This provides faster access, better LLM digestibility, and eliminates runtime dependencies on external sites.
Legacy Documentation Tools
get_uitoolkit_documentation: Provides Unity UIToolkit documentation reference with links and examples for specific topics (UXML, USS, VisualElement, etc.)
get_unity_script_reference: Access Unity Script API reference documentation for UIToolkit classes and methods
list_uitoolkit_components: List available UIToolkit components and controls by category
Code Examples
get_uitoolkit_code_example: Provides common Unity UIToolkit code example patterns with links to Unity's official examples repository
fetch_unity_example_code: Fetches actual source code from Unity's UI Toolkit examples repository. Use this to retrieve implementation samples referenced in documentation (e.g., from
<code source="..."/>tags)
Conversion Tools
convert_html_to_uxml: Convert HTML markup to UXML format with guidance and best practices
convert_css_to_uss: Convert CSS styles to USS (Unity Style Sheets) format with property mappings
Related MCP server: Unity MCP Server
Documentation Pre-rendering
Unity UIToolkit documentation is automatically fetched and converted to Markdown:
Schedule: Weekly on Mondays at 00:00 UTC
Trigger: Can be manually triggered via GitHub Actions
Process:
Fetches latest Unity UIToolkit HTML documentation
Filters to UIToolkit-related pages only
Converts to clean Markdown using markitdown
Commits to
docs/directory
See .github/workflows/update-unity-docs.yml for implementation details.
Installation
npm install
npm run buildUsage
This MCP server uses the stdio transport and can be integrated with any MCP-compatible client.
Configuration
Add to your MCP client configuration (e.g., Claude Desktop config):
{
"mcpServers": {
"uitoolkit": {
"command": "node",
"args": ["/path/to/UIToolkitMCP/dist/index.js"]
}
}
}Or use npx:
{
"mcpServers": {
"uitoolkit": {
"command": "npx",
"args": ["uitoolkit-mcp-server"]
}
}
}Available Tools
1. list_prerendered_docs
Lists all available pre-rendered documentation files.
Parameters: None
Example:
{}2. read_prerendered_docs
Reads pre-rendered Markdown documentation.
Parameters:
doc_type(string): Either "manual" or "script-api"doc_name(string): Name of the documentation file (e.g., "UXML", "UIElements_VisualElement")
Example:
{
"doc_type": "manual",
"doc_name": "UXML"
}3. get_uitoolkit_documentation
Retrieves Unity UIToolkit documentation for specific topics.
Parameters:
topic(string): The UIToolkit topic to search for (e.g., "UXML", "USS", "VisualElement")
Example:
{
"topic": "UXML"
}4. get_uitoolkit_code_example
Provides common Unity UIToolkit code example patterns with links to Unity's official repository.
Parameters:
example_name(string): Name or path of the example (e.g., "simple-list-view", "custom-control")
Example:
{
"example_name": "simple-list-view"
}5. fetch_unity_example_code
Fetches actual source code from Unity's UI Toolkit examples repository. This is particularly useful when you encounter <code source="..."/> tags in the script-api documentation and want to see the actual implementation.
Parameters:
file_path(string): Path to the code file (e.g., "Button_clicked.cs" or "Modules/UIElements/Tests/UIElementsExamples/Assets/Examples/Button_clicked.cs")
Example:
{
"file_path": "Button_clicked.cs"
}Note: The tool will automatically search multiple Unity repositories to find the code:
Unity's public UI Toolkit manual code examples repository
Unity's C# Reference repository (for internal test examples)
6. get_unity_script_reference
Retrieves Unity Script API reference for UIToolkit classes.
Parameters:
class_name(string): The Unity class name (e.g., "VisualElement", "ListView", "Button")
Example:
{
"class_name": "ListView"
}7. convert_html_to_uxml
Provides guidance for converting HTML to UXML.
Parameters:
html_snippet(string): HTML code to convert
Example:
{
"html_snippet": "<div class='container'><button>Click Me</button></div>"
}8. convert_css_to_uss
Provides guidance for converting CSS to USS.
Parameters:
css_snippet(string): CSS code to convert
Example:
{
"css_snippet": ".button { background-color: blue; padding: 10px; }"
}9. list_uitoolkit_components
Lists available UIToolkit components.
Parameters:
category(string, optional): Filter by category ("containers", "controls", "data-bound", "advanced")
Example:
{
"category": "controls"
}Resources
Development
Build
npm run buildWatch Mode
npm run watchLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables AI agents to query and control the Unity Editor, supporting scene management, GameObject manipulation, asset browsing, play mode control, and real-time editor operations through 52+ tools.1MIT
- FlicenseBqualityBmaintenanceProvides AI assistants with structured access to Unity project metadata, build settings, and agent documentation directly from the filesystem. It enables querying project details and scene configurations without requiring the Unity Editor to be running.1003982
- AlicenseBqualityAmaintenanceProvides AI assistants with comprehensive control over Unity Hub and Unity Editor through over 200 specialized tools for project management and scene manipulation. It enables users to perform complex tasks like script creation, asset management, and project builds using natural language commands.80271366Inno Setup
- Alicense-quality-maintenanceExposes Unity Editor project context and manipulation tools to AI coding agents, enabling automated scene hierarchy analysis, script inspection, and asset management. It supports both read and write operations including GameObject editing, component configuration, and animation authoring within the Unity environment.2
Related MCP Connectors
UI design from prompts, screenshots, and URLs for AI coding agents and theme tokens.
Give your agent live data from Twitter, Reddit, the web and GitHub. No API keys, no scraping stack.
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MarzLars/UIToolkitMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server