Skip to content
Back to search

connect-anything

MarketplaceWorks with Claude CodeGitHub

Turn any app into MCP tools: probe which layer it actually supports (official API, local store, private API, DevTools, accessibility), then generate callable tools instead of clicking pixels.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/zhang-dongfang--connect-anything/badge.svg)](/listings/zhang-dongfang--connect-anything)

HTML

<a href="/listings/zhang-dongfang--connect-anything"><img src="/api/listings/zhang-dongfang--connect-anything/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install

Node.js 20 or newer, and nothing else: no runtime dependencies, no build step, no native module.

There is no npm package to install: `connect-anything` on npm belongs to another project, so **this repository is the distribution**. Two ways in.

**In Claude Code: install it from the plugin marketplace.** This repository is its own marketplace (`.claude-plugin/marketplace.json`) and the plugin ships both the skill and the MCP server:

/plugin marketplace add Zhang-Dongfang/connect-anything
/plugin install connect-anything

That gives you the skill procedure and a `connect-anything` stdio server from the next session on - no clone, no global install. The server entry uses `npx -y github:Zhang-Dongfang/connect-anything`, so the first call fetches `main`; on Windows you may need the `cmd /c npx` wrapper shown below.

**Anywhere else: run it from git.** Each run fetches the current `main`:

npx -y github:Zhang-Dongfang/connect-anything --help

Or clone it and run it in place:

git clone https://github.com/Zhang-Dongfang/connect-anything
cd connect-anything
node src/cli.js --help

`cxa store` additionally needs Node 22.5 or newer, because it uses the built-in `node:sqlite` driver. Every other command works on Node 20, and `cxa store` says exactly what it is missing rather than falling over.

Register it with your agent

Any MCP client that can start a stdio server works. For a git install, point the command at the repository:

{
  "mcpServers": {
    "connect-anything": {
      "command": "npx",
      "args": ["-y", "github:Zhang-Dongfang/connect-anything", "serve"]
    }
  }
}

On Windows, wrap it in the shell, because `npx` is a `.cmd` shim:

{ "command": "cmd", "args": ["/c", "npx", "-y", "github:Zhang-Dongfang/connect-anything", "serve"] }

