Union MCP
Connects to downstream Unity MCP servers over stdio or loopback Streamable HTTP, supporting multi-project Unity workflows so agents can drive Unity editor tooling through the Single fixed mcp action tool after reading the required MCP guide.
Click on "Deploy 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., "@Union MCP start a task context and list the files in my Downloads folder"
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.
Union MCP
A lightweight, native local Model Context Protocol (MCP) host that delivers mandatory rules before protected operations, maintains durable operation receipts across restarts, and connects local or web AI agents (ChatGPT, Gemini, Claude, Cursor, Codex) to your Windows machine without virtual OS layers or wrapper runtimes.
Security boundary: Union MCP executes with your native local OS user permissions. It is not an OS sandbox. Never expose its HTTP server directly to the public internet; always keep HTTP bound to 127.0.0.1 behind Cloudflare Tunnel and Cloudflare Access OAuth (or use OpenAI Secure MCP Tunnel over stdio). See SECURITY.md.
Setup with an AI Agent
If you use a coding agent (Claude Code, Codex, Cursor, Antigravity, etc.), paste this prompt to install, build, test, and configure Union MCP automatically using the concise agent runbook:
Read https://github.com/Evanlau1798/union-mcp/blob/main/docs/agent-setup.md (or docs/agent-setup.md after cloning) and follow it step by step to install, build, test, and configure Union MCP on this Windows machine. Stop and ask me before entering credentials, OAuth flows, domains, or optional provider paths.See docs/agent-setup.md for the complete agent runbook.
Related MCP server: rvn
Key Features
Document-First Reading Gate: Agents must open a task
contextand read all applicable core, project (AGENTS.md/AGENTS.override.md), and capability guides to EOF before protected file, process, or provider operations execute. Content is verified by SHA-256 hash on continuation and admission.Native Windows Execution without Wrappers: Runs directly on Node.js with native Windows drive/UNC paths, exact executable +
argvlaunches, discovered PowerShell/shell commands, interactivestdin, output spools, and owned process-tree cancellation. No WSL, Bash emulation, or Docker layer required.Durable Receipts and Deduplication: Side-effecting calls require a stable
operation_id, persist receipts with SQLite inter-process locks (node:sqlite), prevent silent replays ofunknownoutcomes, and support receipt inspection after host restarts.Fixed 22-Tool Interface: Exposes a predictable catalog of 9 read-only tools and 13 action tools covering files, native processes, skills, downstream MCP servers (stdio and loopback Streamable HTTP, including multi-project Unity workflows), Codex sessions, Ego Browser, Desktop automation, and read-only Antigravity history.
Local stdio and Authenticated Remote HTTP: Works out of the box over
stdiofor local MCP clients and OpenAI Secure MCP Tunnel, or as a loopback-only stateless Streamable HTTP server (POST /mcp) protected by Cloudflare Access RS256 JWT verification for Gemini Web.Duplicate-Safe Windows Logon Autostart: Includes native PowerShell Task Scheduler scripts that start only missing services using cross-session mutexes, exact executable/argument identity checks, process-tree port verification, and Windows DPAPI token decryption.
Architecture
flowchart LR
subgraph Clients["MCP Clients"]
Local["Local MCP Clients (Claude / Cursor / Codex)"]
ChatGPT["ChatGPT Web"]
Gemini["Gemini Web"]
end
subgraph Transports["Secure Transports"]
Stdio["Local stdio"]
OpenAITunnel["OpenAI Secure MCP Tunnel (stdio)"]
CFTunnel["Cloudflare Tunnel + Access OAuth (RS256 JWT)"]
end
subgraph Host["Union MCP Host (Node.js)"]
Gate["Document-First Gate + Context Store"]
Store["Durable Receipts + SQLite Lock + Output Spool"]
end
subgraph Capabilities["Built-in & Optional Providers"]
Native["Files, Search, Run, Jobs, Skills"]
Downstream["Downstream MCP (stdio / loopback HTTP)"]
History["Antigravity Read-Only History"]
Optional["Optional: Codex, Ego Browser, agent-desktop / cua-driver"]
end
Local --> Stdio --> Gate
ChatGPT --> OpenAITunnel --> Gate
Gemini --> CFTunnel --> Gate
Gate <--> Store
Gate --> Native
Gate --> Downstream
Gate --> History
Gate --> OptionalQuick Start (Local stdio)
Prerequisites
OS: Windows 10 or Windows 11 (primary tested platform; non-Windows environments are unverified)
Node.js:
^22.13.0or>=23.4.0(required for unflagged built-innode:sqlite; Node 20 is not supported)
1. Clone, Install, Build, and Test
Run in native PowerShell:
git clone https://github.com/Evanlau1798/union-mcp.git
cd union-mcp
npm.cmd ci --ignore-scripts --no-audit --no-fund
npm.cmd run typecheck
npm.cmd run build
npm.cmd test2. Configure Your MCP Client
Point your MCP client at the compiled dist\server.js using exact absolute paths (template: examples/mcp-client.example.json):
{
"mcpServers": {
"union-mcp": {
"command": "C:\\Program Files\\nodejs\\node.exe",
"args": ["C:\\path\\to\\union-mcp\\dist\\server.js"]
}
}
}Runningnode dist\server.js directly without UNION_MCP_HTTP_CONFIG starts the stdio MCP server and waits for JSON-RPC messages on stdin. It is not an interactive CLI shell. stdout carries protocol frames only; diagnostics are written to stderr.
3. Verify with a Read-Only Prompt
Once connected in your MCP client, send this verification prompt (replace the path with your local repository path):
Verify the Union MCP connection using read-only operations only:
1. Call context(action="open", cwd="C:/path/to/union-mcp", task="Read-only setup check").
2. Read every document in required_documents to EOF using read and following next_cursor.
3. Read C:/path/to/union-mcp/package.json and report its package name, version, and full snapshot SHA-256.
4. Call task_close to close this context and report context_id, closed, and owned_jobs.
Do not run commands, edit files, or access desktop/browser tools.A valid verification returns a real context_id, the parsed package fields with a SHA-256 digest, and closed: true.
Tool Catalog (22 Fixed Tools)
Union MCP exposes a fixed catalog (catalog_revision: union-mcp-0.7.0). Optional external providers stay cleanly disabled until their paired environment variables are configured.
Category | Tools | Access | Required Guide(s) | Notes |
Context & Gate |
| Mixed |
| Opens task scope, delivers documents/files via cursors, releases snapshots and owned providers |
Discovery & Skills |
| Read-only |
| Inspects tool schemas, local/configured skill catalogs, and imported MCP previews without spawning providers |
Native Files |
| Read / Write |
| UTF-8 search and atomic writes/edits with |
Native Processes |
| Action |
| Runs exact executables or discovered shells ( |
Downstream MCP |
| Action |
| Previews JSON/TOML configs safely; connects stdio or loopback Streamable HTTP servers (including multi-project Unity) |
Codex Sessions |
| Read / Action |
| Optional; inspects and controls existing Codex Desktop and Windows daemon threads without auto-compaction |
Browser |
| Action |
| Optional; runs scoped JavaScript in an explicit Ego Browser TaskSpace after reading the installed Ego guide |
Desktop / CUA |
| Action |
| Optional; pinned |
Antigravity History |
| Read-only |
| Reads persisted SQLite WAL public messages across |
Full tool contracts, capacity limits, and protocol details are documented in docs/tools-and-architecture.md.
Remote Web Access (ChatGPT & Gemini)
Union MCP supports both major web agent platforms with distinct private transport models:
Surface | Recommended Transport | Local Mode | Setup Guide |
ChatGPT Web | OpenAI Secure MCP Tunnel |
| |
Gemini Web | Cloudflare Tunnel + Cloudflare Access OAuth | Loopback HTTP ( |
Both remote backends can be started automatically at Windows user logon using docs/autostart.md.
Documentation
Document | Description |
Concise, staged setup runbook designed for AI agents with strict credential guardrails | |
Complete environment variable reference, local MCP client setup, Skills, and optional providers | |
From-scratch setup for ChatGPT Web (OpenAI Tunnel) and Gemini Web (Cloudflare Tunnel + Access), verification prompts, and known platform limits | |
Windows Task Scheduler logon autostart, duplicate-safe service startup, and DPAPI token protection | |
Detailed 22-tool reference, document-first gate lifecycle, durable receipts, output spool, and capacity limits | |
Error code reference, remote connection debugging, schema sync, and provider troubleshooting | |
Sanitized configuration templates for MCP clients, HTTP mode, Skill sources, launchers, and Windows autostart | |
Trust boundaries, authentication design, and vulnerability reporting | |
Development workflow, coding standards, and pull request checklist |
Development
npm.cmd run typecheck # Strict TypeScript type checking
npm.cmd run build # Compile TypeScript to dist/
npm.cmd test # Run full test suite (node:test)License
Licensed under the MIT License.
Available Tools
22 toolsantigravity_listBRead-only
Search and page the local Antigravity app/ide/cli history index after reading guide:antigravity. Reads persisted SQLite snapshots only; does not contact, start, resume or stop Antigravity. Sources remain separate; returned state is not live execution status.
Inputs: context_id (required), limit, query, offset, +1 more.
antigravity_readARead-only
Read only persisted public user/assistant text from one exact Antigravity conversation and source after reading guide:antigravity. Page newest steps with before_step; complete a long message using its next_action before moving to older steps. Excludes thinking, configurations and raw tool output. No session control or app/RPC connection.
Inputs: context_id (required), conversation_id (required), limit, source, +4 more.
antigravity_statusARead-only
Read persisted Antigravity metadata for an exact conversation_id and source after reading guide:antigravity. is_live=false and state=unknown; saved run status never proves current execution or termination. Does not wake an app, session or model.
Inputs: context_id (required), conversation_id (required), source.
browser_useADestructive
Acquire the installed Ego Browser guide or execute user-authorized JavaScript through the supported task/Page API on one explicit TaskSpace. Browser work can read signed-in pages, navigate, fill forms, click, upload/download files, capture images and submit changes to remote services. Requires the installed guide, exact provider identity and operation ID. Native programs use run; browser source is limited to the supported TaskSpace interface.
codex_listCRead-only
List bounded candidates from the existing Codex backend. Use offsets for Desktop or the native cursor for the daemon.
Inputs: context_id (required), limit, cursor, offset, +1 more.
codex_readCRead-only
Read public messages and subagent IDs from the exact local thread with native history cursors.
Inputs: thread_id (required), context_id (required), cursor, turn_id, +7 more.
codex_resumeBDestructive
Resume one verified existing Codex agent thread with a user-authorized message and a stable operation ID. This can continue autonomous agent work with filesystem, process or external-service effects under that thread permissions. Uses the original thread and delivery receipt; does not create a replacement conversation.
Inputs: message (required), thread_id (required), context_id (required), operation_id (required), +4 more.
codex_sendADestructive
Send a user-authorized message to one verified existing Codex agent thread and return its durable delivery receipt. The message can start or steer agent work with filesystem, process or external-service effects under that thread permissions. An accepted receipt is not completion; preserve the original operation ID when checking an unknown outcome.
Inputs: message (required), thread_id (required), context_id (required), operation_id (required), +4 more.
codex_statusBRead-only
Read the exact thread identity and last native turn from an existing Codex backend without waking it.
Inputs: thread_id (required), context_id (required), execution_backend, backend_instance_id.
codex_stopCDestructive
Request native user-stop for one verified Codex thread. Requires the current exact target and user authorization.
Inputs: thread_id (required), context_id (required), operation_id (required), expected_title (required), +3 more.
codex_watchC
Start an owned observation job for one exact native Codex turn. Canceling the watch only stops observing.
Inputs: thread_id (required), context_id (required), operation_id (required), expected_title (required), +5 more.
computer_useADestructive
Acquire only the selected desktop provider guide; list apps/windows, wait or capture a window in som/vision/ax mode (compact elements by default, detail:full for the tree); or click/double_click/right_click/middle_click, drag, scroll, type, set_value, key, focus_app or set_window_frame on an exact window observation. set_window_frame uses desktop coordinates from capture.window_frame (visible frame), which can differ from window.bounds (outer frame). Input can modify application data or trigger external actions. Background and foreground delivery are explicit. Background AX clicks are supported by the supplemental provider; background pixel gestures are refused before dispatch. set_value uses native units; Slider postcondition reports independent native RangeValue readback separately from uncertain delivery. Requires exact provider identity, current observation and operation ID for input.
contextB
Open, inspect, or refresh a task in the native host. Read every required document with read before file or execution operations. Does not launch providers or version probes.
discoverBRead-only
Inspect local tool metadata, schemas, skill metadata catalog, or imported/connected MCP server previews without launching providers or executing commands.
Inputs: kind (required), context_id (required), id, query, +1 more.
editADestructive
Apply an exact UTF-8 text replacement to an existing file within declared scope using a stable operation_id and optional expected_sha256 check.
Inputs: path (required), context_id (required), new_string (required), old_string (required), +3 more.
jobADestructive
Inspect a durable job receipt, read immutable spooled output, cancel owned work, or send gated stdin input to an interactive process. Status/read are observational; cancel can terminate an owned process tree, and input can trigger arbitrary actions in that program. Canceling a watch only ends observation. Use the original job_id or operation_id after an unknown result.
mcpADestructive
Preview MCP configuration without execution; connect, refresh or close configured downstream MCP servers; call their tools, read resources or get prompts. Connections can start configured server processes. Downstream tool calls can modify local files, Unity projects, applications or remote services and follow the acquired downstream schema. Requires exact server_id, instance_id, project and catalog_revision binding plus the applicable guides and server instructions.
readCRead-only
Read a manifest document completely using its returned cursor, or read a native UTF-8 file after all applicable rules were delivered. File cursors cannot be combined with offset/limit.
runADestructive
Execute a user-authorized native program (exact executable + argv) or discovered shell command (shell_id), with native OS permissions and possible filesystem, process and network effects. Supports oneshot, interactive and service lifetimes. Read core, project rules and guide:native-exec first. Requires a stable operation_id; query the original receipt after an unknown outcome instead of resending.
Inputs: execution (required), context_id (required), operation_id (required), cwd, +6 more.
searchCRead-only
Search native file names or UTF-8 file contents within the declared context scope after all applicable rules were delivered.
Inputs: pattern (required), context_id (required), mode, path, +2 more.
task_closeADestructive
Close this context and release its in-memory snapshots and observations. owned_jobs=retain preserves owned jobs; owned_jobs=cancel requests cancellation of owned work and can terminate owned process trees. Does not delete user files. Inspect each returned disposition; cancel_requested does not mean termination was observed.
Inputs: context_id (required), owned_jobs.
writeCDestructive
Atomically write a UTF-8 file within declared scope using a stable operation_id for durable deduplication and optional expected_sha256 conflict protection.
Inputs: path (required), content (required), context_id (required), operation_id (required), +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools target clearly distinct surfaces: core files, execution, MCP, browser/computer use, and prefixed Antigravity/Codex backends. The only notable overlap is codex_send versus codex_resume, both of which message an existing Codex thread, though the descriptions help distinguish them.
There are recognizable subsystem prefixes such as antigravity_* and codex_*, but the overall set mixes bare verbs (read, search, run), noun-only names (job, mcp, context), and noun_verb names (task_close, browser_use, computer_use). It remains readable, but the convention is not predictable across the server.
At 22 tools this is a heavy surface, falling into the borderline 16–25 range. The broad local-orchestration scope explains some size, but the many Codex/Antigravity-specific tools could likely be consolidated without losing coverage.
The set covers core file operations, execution/job handling, MCP, browser/computer use, context/task lifecycle, and multiple agent backends. There are minor gaps such as no dedicated file delete or new Codex-thread creation, but native execution can work around some file-management omissions.
Maintenance
Related MCP Connectors
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Let AI see and use your own Windows PC with your permission: screen, apps, mouse and keyboard.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to seamlessly integrate with the Windows operating system, performing tasks such as file navigation, application control, UI interaction, and QA testing via the MCP protocol.-
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to securely control and interact with a local Windows machine through 218 configurable tools for files, Git, processes, Windows UI, browser automation, WSL, Office, recovery, skills, and child MCP servers.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to control and interact with a local Windows computer through authenticated MCP tools, including file operations, shell commands, process management, HTTP requests, and system/media inspection.-
- AlicenseNot gradedqualityBmaintenanceEnables MCP-capable AI assistants to control a Windows computer through GUI automation, file and process operations, PowerShell commands, durable background jobs, and binary file transfer with downloadable exports.MIT