open-codex-computer-use-mcp 0.1.33 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -33
- package/bin/open-codex-computer-use-mcp +172 -108
- package/bin/open-computer-use +172 -108
- package/bin/open-computer-use-mcp +172 -108
- package/dist/Open Computer Use.app/Contents/Info.plist +1 -1
- package/dist/Open Computer Use.app/Contents/MacOS/OpenComputerUse +0 -0
- package/dist/linux/amd64/open-computer-use +0 -0
- package/dist/linux/arm64/open-computer-use +0 -0
- package/dist/windows/amd64/open-computer-use.exe +0 -0
- package/dist/windows/arm64/open-computer-use.exe +0 -0
- package/package.json +7 -10
- package/plugins/open-computer-use/.codex-plugin/plugin.json +5 -5
- package/plugins/open-computer-use/scripts/launch-open-computer-use.sh +12 -1
- package/scripts/install-codex-plugin.sh +123 -18
- package/scripts/postinstall.mjs +6 -5
package/README.md
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
# open-codex-computer-use-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Cross-platform npm distribution for the open-source **Open Computer Use** MCP server.
|
|
4
4
|
|
|
5
|
-
This package bundles
|
|
5
|
+
This package bundles native runtimes for these supported platforms and lets the Node launcher choose the current `process.platform` / `process.arch` pair:
|
|
6
|
+
|
|
7
|
+
- `darwin-arm64`
|
|
8
|
+
- `darwin-x64`
|
|
9
|
+
- `linux-arm64`
|
|
10
|
+
- `linux-x64`
|
|
11
|
+
- `win32-arm64`
|
|
12
|
+
- `win32-x64`
|
|
13
|
+
|
|
14
|
+
Global command aliases:
|
|
6
15
|
|
|
7
16
|
- `open-computer-use`
|
|
8
17
|
- `open-computer-use-mcp`
|
|
@@ -14,7 +23,7 @@ This package bundles a ready-to-run `Open Computer Use.app`, the Codex plugin me
|
|
|
14
23
|
npm install -g open-codex-computer-use-mcp
|
|
15
24
|
```
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
The root launcher resolves the current `process.platform` / `process.arch` pair and runs the matching bundled native runtime.
|
|
18
27
|
|
|
19
28
|
## MCP config
|
|
20
29
|
|
|
@@ -31,52 +40,34 @@ If your MCP client accepts a stdio-style `mcpServers` JSON config, this is the d
|
|
|
31
40
|
}
|
|
32
41
|
```
|
|
33
42
|
|
|
34
|
-
In practice, using this package as MCP is: global install, add the JSON config, then grant macOS `Accessibility` and `Screen Recording` permission to the bundled npm-installed `Open Computer Use.app` on first use.
|
|
35
|
-
|
|
36
43
|
Package page: https://www.npmjs.com/package/open-codex-computer-use-mcp
|
|
37
44
|
|
|
38
45
|
## Use
|
|
39
46
|
|
|
40
47
|
```bash
|
|
41
|
-
# Show global help, command help, and version
|
|
42
|
-
open-computer-use --help
|
|
43
|
-
open-computer-use help snapshot
|
|
44
48
|
open-computer-use --version
|
|
49
|
+
open-computer-use --help
|
|
50
|
+
open-computer-use mcp
|
|
51
|
+
open-computer-use call list_apps
|
|
45
52
|
|
|
46
|
-
#
|
|
47
|
-
open-computer-use
|
|
53
|
+
# macOS permission check and onboarding
|
|
54
|
+
open-computer-use doctor
|
|
48
55
|
|
|
49
|
-
#
|
|
56
|
+
# Installer helpers for MCP-capable CLIs
|
|
57
|
+
open-computer-use install-claude-mcp
|
|
50
58
|
open-computer-use install-gemini-mcp
|
|
51
59
|
open-computer-use install-gemini-mcp --scope user
|
|
52
|
-
|
|
53
|
-
# Install into Codex as a plain MCP entry in ~/.codex/config.toml
|
|
54
60
|
open-computer-use install-codex-mcp
|
|
55
|
-
|
|
56
|
-
# Install into opencode in ~/.config/opencode
|
|
57
61
|
open-computer-use install-opencode-mcp
|
|
58
|
-
|
|
59
|
-
# Check permissions first; if Accessibility / Screen Recording is missing, open the permission onboarding window
|
|
60
|
-
# If both are already granted, this just prints the status and exits
|
|
61
|
-
open-computer-use doctor
|
|
62
|
-
|
|
63
|
-
# Start the stdio MCP server for Claude Desktop, Cursor, Cline, or another MCP client
|
|
64
|
-
open-computer-use mcp
|
|
65
|
-
|
|
66
|
-
# Call tools directly; the JSON-array form keeps state in one process for follow-up actions
|
|
67
|
-
open-computer-use call list_apps
|
|
68
|
-
open-computer-use call get_app_state --args '{"app":"TextEdit"}'
|
|
69
|
-
open-computer-use call --calls '[{"tool":"get_app_state","args":{"app":"TextEdit"}},{"tool":"press_key","args":{"app":"TextEdit","key":"Return"}}]'
|
|
70
|
-
|
|
71
|
-
# Install this package into the local Codex plugin marketplace/cache
|
|
72
62
|
open-computer-use install-codex-plugin
|
|
73
63
|
```
|
|
74
64
|
|
|
75
65
|
## Notes
|
|
76
66
|
|
|
77
|
-
- Version: `0.1.
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
67
|
+
- Version: `0.1.36`
|
|
68
|
+
- Supported npm platforms: `darwin-arm64`, `darwin-x64`, `linux-arm64`, `linux-x64`, `win32-arm64`, `win32-x64`
|
|
69
|
+
- macOS still requires `Accessibility` and `Screen Recording` permissions.
|
|
70
|
+
- Linux requires a signed-in desktop session with AT-SPI2 / D-Bus accessibility available for real app control.
|
|
71
|
+
- Windows requires a signed-in desktop session for UI Automation access.
|
|
81
72
|
|
|
82
73
|
Source repository: https://github.com/iFurySt/open-codex-computer-use
|
|
@@ -1,9 +1,74 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawn } = require("node:child_process");
|
|
3
|
+
const fs = require("node:fs");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
|
|
6
|
+
const platformPackages = {
|
|
7
|
+
"darwin-arm64": {
|
|
8
|
+
"executablePath": [
|
|
9
|
+
"dist",
|
|
10
|
+
"Open Computer Use.app",
|
|
11
|
+
"Contents",
|
|
12
|
+
"MacOS",
|
|
13
|
+
"OpenComputerUse"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"darwin-x64": {
|
|
17
|
+
"executablePath": [
|
|
18
|
+
"dist",
|
|
19
|
+
"Open Computer Use.app",
|
|
20
|
+
"Contents",
|
|
21
|
+
"MacOS",
|
|
22
|
+
"OpenComputerUse"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"linux-arm64": {
|
|
26
|
+
"executablePath": [
|
|
27
|
+
"dist",
|
|
28
|
+
"linux",
|
|
29
|
+
"arm64",
|
|
30
|
+
"open-computer-use"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"linux-x64": {
|
|
34
|
+
"executablePath": [
|
|
35
|
+
"dist",
|
|
36
|
+
"linux",
|
|
37
|
+
"amd64",
|
|
38
|
+
"open-computer-use"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"win32-arm64": {
|
|
42
|
+
"executablePath": [
|
|
43
|
+
"dist",
|
|
44
|
+
"windows",
|
|
45
|
+
"arm64",
|
|
46
|
+
"open-computer-use.exe"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"win32-x64": {
|
|
50
|
+
"executablePath": [
|
|
51
|
+
"dist",
|
|
52
|
+
"windows",
|
|
53
|
+
"amd64",
|
|
54
|
+
"open-computer-use.exe"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const packageRoot = path.resolve(__dirname, "..");
|
|
59
|
+
const args = process.argv.slice(2);
|
|
60
|
+
const command = args[0] || "";
|
|
61
|
+
const installCommands = new Map([
|
|
62
|
+
["install-claude-mcp", "install-claude-mcp.sh"],
|
|
63
|
+
["install-clauce-mcp", "install-claude-mcp.sh"],
|
|
64
|
+
["install-gemini-mcp", "install-gemini-mcp.sh"],
|
|
65
|
+
["install-codex-mcp", "install-codex-mcp.sh"],
|
|
66
|
+
["install-opencode-mcp", "install-opencode-mcp.sh"],
|
|
67
|
+
["install-codex-plugin", "install-codex-plugin.sh"],
|
|
68
|
+
]);
|
|
69
|
+
|
|
70
|
+
function printLauncherHelp() {
|
|
71
|
+
console.log(`Open Computer Use
|
|
7
72
|
|
|
8
73
|
Usage:
|
|
9
74
|
open-computer-use [command] [options]
|
|
@@ -11,10 +76,10 @@ Usage:
|
|
|
11
76
|
|
|
12
77
|
Commands:
|
|
13
78
|
mcp Start the stdio MCP server.
|
|
14
|
-
doctor Print permission status and launch onboarding if needed.
|
|
79
|
+
doctor Print permission status and launch onboarding if needed on macOS.
|
|
15
80
|
list-apps Print running or recently used apps.
|
|
16
81
|
snapshot <app> Print the current accessibility snapshot for an app.
|
|
17
|
-
call <tool>
|
|
82
|
+
call <tool> Call one tool, or run a JSON array of tool calls.
|
|
18
83
|
turn-ended Notify the running MCP process that the host turn ended.
|
|
19
84
|
install-claude-mcp Install the MCP server into ~/.claude.json for this project.
|
|
20
85
|
install-gemini-mcp Install the MCP server into Gemini CLI config.
|
|
@@ -29,116 +94,115 @@ Global options:
|
|
|
29
94
|
-v, --version Show version.
|
|
30
95
|
|
|
31
96
|
Notes:
|
|
32
|
-
|
|
33
|
-
Use
|
|
34
|
-
EOF
|
|
97
|
+
This npm package bundles native runtimes for supported platforms and selects the current os-arch at launch.
|
|
98
|
+
Use 'open-computer-use help <command>' for command-specific help.`);
|
|
35
99
|
}
|
|
36
100
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
script_path="$(readlink "${script_path}")"
|
|
41
|
-
if [[ "${script_path}" != /* ]]; then
|
|
42
|
-
script_path="${script_dir}/${script_path}"
|
|
43
|
-
fi
|
|
44
|
-
done
|
|
45
|
-
package_root="$(cd "$(dirname "${script_path}")/.." && pwd)"
|
|
46
|
-
app_binary="${package_root}/dist/Open Computer Use.app/Contents/MacOS/OpenComputerUse"
|
|
47
|
-
install_claude_mcp_script="${package_root}/scripts/install-claude-mcp.sh"
|
|
48
|
-
install_gemini_mcp_script="${package_root}/scripts/install-gemini-mcp.sh"
|
|
49
|
-
install_mcp_script="${package_root}/scripts/install-codex-mcp.sh"
|
|
50
|
-
install_opencode_mcp_script="${package_root}/scripts/install-opencode-mcp.sh"
|
|
51
|
-
install_script="${package_root}/scripts/install-codex-plugin.sh"
|
|
52
|
-
|
|
53
|
-
if [[ "${1:-}" == "install-claude-mcp" || "${1:-}" == "install-clauce-mcp" ]]; then
|
|
54
|
-
shift
|
|
55
|
-
exec "${install_claude_mcp_script}" "$@"
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
if [[ "${1:-}" == "install-gemini-mcp" ]]; then
|
|
59
|
-
shift
|
|
60
|
-
exec "${install_gemini_mcp_script}" "$@"
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
|
-
if [[ "${1:-}" == "install-codex-mcp" ]]; then
|
|
64
|
-
shift
|
|
65
|
-
exec "${install_mcp_script}" "$@"
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
if [[ "${1:-}" == "install-opencode-mcp" ]]; then
|
|
69
|
-
shift
|
|
70
|
-
exec "${install_opencode_mcp_script}" "$@"
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
if [[ "${1:-}" == "install-codex-plugin" ]]; then
|
|
74
|
-
shift
|
|
75
|
-
exec "${install_script}" "$@"
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
|
79
|
-
print_launcher_help
|
|
80
|
-
exit 0
|
|
81
|
-
fi
|
|
82
|
-
|
|
83
|
-
if [[ "${1:-}" == "help" && $# -le 1 ]]; then
|
|
84
|
-
print_launcher_help
|
|
85
|
-
exit 0
|
|
86
|
-
fi
|
|
87
|
-
|
|
88
|
-
if [[ "${1:-}" == "help" && "${2:-}" == "install-codex-plugin" ]]; then
|
|
89
|
-
cat <<'EOF'
|
|
90
|
-
Usage:
|
|
91
|
-
open-computer-use install-codex-plugin
|
|
101
|
+
function printInstallHelp(scriptName, usage) {
|
|
102
|
+
console.log(`Usage:
|
|
103
|
+
${usage}
|
|
92
104
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
exit 0
|
|
96
|
-
fi
|
|
105
|
+
This helper updates a local MCP or plugin config to run:
|
|
106
|
+
open-computer-use mcp
|
|
97
107
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
open-computer-use install-codex-mcp
|
|
108
|
+
Script:
|
|
109
|
+
${scriptName}`);
|
|
110
|
+
}
|
|
102
111
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
exit
|
|
106
|
-
|
|
112
|
+
function fail(message) {
|
|
113
|
+
console.error(message);
|
|
114
|
+
process.exit(1);
|
|
115
|
+
}
|
|
107
116
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
117
|
+
function spawnAndExit(executable, executableArgs) {
|
|
118
|
+
const child = spawn(executable, executableArgs, {
|
|
119
|
+
stdio: "inherit",
|
|
120
|
+
windowsHide: false,
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
child.on("error", (error) => {
|
|
124
|
+
fail(`Failed to start ${executable}: ${error.message}`);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
for (const signal of ["SIGINT", "SIGTERM"]) {
|
|
128
|
+
process.on(signal, () => {
|
|
129
|
+
child.kill(signal);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
child.on("exit", (code, signal) => {
|
|
134
|
+
if (signal) {
|
|
135
|
+
process.exit(1);
|
|
136
|
+
}
|
|
137
|
+
process.exit(code ?? 0);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
112
140
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
141
|
+
function runInstallCommand(scriptName, scriptArgs) {
|
|
142
|
+
if (process.platform === "win32") {
|
|
143
|
+
fail(`${command} currently requires a POSIX shell. Configure your MCP client with command "open-computer-use" and args ["mcp"] on Windows.`);
|
|
144
|
+
}
|
|
117
145
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
146
|
+
const scriptPath = path.join(packageRoot, "scripts", scriptName);
|
|
147
|
+
if (!fs.existsSync(scriptPath)) {
|
|
148
|
+
fail(`Missing installer helper at ${scriptPath}.`);
|
|
149
|
+
}
|
|
122
150
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
exit 0
|
|
126
|
-
fi
|
|
151
|
+
spawnAndExit(scriptPath, scriptArgs);
|
|
152
|
+
}
|
|
127
153
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
154
|
+
function resolveNativeExecutable() {
|
|
155
|
+
const platformKey = `${process.platform}-${process.arch}`;
|
|
156
|
+
const target = platformPackages[platformKey];
|
|
157
|
+
if (!target) {
|
|
158
|
+
const supported = Object.keys(platformPackages).sort().join(", ");
|
|
159
|
+
fail(`Unsupported platform ${platformKey}. Supported platforms: ${supported}.`);
|
|
160
|
+
}
|
|
133
161
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
fi
|
|
162
|
+
const executablePath = path.join(packageRoot, ...target.executablePath);
|
|
163
|
+
if (!fs.existsSync(executablePath)) {
|
|
164
|
+
fail(`Missing bundled native runtime for ${platformKey} at ${executablePath}.
|
|
138
165
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
fi
|
|
166
|
+
Reinstall with:
|
|
167
|
+
npm install -g open-computer-use`);
|
|
168
|
+
}
|
|
143
169
|
|
|
144
|
-
|
|
170
|
+
return executablePath;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (command === "-h" || command === "--help" || (command === "help" && args.length <= 1)) {
|
|
174
|
+
printLauncherHelp();
|
|
175
|
+
process.exit(0);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (command === "help" && args[1] === "install-codex-plugin") {
|
|
179
|
+
printInstallHelp("install-codex-plugin.sh", "open-computer-use install-codex-plugin");
|
|
180
|
+
process.exit(0);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (command === "help" && args[1] === "install-codex-mcp") {
|
|
184
|
+
printInstallHelp("install-codex-mcp.sh", "open-computer-use install-codex-mcp");
|
|
185
|
+
process.exit(0);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (command === "help" && args[1] === "install-gemini-mcp") {
|
|
189
|
+
printInstallHelp("install-gemini-mcp.sh", "open-computer-use install-gemini-mcp [--scope project|user]");
|
|
190
|
+
process.exit(0);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (command === "help" && args[1] === "install-opencode-mcp") {
|
|
194
|
+
printInstallHelp("install-opencode-mcp.sh", "open-computer-use install-opencode-mcp");
|
|
195
|
+
process.exit(0);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (command === "help" && (args[1] === "install-claude-mcp" || args[1] === "install-clauce-mcp")) {
|
|
199
|
+
printInstallHelp("install-claude-mcp.sh", "open-computer-use install-claude-mcp");
|
|
200
|
+
process.exit(0);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (installCommands.has(command)) {
|
|
204
|
+
const scriptName = installCommands.get(command);
|
|
205
|
+
runInstallCommand(scriptName, args.slice(1));
|
|
206
|
+
} else {
|
|
207
|
+
spawnAndExit(resolveNativeExecutable(), args);
|
|
208
|
+
}
|