Then optionally hand the agent the procedure as well as the tools — see [Use it as a Skill](#use-it-as-a-skill-process-not-just-tools). Restart the agent after changing its MCP configuration.

Other hosts

Every MCP host speaks the same stdio protocol; only the file and the key names differ. `cxa` writes the shape each one reads:

cxa mcp-config claude --write   # .mcp.json                  mcpServers      (Claude Code, project)
cxa mcp-config cursor --write   # .cursor/mcp.json           mcpServers      (Cursor, project)
cxa mcp-config vscode --write   # .vscode/mcp.json           servers + "type": "stdio"
cxa mcp-config copilot --write  # .copilot/mcp-config.json   mcpServers      (VS Code Copilot, global)
cxa mcp-config codex --write    # .codex/config.toml         [mcp_servers.connect-anything]
cxa mcp-config codex            # print the entry instead of writing anything
cxa mcp-config --list           # every host name, with where it writes

The repository already ships `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json` and `.codex/config.toml`, so a fresh checkout usually needs only a restart of the host. On Windows, prefer the generator with `--write` over copying those files: only the generator knows to emit `cmd.exe /d /s /c npx ...`, because Node cannot spawn the `npx.cmd` shim directly - `spawn("npx")` fails with ENOENT, while `spawn("cmd.exe", ["/d", "/s", "/c", "npx", "--version"])` exits 0. `--posix` forces the plain `npx` form for a config you mean to commit or share.

Codex needs neither a marketplace nor a clone:

codex mcp add connect-anything -- npx -y github:Zhang-Dongfang/connect-anything serve
codex mcp list     # connect-anything | npx | -y github:... serve | enabled

Cursor and VS Code read their project files when you open the folder, and Copilot's native config is the same `mcpServers` shape at `~/.copilot/mcp-config.json`. Coding agents that read [AGENTS.md](AGENTS.md) - Codex, Cursor, Copilot, Gemini CLI - get the procedure from there, the way Claude Code gets it from the skill.

Ask your agent

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 21 lines
  1. {
  2. "name": "connect-anything",
  3. "owner": { "name": "Zhang Dongfang", "url": "https://github.com/Zhang-Dongfang" },
  4. "metadata": {
  5. "description": "Turns a desktop app into MCP tools through the layer it really supports (official API, local store, private API, DevTools, accessibility), rather than screenshot and mouse.",
  6. "version": "0.1.0"
  7. },
  8. "plugins": [
  9. {
  10. "name": "connect-anything",
  11. "source": "./",
  12. "description": "cxa: probe first, act on the best layer. Ships the skill procedure and the stdio MCP server.",
  13. "version": "0.1.0",
  14. "author": { "name": "Zhang Dongfang" },
  15. "homepage": "https://github.com/Zhang-Dongfang/connect-anything",
  16. "repository": "https://github.com/Zhang-Dongfang/connect-anything",
  17. "license": "MIT",
  18. "keywords": ["mcp", "desktop", "automation", "accessibility"]
  19. }
  20. ]
  21. }
README.md · README · 584 lines
  1. <div align="center">
  2. **English** · [简体中文](docs/readme/README_zh.md)
  3. # connect-anything: one layer below the pixels
  4. ### One MCP server that turns what an app already exposes into tools your agent can call.
  5. **See a feature in an app. Give your agent the same one — through an interface that keeps working.**
  6. [![CI](https://github.com/Zhang-Dongfang/connect-anything/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Zhang-Dongfang/connect-anything/actions/workflows/ci.yml)
  7. [![tests](https://img.shields.io/badge/tests-95_passing-1a7f37?style=flat-square)](#project-status)
  8. [![Node.js requirements](https://img.shields.io/badge/Node.js-%E2%89%A520-339933?style=flat-square&logo=nodedotjs&logoColor=white)](#what-you-can-connect)
  9. [![runtime dependencies](https://img.shields.io/badge/runtime_dependencies-0-5c4ee5?style=flat-square)](#project-status)
  10. [![MCP tool catalog](https://img.shields.io/badge/MCP-tool_catalog-5c4ee5?style=flat-square)](#mcp-tools)
  11. [![agent skill](https://img.shields.io/badge/agent_skill-SKILL.md-8250df?style=flat-square)](#use-it-as-a-skill-process-not-just-tools)
  12. [![MIT license](https://img.shields.io/badge/license-MIT-f4c430?style=flat-square)](LICENSE)
  13. **[Case studies](#case-studies) · [Architecture](docs/architecture.md) · [Roadmap](ROADMAP.md)**
  14. [Quick start](#quick-start) · [How cxa works](#how-cxa-works) · [What you can connect](#what-you-can-connect) · [Prior art](#prior-art-and-where-this-differs) · [FAQ](#faq) · [Documentation](#documentation)
  15. <code>npx -y github:Zhang-Dongfang/connect-anything probe CalculatorApp</code>
  16. </div>
  17. > [!IMPORTANT]
  18. > Get connect-anything from [Zhang-Dongfang/connect-anything](https://github.com/Zhang-Dongfang/connect-anything).
  19. > There is **no official npm package**: the name `connect-anything` on npm belongs to a different
  20. > project, so `npx connect-anything` runs somebody else's code. Install from this repository
  21. > (`npx -y github:Zhang-Dongfang/connect-anything`, a clone, or `node src/cli.js`).
  22. > A similar repository name, a copied README, or a lookalike package does not make a download official.
  23. <div align="center">
  24. <br />
  25. <img src="docs/assets/cxa-layers.svg" alt="connect-anything layer ladder: official API first, computer use last, with the evidence a probe looks for at each layer" width="960" />
  26. <br /><br />
  27. <table aria-label="connect-anything community">
  28. <tr>
  29. <td align="center" width="300">
  30. <a href="https://github.com/Zhang-Dongfang/connect-anything/discussions">
  31. <strong>Ask in Discussions</strong>
  32. </a><br />
  33. <sub>“How do I…” · show and tell</sub>
  34. </td>
  35. <td align="center" width="300">
  36. <a href="https://github.com/Zhang-Dongfang/connect-anything/labels/good%20first%20issue">
  37. <strong>Pick a good first issue</strong>
  38. </a><br />
  39. <sub>Every one carries acceptance criteria</sub>
  40. </td>
  41. <td align="center" width="300">
  42. <a href="https://github.com/Zhang-Dongfang/connect-anything/issues">
  43. <strong>Report a blocked layer</strong>
  44. </a><br />
  45. <sub>A negative result is a result</sub>
  46. </td>
  47. </tr>
  48. </table>
  49. <br />
  50. </div>
  51. ---
  52. See a feature in an app that you want in your own product, or a task you want an agent to do inside
  53. an app you already run. [REA](https://github.com/morluto/rea) answers *“how does this app work?”*, down
  54. to the binary. connect-anything answers the next question: *“how do I get my agent to actually do the
  55. thing in that app, and what is the cheapest route that will still work next month?”*
  56. You export a capture, or point it at a running window, and it replies in the currency REA uses:
  57. findings with evidence. Which layers does this app support? Which one should be tried first? What does
  58. the connector look like once it is built? What is left when everything stronger is unavailable?
  59. What makes it different from most automation is that it is allowed to say **no**. A layer that exists
  60. but should not be pushed — an encrypted store with no key on disk, a window that exposes four named
  61. controls and draws the rest, a loopback-only IPC channel — comes back as `blocked` with its reason,
  62. and the agent is told to fall back instead of reaching for screenshots or for someone's decryption
  63. tool. That refusal is a feature: it is the difference between an agent that reports what it cannot do
  64. and one that quietly burns an account finding out.
  65. It calls REA as a pinned, black-box CLI for static analysis of Electron and JavaScript apps, and owns
  66. everything after that: probing, routing, connector specs, tool generation, credentials and health
  67. checks. It is a companion, not a fork; a REA upgrade touches one file (`src/rea.js`).
  68. ## Quick start
  69. ### Install
  70. Node.js 20 or newer, and nothing else: no runtime dependencies, no build step, no native module.
  71. There is no npm package to install: `connect-anything` on npm belongs to another project, so **this
  72. repository is the distribution**. Two ways in.
  73. **In Claude Code: install it from the plugin marketplace.** This repository is its own marketplace
  74. (`.claude-plugin/marketplace.json`) and the plugin ships both the skill and the MCP server:
  75. ```text
  76. /plugin marketplace add Zhang-Dongfang/connect-anything
  77. /plugin install connect-anything
  78. ```
  79. That gives you the skill procedure and a `connect-anything` stdio server from the next session on -
  80. no clone, no global install. The server entry uses `npx -y github:Zhang-Dongfang/connect-anything`,
  81. so the first call fetches `main`; on Windows you may need the `cmd /c npx` wrapper shown below.
  82. **Anywhere else: run it from git.** Each run fetches the current `main`:
  83. ```bash
  84. npx -y github:Zhang-Dongfang/connect-anything --help
  85. ```
  86. Or clone it and run it in place:
  87. ```bash
  88. git clone https://github.com/Zhang-Dongfang/connect-anything
  89. cd connect-anything
  90. node src/cli.js --help
  91. ```
  92. `cxa store` additionally needs Node 22.5 or newer, because it uses the built-in `node:sqlite` driver.
  93. Every other command works on Node 20, and `cxa store` says exactly what it is missing rather than
  94. falling over.
  95. ### Register it with your agent
  96. Any MCP client that can start a stdio server works. For a git install, point the command at the
  97. repository:
  98. ```json
  99. {
  100. "mcpServers": {
  101. "connect-anything": {
  102. "command": "npx",
  103. "args": ["-y", "github:Zhang-Dongfang/connect-anything", "serve"]
  104. }
  105. }
  106. }
  107. ```
  108. On Windows, wrap it in the shell, because `npx` is a `.cmd` shim:
  109. ```json
  110. { "command": "cmd", "args": ["/c", "npx", "-y", "github:Zhang-Dongfang/connect-anything", "serve"] }
  111. ```
  112. Then optionally hand the agent the procedure as well as the tools — see
  113. [Use it as a Skill](#use-it-as-a-skill-process-not-just-tools). Restart the agent after changing its
  114. MCP configuration.
  115. ### Other hosts
  116. Every MCP host speaks the same stdio protocol; only the file and the key names differ. `cxa` writes
  117. the shape each one reads:
  118. ```bash
  119. cxa mcp-config claude --write # .mcp.json mcpServers (Claude Code, project)
  120. cxa mcp-config cursor --write # .cursor/mcp.json mcpServers (Cursor, project)
  121. cxa mcp-config vscode --write # .vscode/mcp.json servers + "type": "stdio"
  122. cxa mcp-config copilot --write # .copilot/mcp-config.json mcpServers (VS Code Copilot, global)
  123. cxa mcp-config codex --write # .codex/config.toml [mcp_servers.connect-anything]
  124. cxa mcp-config codex # print the entry instead of writing anything
  125. cxa mcp-config --list # every host name, with where it writes
  126. ```
  127. The repository already ships `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json` and
  128. `.codex/config.toml`, so a fresh checkout usually needs only a restart of the host. On Windows,
  129. prefer the generator with `--write` over copying those files: only the generator knows to emit
  130. `cmd.exe /d /s /c npx ...`, because Node cannot spawn the `npx.cmd` shim directly - `spawn("npx")`
  131. fails with ENOENT, while `spawn("cmd.exe", ["/d", "/s", "/c", "npx", "--version"])` exits 0.
  132. `--posix` forces the plain `npx` form for a config you mean to commit or share.
  133. Codex needs neither a marketplace nor a clone:
  134. ```bash
  135. codex mcp add connect-anything -- npx -y github:Zhang-Dongfang/connect-anything serve
  136. codex mcp list # connect-anything | npx | -y github:... serve | enabled
  137. ```
  138. Cursor and VS Code read their project files when you open the folder, and Copilot's native config
  139. is the same `mcpServers` shape at `~/.copilot/mcp-config.json`. Coding agents that read
  140. [AGENTS.md](AGENTS.md) - Codex, Cursor, Copilot, Gemini CLI - get the procedure from there, the way
  141. Claude Code gets it from the skill.
  142. ### Ask your agent
  143. ```text
  144. Probe the Weixin desktop client with cxa, show me the evidence behind each layer,
  145. and tell me the cheapest reliable way to send a message. If every layer is blocked,
  146. say so and stop there — do not fall back to screenshots on your own.
  147. ```
  148. Replace the app and the task with yours. A good answer names the layer it chose, the evidence behind
  149. it, and what it deliberately did not try.
  150. ### Use the terminal
  151. The same capabilities, without an agent in the middle:
  152. ```bash
  153. cxa probe CalculatorApp # which layers does this app support?
  154. cxa har capture.har --name myapp # reverse a private API into MCP tools
  155. cxa store "%LOCALAPPDATA%\NetEase\CloudMusic\NIM" # read a local SQLite store, read-only
  156. cxa act notepad --name "文本编辑器" --get-text # drive named controls, no pixels
  157. cxa list # installed connectors and missing credentials
  158. cxa serve # the MCP server on stdio
  159. ```
  160. ### Keep it current
  161. The project is pre-1.0 and moves: the connector format and the CLI can still change between minor
  162. versions. `npx -y github:…` always runs the current `main`; a clone updates with `git pull`.
  163. ## How cxa works
  164. Your agent asks a question, and cxa answers it by inspecting the app instead of guessing: it reads
  165. the process list, the listening sockets, the accessibility tree, the on-disk store and any recorded
  166. traffic. It returns findings with the evidence it used, plus a routing decision — one layer to use,
  167. an ordered list of fallbacks, and the reasons a stronger layer was refused.
  168. The agent then either explains what it found or calls the generated tool. Both paths go through the
  169. same layer table, so a terminal session and an agent session never disagree about what is possible.
  170. <img src="docs/assets/cxa-flow.svg" alt="Your agent calls cxa over MCP; cxa inspects the app's network, UI tree and disk locally; the agent gets evidence and callable tools back" width="1000" />
  171. [Open the full-size figure](docs/assets/cxa-flow.svg).
  172. Three invariants hold across every layer:
  173. 1. **Evidence or silence.** Every verdict carries the facts it was derived from, so it can be
  174. reproduced or argued with. `probe-win.ps1` collects facts; `probe.js` makes judgements — which is
  175. why the judgement rules are unit-tested on Linux CI against captured JSON fixtures.
  176. 2. **Credentials are names.** A connector stores the *name* of an environment variable, never the
  177. value. Nothing secret is written to `~/.connect-anything/`.
  178. 3. **`blocked` is a first-class state.** It is not “unknown”; it is “this is possible and we are
  179. refusing”, and it always ships with the reason.
  180. ## What you can connect
  181. Each row is something the project has actually been run against on a real machine, or a layer whose
  182. probe is covered by fixtures. The third column is what it needs from you, not a wish list.
  183. | Target | What cxa returns | Requirements and command |
  184. | --- | --- | --- |
  185. | Web apps, and any HTTP surface you can record | Endpoint inventory, a connector, one tool per endpoint, path parameters and required fields inferred from the samples | A HAR from Chrome, Edge or Firefox: `cxa har capture.har --name myapp` |
  186. | Electron and JavaScript apps | Candidate endpoints, modules and IPC boundaries from static analysis, then a capture to confirm which ones carry data | Node 20+, optional REA CLI; MCP tool `cxa_rea_analyze_app` |
  187. | Encrypted request envelopes (NetEase weapi style) | A connector that keeps the encryption, flags which bodies were opaque in the capture, and exposes the tools anyway | `cxa har … --augment specs/netease.json` · [case study](docs/netease.md) |
  188. | Desktop apps with real controls (Win32, WPF, UWP) | Named controls, the patterns each one exposes, and a verified state change after acting | Windows: `cxa probe <exe>` then `cxa act <exe>` |
  189. | Legacy MSAA-only apps (`regedit`) | The exposed control classes, even when modern UIA shows almost nothing | Windows: `cxa probe regedit` |
  190. | Self-drawn UI (Qt, Flutter, games) | A `blocked` accessibility verdict with the evidence — “computer use is the only path”, said out loud | Windows: `cxa probe <exe>` |
  191. | Plaintext SQLite on disk | Tables, columns and read-only queries against the app's own data, no UI automation | Node 22.5+: `cxa store "<dir>" --tables` / `--sql "select …"` |
  192. | Encrypted stores (SQLCipher, WeChat 4.x) | `blocked`, with the file count, the size and the reason — no key extraction attempted | `cxa probe <exe> --find-store "<hints>"` |
  193. | Apps that only talk over loopback IPC | `blocked` private-api, with the listener inventory that proves it is not replayable | Windows: `cxa probe <exe>` |
  194. | Mini-program runtimes inside a desktop app | A devTools verdict that says why CDP is unreachable rather than pretending it might work | Windows: `cxa probe <exe>` |
  195. | URL schemes, COM, AppleScript | The scripting layer: it opens the app, and the verdict says that is all it does | Windows: `cxa probe <exe>` |
  196. | Everything else | Computer use — always available, always last, and never chosen silently | Documented, not hidden: [architecture](docs/architecture.md#3-分层接入模型) |
  197. What it deliberately does not do: extract keys from process memory, defeat anti-automation checks,
  198. decrypt an encrypted store, or use a vendor's private credentials. Those are other products. When a
  199. layer needs one of them, the answer is `blocked` and the project says so in public —
  200. [the WeChat case study](docs/weixin.md) exists for exactly that reason.
  201. Calling a private API may violate a service's terms even when the technique works. That is your call
  202. to make, not something the tool can make for you.
  203. ### What a HAR actually is
  204. HAR stands for **HTTP Archive**: the JSON log a browser keeps of every request it made. In Chrome,
  205. Edge or Firefox: open DevTools, open the Network tab, do the task **once**, right-click,
  206. *Save all as HAR with content*. That file is the raw material for `cxa har` — nothing more magical
  207. than a recording of traffic.
  208. ```json
  209. { "log": { "entries": [ {
  210. "request": { "method": "GET", "url": "https://app.example.com/api/v1/projects?limit=20",
  211. "headers": [ { "name": "Authorization", "value": "Bearer ..." } ] },
  212. "response": { "status": 200, "content": { "mimeType": "application/json", "text": "[{\"id\":101}]" } }
  213. } ] } }
  214. ```
  215. What it gives you: real URLs, methods, headers, request and response bodies — the endpoint inventory a
  216. connector is built from, with ids that can become path parameters.
  217. What it does not give you: traffic that never went through that browser (native network stacks, IPC),
  218. the plaintext inside an encrypted body (`params=…&encSecKey=…` stays opaque), or what a business error
  219. means when the transport returned 200.
  220. A HAR contains live cookies and tokens. Treat it like a password: `*.har` is gitignored here, and
  221. captures with real account traffic must be scrubbed before they are shared.
  222. ## Case studies
  223. Every number below came from a real run on this machine, including the ones that are disappointing.
  224. ### Weixin: a negative result, reported in full
  225. `Weixin 4.1.15.13` on Windows — a Qt app that draws its own UI. The probe ran, the answer was *no*,
  226. and the useful part is why:
  227. | Layer | Status | Evidence |
  228. | --- | --- | --- |
  229. | official-api | unknown | no vendor API registered |
  230. | private-api | **blocked** | 5 loopback-only IPC listeners |
  231. | devTools | unavailable | mini-program runtime only, no remote debugging port |
  232. | accessibility | **blocked** | `namedControls=4`; `Qt51514QWindowIcon`, `MMUIRenderSubWindowHW` |
  233. | local-store | **blocked** | 24 SQLCipher databases, 1.05 GB, key absent from disk **and** memory |
  234. | scripting | available | `weixin://`, deep link only |
  235. Key recovery was tried honestly before being declared out of scope: `key_info.dat` is 180 bytes of
  236. high-entropy data with no key in it; `ReadProcessMemory` reads 1041 MB in 2.2 s and finds none of the
  237. classic WCDB `x'<key><salt>'` patterns; a Frida hook on `bcrypt!BCryptDeriveKeyPBKDF2` recorded zero
  238. calls across 30 seconds of live use. That reproduces upstream issue wx-cli#89: WeChat 4.1.10+ no
  239. longer caches the raw key. Going further means hooking SQLCipher internals — which this project does
  240. not do.
  241. **Verdict:** computer use is the only real way to drive this client, and the tool says so instead of
  242. pretending otherwise. [Read the case study](docs/weixin.md).
  243. ### NetEase Cloud Music: an encrypted API, 8 of 10 tools live
  244. The web player signs every request (`params` = AES, `encSecKey` = RSA), so replaying a capture
  245. verbatim cannot work. One clickthrough produced 56 API requests; the generator turned them into a
  246. connector and flagged which bodies were encrypted. With the weapi codec plus an authored spec, **8 of
  247. 10 tools return live data through MCP** — the other two report their real business error codes
  248. (`-110`, `50000005`) rather than faking success.
  249. ```bash
  250. cxa har captures/netease.har --name netease --host music.163.com --augment specs/netease.json
  251. ```
  252. [Read the case study](docs/netease.md).
  253. ### Calculator and Notepad: pressing things without pixels
  254. `cxa act` drives named UI Automation controls and re-reads the tree afterwards, so it can tell you
  255. whether anything actually happened. Real output for `7 + 5 =`:
  256. ```
  257. invoke Button "七" autoId=num7Button via Invoke
  258. verified: control tree changed (51A09A78511AB58C -> 48082FED60764893)
  259. ...
  260. Text "显示为 12" autoId=CalculatorResults = "显示为 12"
  261. ```
  262. Four rules make that safe enough to hand to an agent:
  263. | Rule | Behaviour |
  264. | --- | --- |
  265. | Semantic only | `Invoke` / `Toggle` / `SelectionItem` / `Value`; `--click`, `--x`, `--y`, `--screenshot`, `--key` are refused with an explanation, not silently ignored |
  266. | Dry run by default | `--invoke` and `--set-value` print the resolved target and pattern and do nothing without `--confirm` |
  267. | Verify after acting | the tree is re-read; no change means `NOT verified` and a non-zero exit, never a claim of success |
  268. | Self-drawn surfaces say so | a Qt or Flutter window with no patterns reports “computer use is the only path” |
  269. Known limits: Windows only; UWP and hosted apps need `--window <title>` (or the foreground) because a
  270. suspended app exposes an empty control tree. `regedit` works the other way round: modern UIA shows
  271. nothing, but MSAA control classes (`SysTreeView32`, `SysListView32`, `Edit`) are right there.
  272. If you use cxa on something interesting, open a
  273. [Discussion](https://github.com/Zhang-Dongfang/connect-anything/discussions) with the target, your
  274. question, the verdict and what you did next. Negative results are welcome; they are the most useful
  275. thing in this README.
  276. ## Prior art and where this differs
  277. This corner of the ecosystem is crowded, and pretending otherwise would be dishonest. Only projects
  278. that were actually inspected are listed; absence here is not a claim of absence in the world.
  279. | Project | What it does | How this differs |
  280. | --- | --- | --- |
  281. | [morluto/rea](https://github.com/morluto/rea) | agent-driven reverse engineering, down to native binaries | REA analyses; this project owns what happens after the analysis — routing, connectors, credentials, health |
  282. | [alufers/mitmproxy2swagger](https://github.com/alufers/mitmproxy2swagger) | mitmproxy captures or HAR to OpenAPI 3.0 | this emits callable MCP tools; OpenAPI is a spec for other generators |
  283. | [hydope/har2mcp](https://github.com/hydope/har2mcp) | HAR to a standalone MCP server, secrets in env vars | same conversion step, but it comes *after* a probe that decides whether to convert at all, with a local-store layer and a router on top |
  284. | [microsoft/playwright-mcp](https://github.com/microsoft/playwright-mcp) | browser automation over accessibility snapshots | not replaced: `devTools` and `accessibility` are layers this router sends work to |
  285. | [WeChat MCP/CLI projects](https://github.com/zwl467135974/wechat-cli) | decrypt the local store, or drive the UI with `wxauto` | cited as evidence in [docs/weixin.md](docs/weixin.md), not vendored; this project reports `blocked` instead of extracting keys |
  286. ## MCP tools
  287. Six built-in tools plus one generated tool per observed endpoint:
  288. | Tool | Purpose |
  289. | --- | --- |
  290. | `cxa_route` | pick the best layer for an app and say when computer use is unnecessary |
  291. | `cxa_probe_app` | detect which layers a running desktop app supports, with the evidence |
  292. | `cxa_generate_from_har` | reverse a capture into a connector; tools appear immediately (`tools/list_changed`) |
  293. | `cxa_rea_analyze_app` | hand an Electron or JavaScript app to REA and extract candidate endpoints |
  294. | `cxa_act` | drive a named control (dry run unless the caller passes `confirm: true`) |
  295. | `cxa_list_connectors` | installed connectors, their layer, and which credentials are missing |
  296. | `<app>__<tool>` | one generated tool per observed endpoint |
  297. `cxa store` is CLI-only for now: reading a database is a deliberate, inspectable act, and it is on the
  298. [roadmap](ROADMAP.md) to expose it as a tool with the same read-only guards.
  299. ## Use it as a Skill (process, not just tools)
  300. MCP hands an agent tools. A Skill hands it the *procedure*: probe first, act on the best layer, capture
  301. once, generate, verify, and stop when a layer is `blocked`. Both ship from this repository.
  302. ```bash
  303. cxa skill # install into an existing host skills dir (~/.claude/skills, else ~/.codex/skills)
  304. cxa skill --target <dir> # install somewhere else
  305. cxa skill --check # validate the bundled skill (frontmatter, links, size)
  306. ```
  307. `SKILL.md` is a roughly 100-line index; the three references load only when a task needs them:
  308. | File | Loaded when |
  309. | --- | --- |
  310. | `SKILL.md` | always: the five steps, the layer status table, the guardrails |
  311. | `reference/layers.md` | deciding what a probe verdict actually means |
  312. | `reference/connector-spec.md` | authoring or repairing a connector or augment spec |
  313. | `reference/policy.md` | a layer came back `blocked` and someone wants to push past it |
  314. The division of labour matters: the Skill decides **whether and how** to automate, and refuses to
  315. defeat a `blocked` layer; the MCP server (or the `cxa` CLI when no MCP host is available) performs the
  316. calls. Installing the Skill does not create connectors for you — it stops the agent from reaching for
  317. screenshots first.
  318. ## Connector spec
  319. A connector is plain JSON in `~/.connect-anything/connectors/`, so it can be reviewed, diffed and
  320. shared like any other source file:
  321. ```json
  322. { "name": "demo", "baseUrl": "https://app.example.com", "layer": "private-api",
  323. "auth": [{ "header": "authorization", "env": "CXA_DEMO_AUTHORIZATION" }],
  324. "tools": [{ "name": "post_projects_tasks", "method": "POST", "path": "/api/v1/projects/{project_id}/tasks",
  325. "pathParams": ["project_id"], "body": { "title": { "type": "string", "required": true } } }] }
  326. ```
  327. A tool may also declare `codec` (`"weapi"` encrypts the body with NetEase-style AES+RSA instead of
  328. sending JSON), `staticHeaders` (headers the API insists on, such as `referer`), `bodyDefaults` (applied
  329. before caller arguments), `resultPath` (lift one JSON field into `data`), and `optional: true` on auth
  330. entries that only unlock extra data.
  331. Nothing about a connector is hidden: it is the audit trail of what an agent is allowed to call.
  332. ## FAQ
  333. <details>
  334. <summary><strong>Which agents can use connect-anything?</strong></summary>
  335. Any MCP client that can launch a stdio server. Without one, the `cxa` CLI exposes the same
  336. capabilities, minus the generated tools being callable from a chat.
  337. </details>
  338. <details>
  339. <summary><strong>Is there an npm package?</strong></summary>
  340. No, and this is deliberate: `connect-anything` on npm belongs to a different project, so
  341. `npx connect-anything` would run somebody else's code. Install from
  342. [this repository](https://github.com/Zhang-Dongfang/connect-anything) —
  343. `npx -y github:Zhang-Dongfang/connect-anything …`, a clone, or `node src/cli.js`. If a package under
  344. this project's name ever appears, it will only be announced here first.
  345. </details>
  346. <details>
  347. <summary><strong>Do I need REA installed?</strong></summary>
  348. No. REA is one optional tool for static analysis of Electron and JavaScript apps. Probing, routing,
  349. capture-to-connector, local stores, accessibility actions and the MCP server work without it.
  350. </details>
  351. <details>
  352. <summary><strong>Does it upload my app, my capture or my data?</strong></summary>
  353. No. Analysis runs locally, captures stay on disk, and connectors reference environment-variable names.
  354. What your agent does with the *results* is governed by your model provider's data policy, not by this
  355. project.
  356. </details>
  357. <details>
  358. <summary><strong>Where do credentials live?</strong></summary>
  359. In your environment. A connector stores `CXA_<APP>_<HEADER>`, never the value. If the variable is
  360. missing, the tool fails with the exact name to set instead of sending an unauthenticated request.
  361. </details>
  362. <details>
  363. <summary><strong>Will it defeat anti-bot checks or decrypt an encrypted store?</strong></summary>
  364. No — not “not yet”, no. That is the [policy boundary](docs/architecture.md#9-安全与合规边界): a layer
  365. that requires it is reported `blocked` with its reason. If you have your own tool for that job, use it;
  366. connect-anything will keep saying `blocked` and will not route around you.
  367. </details>
  368. <details>
  369. <summary><strong>macOS and Linux?</strong></summary>
  370. Everything that is not Windows-specific — capture to connector, the read-only store reader, the Skill,
  371. `cxa list`, `cxa serve` — runs anywhere Node does. The desktop facts collector is Windows-only today;
  372. AX and AT-SPI collectors are tracked as issues
  373. [#3](https://github.com/Zhang-Dongfang/connect-anything/issues/3) and
  374. [#4](https://github.com/Zhang-Dongfang/connect-anything/issues/4). The CLI says “Windows only” rather
  375. than returning an empty verdict.
  376. </details>
  377. <details>
  378. <summary><strong>What should I do if I hit a bug?</strong></summary>
  379. Update first (`git pull`, or run the `npx` form again — it always fetches current `main`). Then retry
  380. the same task. If it persists, open an issue with the target app and version, the command you ran, the
  381. full output, and what you expected. A probe result that looks wrong is a bug worth reporting even if
  382. the verdict was technically defensible.
  383. </details>
  384. ## Project status
  385. 0.1.0, pre-1.0: the connector format and the CLI can still change between minor versions. What exists
  386. today is accounted for, not promised:
  387. - **104 tests**, all passing locally and on CI (Ubuntu and Windows, Node 20, 22 and 24).
  388. - **The Skill validator** (``cxa skill --check``) refuses frontmatter that a host would silently drop.
  389. - **Real probe runs** on `Weixin 4.1.15.13` and `regedit`, with the fixtures kept so the judgements are
  390. tested on Linux too.
  391. - **Live NetEase Cloud Music tools** through MCP, including the two that fail honestly.
  392. - **Zero runtime dependencies, no build step.** Windows only where it must be, and it says so.
  393. ## Documentation
  394. - [Architecture](docs/architecture.md) — the layer model, module responsibilities, the three data
  395. flows, extension points and the policy boundary.
  396. - [Weixin case study](docs/weixin.md) — a full negative result, and why reporting it is the useful
  397. outcome.
  398. - [NetEase case study](docs/netease.md) — an encrypted API turned into working tools, including the
  399. parts that stayed broken.
  400. - [SKILL.md](skills/connect-anything/SKILL.md) — the workflow handed to an agent.
  401. - [Roadmap](ROADMAP.md) and [Contributing](CONTRIBUTING.md) — what comes next and where a change
  402. belongs.
  403. Report vulnerabilities through [SECURITY.md](SECURITY.md), privately.
  404. ## Roadmap
  405. Checked items are shipped and covered by tests; open items each link to an issue with acceptance
  406. criteria in [ROADMAP.md](ROADMAP.md).
  407. - [x] HAR → connector, zero-dependency stdio MCP server, layered router, REA bridge
  408. - [x] Encrypted request envelopes (NetEase weapi: AES+RSA) plus authored `--augment` specs
  409. - [x] Packaged as an Agent Skill (`SKILL.md` and progressive-disclosure `reference/`)
  410. - [x] Windows probe and semantic `cxa act` (UIA), run against Weixin, Calculator and Notepad
  411. - [x] Read-only local store reader (`cxa store`)
  412. - [ ] macOS and Linux facts collectors (AX, AT-SPI) — issues #3 and #4
  413. - [ ] Local recording proxy → HAR, for apps with no DevTools — issue #5
  414. - [ ] Live CDP capture with session reuse; WebSocket, GraphQL and gRPC-web bodies
  415. - [ ] Scripting providers (COM, AppleScript, D-Bus), self-healing connectors, a connector registry
  416. ## Responsible use
  417. For interoperability with software and accounts you own or are authorised to automate. Calling a
  418. private API may violate a service's terms even when the technique works; you are responsible for
  419. compliance. Credentials stay in your environment, and a `blocked` verdict is not an invitation to
  420. route around the tool.
  421. ## Contributing
  422. Small pull requests are the norm here, and you do not need an issue first: docs, tests, fixtures and
  423. small flags are reviewed as they arrive, and every pull request is labelled automatically.
  424. - [Good first issues](https://github.com/Zhang-Dongfang/connect-anything/labels/good%20first%20issue)
  425. and [help wanted](https://github.com/Zhang-Dongfang/connect-anything/labels/help%20wanted) say where
  426. help is wanted, with acceptance criteria on each one.
  427. - [CONTRIBUTING.md](CONTRIBUTING.md) has the dev setup, where a change belongs and the test rules;
  428. `npm run verify` is the whole gate.
  429. - “How do I…” questions go to
  430. [Discussions](https://github.com/Zhang-Dongfang/connect-anything/discussions);
  431. [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) sets the expectations; security problems go through
  432. [SECURITY.md](SECURITY.md).
  433. ## License
  434. [MIT](LICENSE). Not affiliated with REA, Tencent, NetEase or any other vendor whose software appears
  435. in the case studies; their terms still apply to your use of their services.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.