跪拜 Guibai
← All articles
Frontend · AI Programming · Uni-app

Open Wot 1.0.5 Replaces MCP Config Guessing with Two Commands

By 不如摸鱼去 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

AI coding tools are only as good as the component knowledge they can reach, and the friction of wiring up MCP servers across different editors has become the new bottleneck. Open Wot 1.0.5 treats integration as a diagnosable, reversible operation rather than a one-shot config dump, which matters for any team that wants AI-generated UI code to use real, version-aligned component APIs instead of hallucinated props.

Summary

The release adds `wot agent init` and `wot agent doctor` commands that write MCP server configs, install a component-selection Skill, and inject project-level instructions so AI coding agents query real component APIs before generating code. It supports Cursor, Claude Code, VS Code, and Codex out of the box, with a unified `--client` flag replacing four different config formats.

A `doctor` command goes beyond checking that files were written: it performs a live MCP handshake, confirms the eight wot-ui tools are present, and reports client-side registration status where possible. The CLI defaults to `npx`-based commands to avoid PATH mismatches between terminals and desktop apps, and all file modifications run through a ChangePlan with dry-run support, idempotent writes, and atomic rollbacks.

MCP tool responses are now summary-first, returning only names and descriptions until an agent explicitly requests full props or demo source code. A separate `starter-cleaner` Skill strips wot-starter v2 templates down to a minimal project while keeping the UI and charting dependencies intact.

Takeaways
Two commands — `wot agent init --client <id>` and `wot agent doctor --client <id>` — handle the full AI integration for wot-ui across Cursor, Claude Code, VS Code, and Codex.
`init` writes MCP server config, installs a `wot-ui-v2` Skill, and adds Agent Instructions that tell the AI to query component knowledge before generating code.
`doctor` performs a live MCP handshake to confirm the server starts and all eight tools are present, rather than trusting that a written config file means success.
Auto-configuration defaults to `npx`-based commands to avoid PATH mismatches between terminal environments and desktop AI clients.
All file modifications go through a ChangePlan with dry-run, interactive confirmation, idempotent writes, atomic replacement, and automatic rollback on failure.
MCP tool responses are now summary-first: `wot_list` returns only names and descriptions, and full props or demo source code require a second explicit query.
A `starter-cleaner` Skill strips wot-starter v2 templates down to a minimal project while preserving Wot UI, uni-echarts, and echarts.
The release spans 89 files, 19,741 lines added, with 177 passing tests covering JSONC/TOML modification, rollbacks, and MCP handshake scenarios.
Conclusions

Manual MCP configuration has quietly become the new "works on my machine" problem for AI coding — the toolchain is ready, but wiring it into each editor's idiosyncratic config format and scope rules is where developers burn time.

Defaulting to `npx` for MCP server commands is a pragmatic trade-off: it adds a cold-start delay but eliminates an entire class of PATH-related support issues that desktop apps inherit from their launch environment.

The combination of MCP (data), Skill (query strategy), and Instructions (behavioral habit) acknowledges that feeding AI accurate component knowledge requires solving three distinct problems, not just dumping a JSON schema into a config file.

Treating configuration as a lifecycle with init, status, doctor, and remove commands — plus atomic writes and rollbacks — raises the bar for CLI tools that modify project files, especially when those files are also hand-edited by developers.

Concepts & terms
MCP (Model Context Protocol)
An open protocol that lets AI coding clients connect to external servers for tools and data. An MCP server for a component library can provide real-time API lookups so the AI queries actual props instead of guessing.
Agent Instructions
Project-level directives (often in AGENTS.md) that tell an AI coding agent to follow specific workflows, such as "query component knowledge before generating any frontend code."
ChangePlan
A pre-execution summary of every file and field a CLI tool intends to modify, shown to the user for confirmation before any writes happen. Open Wot 1.0.5 uses this to make automated config changes auditable.
JSONC
JSON with Comments — a relaxed JSON format that allows trailing commas and inline comments. Used by VS Code and Cursor for their MCP configuration files, so tools that modify them must preserve existing comments and structure.
From the discussion
Featured comments
集成显卡

Great UI library. It would be even better if it weren't limited to running on uni-app.

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