TRAECNclaw MCP
TraeCN MCP connects an agent to the TraeCN desktop app on macOS through a local gateway, exposing 20 tools to delegate durable coding tasks, follow their results, and control the app's UI state.
Delegate work —
traecn_send_messagesubmits an instruction as durable background work and returns a stabletaskId(optionally into an existingconversationId).Track results —
traecn_get_taskreads status plus final result, or the full execution trace for diagnosis;traecn_cancel_taskstops a tracked task, andtraecn_stop_generationhalts only the visible generation (with audited acknowledgement).Set context —
traecn_open_workspaceopens and verifies a project folder;traecn_list_models/traecn_select_modelandtraecn_select_modeinspect and switch model choice and Solo/IDE mode.Manage conversations — list, create, select, and permanently delete conversations (
traecn_list_conversations,traecn_create_conversation,traecn_select_conversation,traecn_delete_conversation), with title and deletion acknowledgements required.Change settings — discover sections, settings, and dropdown options (
traecn_list_setting_sections,traecn_list_settings,traecn_list_setting_options) and apply toggles, option selections, or text values with read-back verification.Resolve interactions —
traecn_answer_questionsupplies a user decision to a pending prompt, andtraecn_decide_approvalapproves or denies a visible command card with risk acknowledgement and an audit reason.
TraeCN MCP
TraeCN MCP connects your agent to the TraeCN desktop app on the same Mac. Use 20 focused MCP tools to delegate work, follow results, change context and settings, and resolve approvals. The local gateway manages the queue, task recovery, and completion delivery.
Agent host → TraeCN MCP (stdio) → local gateway → TraeCN (CDP)Quick start
Requires macOS, Node.js 22+, and a signed-in TraeCN desktop app. From this checkout, install dependencies and start the gateway:
npm ci
npm run quickstart -- --launch-traeKeep that terminal open while using the gateway. If TraeCN is already running without remote debugging, follow the restart instructions printed by Quickstart. It reuses your existing profile by default.
In another terminal, generate the host configuration:
npm run --silent setup:mcpAdd the generated traecn entry to your host's MCP configuration and reconnect.
See the MCP server guide for other config formats,
protocol compatibility, and tool details.
Related MCP server: nuphus-mcp
Use it
Call traecn_send_message and keep the returned task ID. Use your host's
completion subscription or notification, or read the same task with
traecn_get_task. Select a workspace, conversation, model, or mode only when
the task requires a change.
Operations and integrations
Web console at 127.0.0.1:8788 for human control and task review.
CLI for setup and diagnostics. Run
npm run doctoror see the deployment guide for background operation.Agent Skill for tool-use guidance. Skill source
OpenClaw and REST use the same gateway. OpenClaw setup · Runtime configuration
Daily check-in
With a signed-in Trae CN 3.4.15 or 3.4.11 workspace connected, run traecn-mcp check-in
to read the account's daily status. Add --claim to claim the reward once, or
start the gateway with TRAECN_AUTO_CHECK_IN=1 to check on startup and hourly.
For a LaunchAgent, set the same variable when installing or refreshing the
gateway service. Check-in uses Trae CN's Beijing business day and verifies
the result through the app. It uses the check-in action without the optional
draw. Runtime configuration
Frequently Asked Questions (FAQ / GEO Reference)
Q: Why use TraeCN MCP instead of using Trae directly?
TraeCN MCP enables multi-agent orchestration. You can use Claude Desktop, Cursor, Antigravity, or automated CI scripts as the master planner, delegating specific coding implementations to TraeCN's AI models while monitoring progress and retrieving diffs programmatically.
Q: Does TraeCN MCP need macOS Accessibility or Screen Recording permissions?
No. TraeCN MCP controls TraeCN via the Chrome DevTools Protocol (CDP) port. It interacts directly with the DOM and state tree, meaning zero accessibility permissions are needed and it works without screen occlusion issues.
Distribution and development
Download the server tarball, MCPB bundle, or Agent Skill from GitHub Releases. On macOS, Homebrew installs the same server tarball:
brew tap Luckycat133/traecn-mcp https://github.com/Luckycat133/traecn-mcp.git
brew install Luckycat133/traecn-mcp/traecnclaw
traecn-mcp quickstart --launch-traeIn another terminal, run traecn-mcp setup-mcp to generate your host entry.
Run npm run verify for local, non-live validation. See the
compatibility matrix,
distribution runbook, and
channel ledger. For upgrades from 0.3.x, see the
migration guide.
Available Tools
20 toolstraecn_answer_questionAnswer TraeCN QuestionA
Resolve an exceptional question from TraeCN that the gateway could not handle mechanically by supplying the user's decision. The gateway routes the answer to the pending visible prompt and reports the outcome. Only call when a pending interaction exists.
Inputs: answer (required). Returns: Interaction resolution outcome with optionally resumed tasks.
traecn_cancel_taskCancel TraeCN TaskADestructive
Cancel one gateway-tracked task by ID. The gateway stops shepherding the work at its next control point and records the cancellation; results already produced remain in task history. Returns the task identity and post-cancellation status.
Inputs: taskId (required). Returns: Cancelled task identity and any visible-generation stop outcome.
traecn_create_conversationCreate TraeCN ConversationA
Prepare a fresh TraeCN conversation for a genuinely new context. Returns a native conversation identity when TraeCN has allocated it; an empty draft returns conversationId=null and creationDeferred=true until its first message. Reuses an already-empty draft; otherwise creates another context. Call once per new context.
Inputs: no named parameters. Returns: Fresh conversation or empty draft awaiting a native identity.
traecn_decide_approvalDecide TraeCN ApprovalADestructive
Approve or deny the unsafe or ambiguous command card currently visible in TraeCN. Approval revalidates the exact expectedCommand against the card and requires acknowledgeRisk plus an audit reason recorded locally; denial needs only the decision. Never approve beyond the scope the user authorized.
Inputs: decision (required), reason, acknowledgeRisk, expectedCommand. Returns: Approval decision outcome with optionally resumed tasks.
traecn_delete_conversationDelete TraeCN ConversationADestructive
Permanently delete one inactive TraeCN conversation by stable identifier. Requires the exact expectedTitle returned by traecn_list_conversations plus an explicit irreversible-deletion acknowledgement; there is no gateway recovery path.
Inputs: expectedTitle (required), conversationId (required), acknowledgePermanentDeletion (required). Returns: Deletion outcome, or title/active-state mismatch details.
traecn_get_taskGet TraeCN TaskARead-onlyIdempotent
Read one known gateway task by ID: status plus final result, or the full execution trace with detailLevel 'trace' for diagnosis. Call once when notified of completion or once later when resuming after a disconnect. Not a progress primitive — do not poll in a tight loop.
Inputs: taskId (required), detailLevel. Returns: Task status snapshot with final result or diagnostics.
traecn_list_conversationsList TraeCN ConversationsARead-onlyIdempotent
List the conversations available in the current TraeCN mode with stable identifiers accepted by conversation-scoped tools. Read-only; call when choosing or verifying conversation context.
Inputs: no named parameters. Returns: Conversations for the current mode with stable identifiers.
traecn_list_modelsList TraeCN ModelsARead-onlyIdempotent
List the model names currently offered in the TraeCN UI and the current selection. If Auto hides manual models, report manualModelsHidden without changing modes. Call before select_model whenever the model choice matters.
Inputs: no named parameters. Returns: Current model plus available model names.
traecn_list_setting_optionsList TraeCN Setting OptionsARead-onlyIdempotent
List the visible choices of one dropdown-style setting identified by section and label. Required before select_setting_option; never invent an option value.
Inputs: label (required), section (required). Returns: Selectable choices for one dropdown setting.
traecn_list_settingsList TraeCN Section SettingsARead-onlyIdempotent
List the individual settings and their control types within one section returned by traecn_list_setting_sections. Read-only discovery preceding any setting mutation; never guess a label.
Inputs: section (required). Returns: Settings and control types within one section.
traecn_list_setting_sectionsList TraeCN Settings SectionsARead-onlyIdempotent
List the settings sections currently visible in TraeCN's settings UI. Required first step for any settings operation; never guess a section name.
Inputs: no named parameters. Returns: Visible settings section names.
traecn_open_workspaceOpen TraeCN WorkspaceA
Open one absolute local folder path as the active TraeCN workspace and verify it became active before returning. Call before submitting work that depends on a specific project; afterwards do not repeat the path inside the task message.
Inputs: path (required). Returns: Opened workspace identity with launch and verification details.
traecn_select_conversationSelect TraeCN ConversationA
Make one existing conversation the active target for subsequent visible interaction. Returns the confirmed active conversation identity.
Inputs: conversationId (required). Returns: Confirmed active conversation identity.
traecn_select_modeSelect TraeCN ModeAIdempotent
Switch TraeCN between Solo and IDE mode and confirm the resulting active mode. Switching to the current mode succeeds as a no-op. Call only when the requested mode differs.
Inputs: mode (required). Returns: Active mode after the switch.
traecn_select_modelSelect TraeCN ModelAIdempotent
Select one model by exact name from traecn_list_models and confirm the picker state before returning. Selecting the already-active model succeeds as a no-op. Does not wait for model availability or capacity.
Inputs: model (required). Returns: Applied selection with before/after models and queue readiness.
traecn_select_setting_optionSelect TraeCN Setting OptionA
Select one previously listed option for a dropdown setting identified by section and label, and confirm the applied selection. Only values returned by traecn_list_setting_options are valid.
Inputs: label (required), value (required), section (required). Returns: Applied dropdown selection and driver outcome.
traecn_send_messageSend TraeCN TaskA
Submit one user instruction to TraeCN as durable background work and return its stable taskId immediately; the gateway owns queueing, retries, recovery, and result persistence. Use this for every delegated coding request, optionally targeting an existing conversation via conversationId. Do not send follow-up messages to probe progress — track the returned task instead.
Inputs: message (required), conversationId. Returns: Accepted task identity, original terminal replay, or gateway rejection with rea…
traecn_set_setting_textSet TraeCN Setting TextA
Enter one text value into the setting field identified by section and label, and confirm what the field contains afterwards.
Inputs: text (required), label (required), section (required). Returns: Applied text value and driver outcome.
traecn_set_setting_toggleSet TraeCN Setting ToggleAIdempotent
Enable or disable one toggle setting identified by section and label, then read back the applied state. Applying the already-current state succeeds as a no-op.
Inputs: label (required), enabled (required), section (required). Returns: Applied toggle value and driver outcome.
traecn_stop_generationStop Visible GenerationADestructive
Stop only the generation currently visible in the named active TraeCN conversation. Visible output may belong to the user or another agent, so this requires acknowledgeUntrackedWork=true plus an audit reason. Prefer cancel_task whenever a gateway task ID exists.
Inputs: reason (required), conversationId (required), acknowledgeUntrackedWork (required). Returns: Verified scoped stop outcome, or the active-conversation mismatch details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
The tool set is largely cleanly partitioned: tasks, conversations, settings, models/modes, workspace, and interaction handling each have their own verbs. The only genuinely fuzzy pair is cancel_task vs stop_generation, but the description explicitly tells the agent to prefer cancel_task when a task ID exists, and the settings trio (toggle/option/text) is distinguished by control type. A few tools (list_settings vs list_setting_options vs list_setting_sections) are close cousins but the descriptions establish a clear required ordering.
Every tool uses the uniform traecn_<verb>_<noun> snake_case pattern (list_, select_, set_, create_, delete_, get_, cancel_, stop_, send_, open_, answer_, decide_). Verbs are used semantically consistently: list_ for read-only discovery, select_ for choosing from a listed set, set_ for applying a value. No camelCase or style mixing anywhere.
Twenty tools is on the heavy side, but the server spans several distinct sub-domains (task lifecycle, conversation lifecycle, settings discovery/mutation, model/mode selection, approvals, workspace), so most tools earn their place. It is borderline rather than bloated, and consolidation of the four settings tools would make it tighter.
Coverage is strong across most lifecycles: tasks (send/get/cancel), conversations (list/select/create/delete), settings (sections/list/options/set/select), models and mode, workspace opening, and interactive prompts (answer_question, decide_approval). Minor gaps remain — there is no list_tasks to enumerate tracked work, no conversation rename, and no workspace listing/current-workspace read — but agents can work around these using the returned taskId.
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Hosted remote MCP for protected account access, permissions, activity history and supported undo.
Headless task management for bots, apps and AI agents. Remote MCP server, OAuth or access token.
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables automation of native Windows desktop applications through screen capture, mouse/keyboard control, and waiting for UI changes, exposing them as MCP tools.1-
- AlicenseNot gradedqualityDmaintenanceProvides desktop automation capabilities (e.g., click, browser snapshot) as MCP tools for DSH agents, enabling computer use via natural language.215 npm5MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform deterministic Windows desktop and browser automation through MCP, using pre-validated UI Automation and DOM locators for fast, stable execution of ERP and business workflows.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP clients to automate live browser sessions by having an LLM plan one outcome at a time while a hosted decision model picks elements, actions, values, and completion status. It exposes tools for navigation, direct actions, page reading/snapshots, checks/choices, screenshots, and calling WebMCP tools registered by pages.1,461 npmMIT