ach-mcp
An in-editor MCP server that exposes Unity convenience tools to AI assistants, allowing them to read console logs, execute menu items, dump scene hierarchies, and take screenshots.
README
Ach MCP
An in-editor MCP (Model Context Protocol) server that exposes Unity convenience tools to AI assistants such as Claude. The server runs entirely inside the Unity Editor in C# (no separate process, no external bridge) and speaks MCP over HTTP.
Tools
| Tool | What it does |
|---|---|
get_console_logs |
Read Console entries — Debug logs, warnings, errors, and script compile errors. Filterable by severity. Closes the "did my change work?" loop. |
execute_menu_item |
Run any Editor menu item by path (e.g. GameObject/Create Empty, Assets/Refresh). One tool that unlocks most built-in and custom actions. |
get_scene_hierarchy |
Dump the GameObject tree of the open scene(s) as JSON — names, active state, tag, layer, and component types. |
take_screenshot |
Render the Game or Scene view camera to a PNG and return it inline. Lets the assistant see the result. |
Requirements
- Unity 2021.3+
com.unity.nuget.newtonsoft-json(declared as a package dependency, installed automatically)
Installation
Add the package to your project's Packages/manifest.json:
{
"dependencies": {
"com.achieveone.ach-mcp": "https://github.com/achieveonepark/ach-mcp.git"
}
}
Or use Window ▸ Package Manager ▸ + ▸ Add package from git URL and paste the repository URL.
Usage
- Open Tools ▸ Ach MCP ▸ Control Panel.
- Set a Port (default
8790) and click Start. Enable Auto-start on load to have it come up with the editor. - In the AI Client Setup section, click Configure next to a client (or Configure Detected to do all installed ones at once). Restart the client.
Once connected, ask the assistant to call the tools, e.g. "check the Unity console for errors", "show me the scene hierarchy", or "take a screenshot of the game view."
One-click client setup
The control panel writes this server into each client's config file, resolving
the correct location for macOS / Windows / Linux automatically. Existing
configs are merged (your other servers are preserved) and backed up once as
*.ach-mcp.bak before the first change.
| Client | Transport | Config file |
|---|---|---|
| Claude Code | HTTP (native) | ~/.claude.json |
| Claude Desktop | stdio via mcp-remote |
macOS ~/Library/Application Support/Claude/… · Windows %APPDATA%\Claude\… · Linux ~/.config/Claude/… |
| Codex CLI | stdio via mcp-remote |
~/.codex/config.toml |
| Cursor | HTTP (native) | ~/.cursor/mcp.json |
| Windsurf | HTTP (native) | ~/.codeium/windsurf/mcp_config.json |
Clients that don't support HTTP MCP directly are bridged through
mcp-remote, invoked as
npx -y mcp-remote <url>. Those rows are marked "mcp-remote" and require
Node.js (npx) on your PATH.
Manual configuration
If you'd rather edit config by hand, the server is a standard Streamable-HTTP MCP endpoint:
http://127.0.0.1:8790/mcp
Native-HTTP client (Claude Code, Cursor, …):
{ "mcpServers": { "ach-unity": { "type": "http", "url": "http://127.0.0.1:8790/mcp" } } }
stdio-only client (Claude Desktop, Codex):
{ "mcpServers": { "ach-unity": { "command": "npx", "args": ["-y", "mcp-remote", "http://127.0.0.1:8790/mcp"] } } }
How it works
- Transport — a loopback
HttpListener(127.0.0.1, so no admin/urlacl is needed) accepts JSON-RPC 2.0 POSTs at/mcpand returns a single JSON response (Streamable HTTP). - Threading — HTTP requests are served on background threads; every tool
marshals its Unity API calls onto the main thread via
MainThreadDispatcher. - Lifecycle —
McpServerManagerstops the listener before every domain reload and on editor quit, so the port is always released.
Adding your own tool
- Implement
IMcpToolinEditor/Tools/. - Declare
Name,Description, and anInputSchema(JSON Schema). - Register it in
ToolRegistry's static constructor.
internal sealed class MyTool : IMcpTool
{
public string Name => "my_tool";
public string Description => "What it does.";
public JObject InputSchema => new JObject { ["type"] = "object" };
public ToolResult Execute(JObject arguments)
{
var value = MainThreadDispatcher.Run(() => /* Unity API here */ 42);
return ToolResult.Ok("Result: " + value);
}
}
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。