WinCode
WinCode is a local MCP server for Windows/.NET that lets an AI coding agent analyze projects/code and inspect or act on running desktop UIs.
Open and summarize a workspace: project type, solution, languages, git status, metadata, file tree.
Analyze architecture, project references, layers, and entry points.
Prepare focused, bounded code-context snapshots for an agent task.
Browse directories, search literal text, outline files, and locate symbols/references.
Assess change impact/risk and plan safe refactorings.
Diagnose Windows/.NET SDK and project prerequisites.
Safely move obsolete files to a project trash area.
Inspect Windows UIA control trees/states without focusing the window and correlate controls to candidate XAML/C# source.
Perform guarded UIA actions: click/toggle/select, expand/collapse, set value, and declared background WPF shortcuts.
Check connectivity/health; optional Roslyn, Repomix, dynamic-workspace and other advanced modes are available.
Provides tools for analyzing .NET project and solution structure, searching code symbols and references, preparing scoped code context, planning refactorings, and correlating running Windows desktop UI controls with XAML source declarations.
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., "@WinCode What's the blast radius if I rename GetUserById in UserRepository.cs?"
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.
WinCode
English
WinCode is a local Model Context Protocol (MCP) server for AI coding agents on Windows. It combines Windows UI Automation (UIA), source navigation, and .NET project analysis in a single connection, allowing an agent to inspect a running desktop application and examine its codebase together.
Features
Background UI inspection: Read control trees, properties, and states from a running application without activating its window or stealing keyboard focus, so you can keep working in other windows.
Text-only LLM friendly: Control names, hierarchy, and states are returned as structured JSON. Models without vision input (such as text-only DeepSeek configurations) can inspect desktop UIs; screenshots are optional.
UI-to-source correlation: Inspect a live control, locate candidate XAML declarations and related C# code, and read the relevant lines with file paths, line numbers, and content hashes.
Targeted, bounded reads: Scope UI queries to an observed parent path or control selector, and read specific source line ranges or declarations to keep context payloads small.
Project and code analysis: Inspect
.sln/.csprojproject graphs, search literal text and symbols, read file outlines, and evaluate change impact. Built-in text analysis works out of the box; optional Roslyn integration adds compiler-backed C# symbol and reference resolution.Guarded semantic UI actions: Act on uniquely matched enabled controls via UIA patterns (
click,set_expanded,type/setValue, and opt-in bound WPF shortcuts)—never coordinate mouse simulation. Disabled controls, ambiguous or incomplete matches, read-only values, and unconfirmed focus are rejected.
Quick start
Prerequisites: Windows x64 (Windows 11 x64 baseline), Git >=2.36, Node.js >=22 (24 recommended, 22 supported), and .NET SDK 10.0.303 (pinned in global.json with rollForward: "disable"). The published UI helper and optional Tray require the .NET 10 Windows Desktop runtime.
1. Build and verify
git clone https://github.com/linnnn89/WinCode.git
cd WinCode
npm ci
npm run checknpm run check builds the TypeScript Gateway and native .NET helpers, runs core regression and stdio integration tests, and verifies the delivery manifest (npm run delivery:verify re-checks artifacts standalone).
2. Configure your MCP client
Add a dynamic stdio server entry so one connection can work across multiple projects:
{
"mcpServers": {
"wincode": {
"command": "node",
"args": ["C:/path/to/WinCode/dist/index.js", "--dynamic-workspace"]
}
}
}Replace
C:/path/to/WinCode/dist/index.jswith your built absolute path (runnode dist/index.js --print-connection --dynamic-workspacein the WinCode directory to print your local snippet).In GUI clients, select
stdioand pass the script path and--dynamic-workspaceas two separate arguments.To lock a connection to a single repository instead, pass
["C:/path/to/WinCode/dist/index.js", "--workspace", "C:/projects/App"].For Codex with persistent interactive terminals, an optional on-demand CLI session mode is also available; see the Setup Guide.
3. Verify the connection and run your first query
Ask your agent to call wincode_hello_world to confirm health.workspaceBinding.mode, then try:
Summarize the project structure of
C:/projects/App, listsrc, and find the code that saves data.
In --dynamic-workspace mode, project tools take the target project's absolute directory in workspacePath (workspace_open uses path).
Example: Investigate a disabled Save button
Find the running application window, check whether the Save button is enabled without bringing the window to the foreground, and locate the related XAML and C# code.
Call
wincode_ui_list_windows(filtering byprocessNameortitleContains) to get the targetpidandhwnd.Call
wincode_ui_reviewwith the target control query and candidate source files (usewincode_search_textfirst if file paths are unknown; usewincode_ui_inspectif you only need the UI tree):
{
"workspacePath": "C:/projects/App",
"pid": 12345,
"hwnd": "0x123456",
"backgroundOnly": true,
"capture": "none",
"responseFormat": "compact",
"query": { "automationId": "SaveButton", "controlType": "Button" },
"maxDepth": 3,
"maxNodes": 30,
"candidateFiles": ["Views/MainWindow.xaml"],
"candidateCodeFiles": ["ViewModels/MainWindowViewModel.cs"]
}Inspect the returned control properties (for example,
isEnabled: false) and pass the returnednextRequestdirectly towincode_prepare_contextto read the candidate declaration or command logic.Verify the source code before concluding why the button is disabled—name matches identify code to read, not the live
DataContext. AddreadStates: truewhen you need toggle/selection/expand states, orcapture: "annotated"for a numbered window screenshot.
Tools overview
For targeted source reading, wincode_search_text (literal string search, no regex) and wincode_file_outline both generate follow-up arguments for wincode_prepare_context:
{
"workspacePath": "C:/projects/App",
"task": "Review the save logic",
"lineRanges": [{ "file": "src/Service.cs", "startLine": 50, "endLine": 80 }],
"maxTokens": 2000
}lineRanges reads explicit lines; scopeFiles restricts reading to listed files; candidateFiles prioritizes files during discovery without excluding others. maxTokens is a UTF-16 character-based estimate rather than an exact tokenizer count.
Category | Tool | Purpose |
Workspace & Status |
| Inspect instance identity, workspace binding, UI mode, capabilities, and a tool's live schema ( |
| Check Git, Repomix/UIA availability, and | |
| Return a compact project summary (uses | |
| Browse directories with depth, entry-count, and output limits. | |
| Parse declared | |
| Move a regular workspace file to WinCode's local trash via the native Windows handle-verifying helper. | |
Code Intelligence |
| Search literal strings across scoped files or directories. |
| Extract local declarations and line count from a file. | |
| Read bounded source excerpts with line ranges, coverage, and truncation metadata. | |
| Search symbols via | |
| Find symbol references with known totals, returned counts, and output-budget reporting. | |
| Assess potential impact of changing a symbol and surface incomplete-evidence uncertainty ( | |
| Generate verification steps and safety checks for a proposed refactoring. | |
Desktop UI |
| List visible top-level windows with process and title filters. |
| Read UIA control subtrees, optional control states, and optional screenshots. | |
| Inspect UI controls and correlate candidate XAML/C# source locations. | |
| Invoke, toggle, or select one uniquely matched control (standard connections only). | |
| Explicitly expand or collapse one uniquely matched control, with optional | |
| Set a control's value via | |
| Trigger an application-declared |
Full parameter constraints: Code reference · UI reference · Diagnostics reference. After rebuilding WinCode, reconnect the MCP server in your client so the running process reloads.
Advanced and optional configuration
Dynamic vs. fixed mode:
--dynamic-workspacekeeps up to 4 on-demand project workspaces open concurrently (each with its own cache and file watcher) and evicts the least recently used idle slot when a fifth is requested. If all 4 slots are busy, it returnsWORKSPACE_BUSY; if cleanup fails on a slot, accessing that project returnsWORKSPACE_RECOVERY_REQUIRED(restart_gateway). Both standard long paths and Windows 8.3 short paths are accepted under the selected root. Without--dynamic-workspace, WinCode binds to--workspace <abs-path>(or launchcwd) and rejects other roots withWORKSPACE_MISMATCH.Trusted Git (
--trust-git): Native Git commands run only in repositories authorized at startup via--trust-git <abs-root>(repeatable). Unlisted repositories reportGIT_NOT_TRUSTEDand fall back to directory fingerprints. Recognized remote URLs have credentials stripped in summaries.Repomix (
--repomix-cli): WinCode checks its own installation for Repomix, accepts--repomix-cli <abs-path-to-cli.js>for an external trusted copy, and falls back to its built-in packer otherwise.
Add
--background-uiwhen sharing your desktop with an agent. It enforcesPID+HWNDbackground inspection (inspectionVersion >= 7) and hideswincode_ui_clickandwincode_ui_set_expanded.To allow background
ValuePatternwrites (wincode_ui_typewithmode: "setValue"), pass--ui-write-window <PID>:<HWND>:<processStartFileTime>for one top-level window.To allow application-declared background WPF shortcuts (
wincode_ui_shortcut), pass--ui-shortcut-window <PID>:<HWND>:<processStartFileTime>(inspectionVersion >= 8); see the WPF background shortcut guide for<wc:BackgroundShortcut />setup andshortcutStatuschecks.Writes and shortcuts are refused whenever the target process owns the foreground window or foreground ownership cannot be verified (
UI_WRITE_TARGET_DENIED). Rebind if the target process restarts. You can obtain a window's binding string in PowerShell:
$appProcess = Get-Process -Id 12345
'{0}:0x{1:X}:{2}' -f $appProcess.Id, $appProcess.MainWindowHandle.ToInt64(), $appProcess.StartTime.ToFileTimeUtc()Roslyn (
--roslyn-config <abs-json-path>): Enables the compiler-backed C# Code Host (requires explicit permission for MSBuild design-time evaluation). On a--dynamic-workspaceconnection, also pass--workspace <authorized-root>to identify which project uses Roslyn; other projects uselocal-text. Pass returned symbollocationobjects unchanged assymbolLocationto reference/impact tools. See the Code reference.Client UI recipes & on-demand session:
dist/Client/SkillSessionCli.jssupports persistent terminal sessions plus explicit client-side workflows (readonly-uirecipescheckbox-auditandsibling-range, and single-parentexpand-uiwith observedscopePath). These workflows do not invoke model APIs or change default MCP behavior; real-application coverage beyond test fixtures remains subject to validation. See Client UI workflows.Tray memory release (
--tray): Add--trayto Gateway arguments, reconnect, and launchtools/WinCode.Tray/bin/Release/net10.0-windows/win-x64/publish/WinCode.Tray.exe --showto manually release idle Roslyn memory under 设置 / 内存管理. Closing Tray does not stop MCP.Managed Agent Skill: Run
npm run skill:check -- <abs-skill-dir>to verify an installed Skill copy, ornpm run skill:sync -- <abs-skill-dir>to back up and update the four managed Skill manuals.
Scope and limitations
Interactive desktop & focus: UI inspection and actions require an interactive Windows session. Global keystrokes (
mode: "type") are disabled by default and require--isolated-keyboardin an isolated session provided by the launcher (cannot be combined with--background-ui). Even without explicit window activation, an application's own event handlers may still bring windows or dialogs forward.UIA provider & rendering coverage: Exposed properties depend on the target framework's UIA provider. Automated desktop tests cover WPF; custom-rendered or embedded web/CEF surfaces may expose partial or unstable trees. Visual details (colors, layout, icons) require screenshots. Background capture uses
PrintWindowwithout desktop-screen fallback and may produce blank or stale images on some GPU-rendered windows—always checkcaptureQuality.Heuristic source mapping & analysis limits: XAML/C# correlations are static text candidates (
runtimeSourceVerified: false); WinCode does not verify that the running binary matches current source, resolve dynamic bindings/templates, or read liveDataContext..sln/.csprojanalysis reads static XML without MSBuild evaluation,local-textsearch is heuristic, and Roslyn currently excludes analyzers/source generators (queryComplete: false). Current benchmarks measure scripted scenarios only and do not establish universal speed or accuracy gains over screenshot-based Computer Use.Resource bounds & inspection indicator: Admission, traversal, and output sizes are bounded (overload returns
SERVER_BUSY; queue wait counts toward deadlines). During any UI inspection or action, WinCode displays a non-focusingREC / WinCodingoverlay and writes minimal local audit metadata under%LOCALAPPDATA%/WinCode/logs/ui-audit.
Development and documentation
Current version: 0.17.1 (CHANGELOG). Reference platform: Windows 11 x64.
npm run check # Build, core regression, stdio integration, and delivery verification
npm run check:desktop # Interactive WPF UI and UI-to-source tests (WINCODE_TEST_ISOLATED_KEYBOARD=1 adds keystroke test)
npm run delivery:verify # Verify Gateway, native helpers, and managed Skill manifest hashes
npm run test:inventory # Verify test suite registration
npm run benchmark:agent -- 1 # Optional scripted efficiency benchmark
npm run benchmark:context -- compare 8 # Model-free paired sequential vs. batched local-text context benchmarkCI runs on Windows with Node.js 22 and 24 and the pinned .NET SDK; interactive desktop tests run separately. Keep local screenshots and raw diagnostic artifacts in git-ignored directories (test-tmp/) and publish only sanitized findings.
Setup & Skill Guide · Architecture & Data Flow · Client UI Workflows · Contributing · Iteration Plan · Security Policy
Related MCP server: lnwjud
简体中文
WinCode 是面向 AI 编程智能体的本地模型上下文协议(MCP)服务器,集成了 Windows UI Automation(UIA)、源码导航与 .NET 项目分析。智能体可以通过同一个连接检查正在运行的桌面应用,并联动查阅对应的项目源码。
核心功能
后台 UI 检查:无需激活目标窗口或切换键盘焦点,即可读取运行中应用的控件树、属性与状态,检查期间不影响你在其他窗口继续操作。
支持纯文本大模型:以结构化 JSON 返回控件名称、层级与状态;不具备图像输入能力的纯文本模型(如纯文本模式下的 DeepSeek)也能检查桌面界面,截图为可选项。
UI 与源码联动定位:检查运行时控件,关联候选 XAML 声明与相关 C# 代码,并结合文件路径、行号与内容哈希读取具体源码片段。
按需定向读取:支持按实际观察到的父路径(
scopePath)或条件查询局部控件,并按指定行号或声明范围读取源码,减少送入模型的上下文体积。项目与代码分析:解析
.sln/.csproj声明的项目引用结构,搜索字面量文本与符号,提取文件大纲并评估变更影响。默认启用内置文本分析,可选配 Roslyn 获得编译器级 C# 符号与引用分析。受控的语义化 UI 操作:仅通过 UIA 模式操作单次有界搜索确认唯一的启用控件(支持点击、展开/折叠、直接赋值,以及显式绑定的后台 WPF 声明式快捷键),不使用坐标鼠标模拟;禁用控件、歧义或不完整匹配、只读值及未确认焦点均会直接拒绝。
快速开始
环境要求:Windows x64(基准平台为 Windows 11 x64)、Git >=2.36、Node.js >=22(推荐 24,兼容 22),以及 global.json 锁定的 .NET SDK 10.0.303(rollForward: "disable")。发布的 UI 辅助程序与可选托盘依赖 .NET 10 Windows Desktop 运行时。
1. 构建并验证
git clone https://github.com/linnnn89/WinCode.git
cd WinCode
npm ci
npm run checknpm run check 会编译 Gateway 与原生 .NET 组件,运行核心回归与 stdio 集成测试,并校验交付清单(也可单独执行 npm run delivery:verify 复核产物一致性)。
2. 配置 MCP 客户端
推荐配置动态工作区模式(--dynamic-workspace),只需一个连接即可在不同项目间复用:
{
"mcpServers": {
"wincode": {
"command": "node",
"args": ["C:/path/to/WinCode/dist/index.js", "--dynamic-workspace"]
}
}
}将
C:/path/to/WinCode/dist/index.js替换为本机编译产物的绝对路径(在安装目录执行node dist/index.js --print-connection --dynamic-workspace可直接打印本机配置)。在图形化客户端中选择
stdio,将脚本路径与--dynamic-workspace作为两个独立参数填入。若需绑定单一项目目录(固定模式),参数改为
["C:/path/to/WinCode/dist/index.js", "--workspace", "C:/projects/App"]。支持持久交互终端的 Codex 客户端还可选用 Skill 按需会话模式,详见 Skill 与 MCP 配置指南。
3. 验证连接并执行首次查询
连接后让智能体调用 wincode_hello_world 核对 health.workspaceBinding.mode,随后可尝试提问:
概述
C:/projects/App的项目结构,列出src目录内容,并定位负责保存数据的代码。
动态模式下,每次调用项目相关工具都需在 workspacePath 中传入目标项目的绝对路径(workspace_open 使用 path 参数)。
使用示例:排查“保存”按钮被禁用的原因
查找正在运行的应用窗口,在不切到前台的情况下检查“保存”按钮是否启用,并定位对应的 XAML 与 C# 代码。
调用
wincode_ui_list_windows(按processName或titleContains筛选),获取目标窗口的pid和hwnd。调用
wincode_ui_review指定目标控件与候选源码文件(若尚不清楚文件路径,先用wincode_search_text搜索;若只需查看控件树,改用无需工作区参数的wincode_ui_inspect):
{
"workspacePath": "C:/projects/App",
"pid": 12345,
"hwnd": "0x123456",
"backgroundOnly": true,
"capture": "none",
"responseFormat": "compact",
"query": { "automationId": "SaveButton", "controlType": "Button" },
"maxDepth": 3,
"maxNodes": 30,
"candidateFiles": ["Views/MainWindow.xaml"],
"candidateCodeFiles": ["ViewModels/MainWindowViewModel.cs"]
}查看返回的控件属性(如
isEnabled: false)与候选位置,将返回的nextRequest原样传给wincode_prepare_context读取相关声明或命令逻辑。结合源码核实原因:绑定或命令名匹配仅提供排查线索,不能单独证明运行时实际的
DataContext。需要读取勾选、选中或展开状态时传readStates: true;需要带编号截图辅助核对视觉布局时传capture: "annotated"。
工具一览
定位代码时,wincode_search_text(普通字符串匹配,不支持正则)与 wincode_file_outline 均会返回可直接传给 wincode_prepare_context 的续读参数:
{
"workspacePath": "C:/projects/App",
"task": "核查保存逻辑",
"lineRanges": [{ "file": "src/Service.cs", "startLine": 50, "endLine": 80 }],
"maxTokens": 2000
}lineRanges 读取指定行区间;scopeFiles 将读取限定在指定文件内;candidateFiles 仅作为发现阶段的优先候选(不排除其他文件)。maxTokens 为按 UTF-16 字符数换算的估算预算,而非特定模型的精确 Token 数。
分类 | 工具 | 用途 |
工作区与状态 |
| 读取实例身份、工作区绑定、UI 模式、已启用能力,以及指定工具( |
| 检查 Git、Repomix/UIA 可用性,以及工作区最近的 | |
| 返回项目结构摘要(使用 | |
| 按深度、条目数与输出上限浏览目录。 | |
| 静态读取 | |
| 通过随产品发布的 Windows 原生助手校验文件句柄后,将工作区普通文件移入本地回收目录。 | |
代码分析 |
| 在指定文件或目录范围内按字面量字符串搜索。 |
| 提取文件的本地声明列表与实际行数。 | |
| 按范围与预算读取源码片段,返回覆盖率与截断说明。 | |
| 使用默认 | |
| 查找符号引用,返回已知总数、实际返回条数与输出裁剪信息。 | |
| 评估符号变更的潜在影响,并在证据不完整时标明不确定性(同时提供别名 | |
| 为拟议的重构提供核查项与验证步骤建议。 | |
桌面 UI |
| 列出可见顶层窗口,支持按进程名和标题筛选。 |
| 读取 UIA 控件树,可按需读取控件状态或捕获窗口截图。 | |
| 检查 UI 控件并关联候选 XAML/C# 源码位置。 | |
| 通过 UIA 模式点击、勾选或选择唯一命中的控件(仅普通连接提供)。 | |
| 显式展开或折叠唯一命中的控件,支持可选 | |
| 通过 | |
| 触发启动者绑定的后台窗口中由应用显式声明的 |
详细参数约束见:代码分析手册 · UI 检查手册 · 诊断与恢复手册。重新构建源码后,请在客户端重新连接 MCP 服务器以加载最新进程与 Schema。
高级与可选配置
动态与固定模式:
--dynamic-workspace最多同时保留 4 个按请求打开的项目工作区(各自拥有独立缓存与文件监听),打开第 5 个时回收最久未使用的空闲工作区;若 4 个可用槽位均在使用或初始化中则返回WORKSPACE_BUSY;清理失败的槽位会被保留,再次访问该项目将返回WORKSPACE_RECOVERY_REQUIRED(restart_gateway)。项目路径同时兼容标准长路径与 Windows 8.3 短路径。不带--dynamic-workspace时为固定模式,绑定--workspace <绝对路径>(缺省为启动目录),访问其他目录返回WORKSPACE_MISMATCH。原生 Git 授权(
--trust-git):仅对启动时通过--trust-git <项目绝对根目录>(可重复传入)显式授权的仓库执行原生 Git 命令;未授权仓库返回GIT_NOT_TRUSTED并回退为目录指纹,识别到的远程 URL 会自动隐去凭据。Repomix(
--repomix-cli):默认查找 WinCode 自身安装的 Repomix,也可通过--repomix-cli <CLI入口绝对路径>指定受信的.js/.mjs/.cjs入口;未安装时使用内置打包器。
与智能体共用桌面时可添加
--background-ui,强制要求提供PID+HWND进行后台取证(需inspectionVersion >= 7),同时在工具列表中隐藏wincode_ui_click与wincode_ui_set_expanded。若需允许后台
ValuePattern直接写值(wincode_ui_type配合mode: "setValue"),由启动者额外传入--ui-write-window <PID>:<HWND>:<processStartFileTime>绑定单个顶层窗口。若需允许触发后台 WPF 声明式快捷键(
wincode_ui_shortcut),额外传入--ui-shortcut-window <PID>:<HWND>:<processStartFileTime>(需inspectionVersion >= 8);应用侧声明<wc:BackgroundShortcut />与查询shortcutStatus的方法见 后台 WPF 快捷键接入说明。当目标进程拥有当前前台窗口或前台归属无法核实时,写入与快捷键请求均会被拒绝(
UI_WRITE_TARGET_DENIED)。目标进程重启后须重新获取绑定值,可用以下 PowerShell 命令生成:
$appProcess = Get-Process -Id 12345
'{0}:0x{1:X}:{2}' -f $appProcess.Id, $appProcess.MainWindowHandle.ToInt64(), $appProcess.StartTime.ToFileTimeUtc()Roslyn(
--roslyn-config <JSON绝对路径>):启用 C# Code Host(须在配置中明确允许 MSBuild 设计时项目求值)。在--dynamic-workspace连接中须同时传入--workspace <授权项目根>指定启用 Roslyn 的项目,其余项目仍使用local-text。查询引用或影响时,请将符号搜索返回的完整location原样作为symbolLocation传入。详见 代码分析手册。客户端 UI 工作流与按需会话:
dist/Client/SkillSessionCli.js支持在持久终端中按需启动并复用会话,同时提供显式调用的客户端配方(readonly-ui下的checkbox-audit复选框统计、sibling-range同级列表分组读取,以及带实际祖先scopePath的单层expand-ui展开读回)。这些流程不会自动调用模型 API 或改变客户端默认配置,测试夹具之外的真实应用覆盖与性能仍须按场景单独验证,详见 客户端 UI 工作流。托盘与内存释放(
--tray):为 Gateway 添加--tray并重连后,手动运行tools/WinCode.Tray/bin/Release/net10.0-windows/win-x64/publish/WinCode.Tray.exe --show,可在“设置 / 内存管理”中手动释放空闲实例的 Roslyn 内存;退出托盘不会停止 MCP。智能体 Skill 同步:更新仓库后,可用
npm run skill:check -- <Skill绝对目录>校验已安装的 Skill,或用npm run skill:sync -- <Skill绝对目录>备份并同步受管的四份手册。
适用范围与限制
桌面会话与焦点边界:UI 检查与操作需要交互式 Windows 桌面会话。全局按键发送(
mode: "type")默认关闭,仅在启动者提供独立隔离会话并显式传入--isolated-keyboard时可用(不可与--background-ui同用)。即使工具本身不调用窗口激活,目标应用自身的事件响应仍可能弹窗或将窗口带到前台。UIA 提供程序与截图限制:可读控件信息取决于目标框架的 UIA 实现。桌面自动化测试覆盖 WPF;其他框架、自绘控件或部分内嵌 Web/CEF 界面暴露的控件树可能不完整或不稳定。颜色、图标与视觉排版需结合图像核对。后台截图仅使用
PrintWindow(不回退到整屏截图),在部分硬件加速窗口上可能出现黑图或旧画面,需检查返回的captureQuality。源码关联与静态分析边界:XAML/C# 关联结果属于静态文本候选(
runtimeSourceVerified: false),不验证运行中程序是否由当前源码编译,不解析动态绑定、运行时模板或实际DataContext。项目结构分析仅静态解析.sln/.csprojXML 声明;local-text引用为启发式文本匹配;Roslyn 目前排除分析器与源生成器(queryComplete: false)。现有基准测试仅覆盖特定脚本化场景,不能据此推断在各类任务中普遍比基于截图的 Computer Use 更快或更准确。资源上限与检查提示:并发受理、目录遍历与响应体积均设有明确上限(超载返回
SERVER_BUSY,排队时间计入总超时)。每次执行 UI 检查或操作期间,屏幕会显示不抢占焦点的半透明REC / WinCoding提示浮层,并在%LOCALAPPDATA%/WinCode/logs/ui-audit记录最小必要的本地审计元数据。
开发与文档
当前源码版本:0.17.1(变更记录见 CHANGELOG)。基准开发与测试平台为 Windows 11 x64。
npm run check # 构建、核心回归、stdio 集成与交付清单校验
npm run check:desktop # 交互式桌面 WPF 与 UI 源码关联测试(独立会话设 WINCODE_TEST_ISOLATED_KEYBOARD=1 启用发键用例)
npm run delivery:verify # 单独核验 Gateway、原生组件与受管 Skill 的交付清单哈希
npm run test:inventory # 核对自动化测试套件注册完整性
npm run benchmark:agent -- 1 # 运行一轮可选的脚本化效率基准
npm run benchmark:context -- compare 8 # 不调用模型,在隔离夹具中配对比较逐关键词与默认批量(最多 4 词)的 local-text 扫描开销CI 在 Windows 环境下使用 Node.js 22、24 及锁定版 .NET SDK 运行,桌面交互测试需在本地独立执行。本机截图与原始诊断输出请保留在已忽略的本地目录(如 test-tmp/),公开内容仅保留去标识后的结论。
Skill 与 MCP 配置指南 · 架构与数据流 · 客户端 UI 工作流 · 贡献指南 · 迭代计划 · 安全策略
Acknowledgements / 致谢
WinCode uses or draws ideas from these open-source projects / WinCode 使用或参考了以下开源项目:
FlaUI — Windows UI Automation library used by the native UI helper / 原生 UI 辅助程序使用的 Windows UI Automation 库。
Serena — Reference for symbol navigation and semantic code workflows in coding agents / 为编程智能体中的符号导航与语义代码分析提供了设计参考。
Repomix — Optional repository packer for code context preparation / 可选的代码仓库上下文打包工具。
License / 许可
Available Tools
11 toolsanalyze_change_impactA
Analyzes downstream blast radius, affected caller components, risk rating, and architectural decoupling recommendations before modifying code (AI change safety guard).
Inputs: target (required).
wincode_analyze_change_impactA
Alias for analyze_change_impact. Analyzes blast radius, affected callers, and risk rating before modifying code.
Inputs: target (required).
wincode_analyze_workspaceA
High-level workspace and architecture analysis. Detects project types, .NET solutions, architecture layers, and key entry points without dumping raw files.
Inputs: maxDepth.
wincode_diagnose_projectB
Diagnoses project health, Windows/.NET SDK readiness, solution files, and development prerequisites.
Inputs: no named parameters.
wincode_find_code_symbolA
Locates code symbols (classes, interfaces, methods, functions) across the workspace with signatures and line numbers (powered by Serena code intelligence).
Inputs: query (required), kind.
wincode_find_referencesA
Finds all call sites and usages of a specified symbol across the repository.
Inputs: symbolName (required).
wincode_hello_worldA
Minimal connectivity and heartbeat verification tool for AI coding agents (Codex, Claude, etc.). Confirms WinCode Gateway is online.
Inputs: greeting.
wincode_plan_refactoringB
Provides structured refactoring guidance, step-by-step breakdown, and safety boundaries for a component.
Inputs: goal (required), target (required).
wincode_prepare_contextB
Prepares concise, high-semantic, decision-ready context snapshot for an agent task using Repomix and semantic distillation. Extracts relevant symbols, architectures, and packs essential files.
Inputs: task (required), compress, focusAreas, outputFormat, +1 more.
wincode_safe_move_to_trashA
Safely moves an obsolete or deleted file into the project trash/ directory with metadata instead of permanent deletion.
Inputs: filePath (required), reason.
workspace_openB
Opens and analyzes a project workspace directory. Identifies project type (dotnet, node, python, etc.), solution file, project count, primary language, git status, metadata, and file tree.
Inputs: path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Several tools have unclear boundaries: workspace_open and wincode_analyze_workspace both perform overlapping workspace/project analysis, and analyze_change_impact is duplicated by wincode_analyze_change_impact as an exact alias. This creates real misselection risk for agents.
Most tools follow a wincode_verb_noun convention, but workspace_open and analyze_change_impact break the prefix pattern. The alias pair wincode_analyze_change_impact/analyze_change_impact also mixes prefixed and unprefixed names for the same operation.
11 tools is a reasonable count for a coding-assistant workspace toolkit. However, the set is slightly padded by the alias duplicate and by two workspace-analysis tools that could likely be consolidated.
The toolset covers workspace analysis, symbol lookup, reference finding, change impact, diagnostics, refactoring planning, and safe deletion. It lacks direct file read/edit/build operations, but those may be intentionally outside its analysis-and-planning scope.
Maintenance
Related MCP Connectors
Governed app access for AI agents: 1,000+ apps & 12,000+ tools via Code Mode MCP.
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
An MCP gateway for teams deploying AI tools at scale to employee-facing and headless agents.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to control local Windows development tools by exposing project files, code search, file editing, test execution, Git operations, and resource viewing through a secure MCP interface with permission controls.11Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely access local development capabilities such as files, Git, processes, browser control, Windows automation, WSL, and observability through MCP on Windows and macOS.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to access unified development tools including code generation, documentation synchronization, test case rendering, and architecture graph queries through a single MCP server.-
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to analyze repository architecture, changed-file and diff impact, dependency and endpoint exposure, API contract compatibility, architecture boundaries, bounded capacity simulations, and security/quality evidence through MCP tools.3Apache 2.0