kitewright-mcp 0.1.0
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 +47 -0
- package/bin.js +53 -0
- package/package.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# kitewright-mcp
|
|
2
|
+
|
|
3
|
+
Run the [kitewright](https://github.com/kitewright/kitewright) browser-automation
|
|
4
|
+
MCP server with **npx** — no build step, no cargo. A tiny launcher that resolves
|
|
5
|
+
the prebuilt `kite` binary for your platform and starts it over stdio.
|
|
6
|
+
|
|
7
|
+
## Use it
|
|
8
|
+
|
|
9
|
+
**Claude Code**
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
claude mcp add kitewright -- npx -y kitewright-mcp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Cursor / any MCP client** (`mcp.json`)
|
|
16
|
+
|
|
17
|
+
```jsonc
|
|
18
|
+
{
|
|
19
|
+
"mcpServers": {
|
|
20
|
+
"kitewright": {
|
|
21
|
+
"command": "npx",
|
|
22
|
+
"args": ["-y", "kitewright-mcp"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
That's it — `npx kitewright-mcp` with no args starts a stdio MCP server. Pass
|
|
29
|
+
flags through for other modes (e.g. `npx kitewright-mcp --http` for the HTTP
|
|
30
|
+
transport).
|
|
31
|
+
|
|
32
|
+
## How it works
|
|
33
|
+
|
|
34
|
+
The prebuilt `kite` binary ships as an optional per-platform dependency
|
|
35
|
+
(`@kitewright/mcp-darwin-arm64`, `-darwin-x64`, `-linux-x64-gnu`,
|
|
36
|
+
`-win32-x64-msvc`) — npm installs only the one matching your OS/arch, the same
|
|
37
|
+
pattern esbuild and napi use. The launcher `require.resolve`s it and execs it.
|
|
38
|
+
|
|
39
|
+
- Override the binary with `KITE_BINARY=/path/to/kite` (local dev / custom build).
|
|
40
|
+
- If no prebuilt package covers your platform, install from source:
|
|
41
|
+
`cargo install --git https://github.com/kitewright/kitewright kitewright`.
|
|
42
|
+
|
|
43
|
+
## Config
|
|
44
|
+
|
|
45
|
+
All kitewright env vars apply (`KITE_HEADLESS`, `KITE_IDLE_TIMEOUT_SECS`,
|
|
46
|
+
`KITE_ALLOW_SECRET_FILES`, …) — see the main
|
|
47
|
+
[README](https://github.com/kitewright/kitewright#readme).
|
package/bin.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
// Launcher for the kitewright MCP server. Resolves the prebuilt `kite` binary
|
|
4
|
+
// for this platform (shipped as an optional per-platform dependency, the same
|
|
5
|
+
// pattern esbuild/napi use) and execs it, passing through all args. With no
|
|
6
|
+
// args it defaults to `--stdio` so `npx kitewright-mcp` starts a stdio MCP
|
|
7
|
+
// server — the form MCP clients (Claude Code, Cursor) launch.
|
|
8
|
+
const { spawnSync } = require("node:child_process");
|
|
9
|
+
|
|
10
|
+
// platform-arch -> optional dependency package that ships the binary
|
|
11
|
+
const PKG_BY_TARGET = {
|
|
12
|
+
"darwin-arm64": "@kitewright/mcp-darwin-arm64",
|
|
13
|
+
"darwin-x64": "@kitewright/mcp-darwin-x64",
|
|
14
|
+
"linux-x64": "@kitewright/mcp-linux-x64-gnu",
|
|
15
|
+
"win32-x64": "@kitewright/mcp-win32-x64-msvc",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
function resolveBinary() {
|
|
19
|
+
// Explicit override wins (local dev / custom builds).
|
|
20
|
+
if (process.env.KITE_BINARY) return process.env.KITE_BINARY;
|
|
21
|
+
|
|
22
|
+
const target = `${process.platform}-${process.arch}`;
|
|
23
|
+
const exe = process.platform === "win32" ? "kite.exe" : "kite";
|
|
24
|
+
const pkg = PKG_BY_TARGET[target];
|
|
25
|
+
if (pkg) {
|
|
26
|
+
try {
|
|
27
|
+
return require.resolve(`${pkg}/${exe}`);
|
|
28
|
+
} catch {
|
|
29
|
+
/* optional dep not installed for this platform — fall through */
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// Last resort: a `kite` already on PATH (e.g. `cargo install`).
|
|
33
|
+
return exe;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const args = process.argv.slice(2);
|
|
37
|
+
if (args.length === 0) args.push("--stdio");
|
|
38
|
+
|
|
39
|
+
const bin = resolveBinary();
|
|
40
|
+
const res = spawnSync(bin, args, { stdio: "inherit" });
|
|
41
|
+
|
|
42
|
+
if (res.error) {
|
|
43
|
+
const target = `${process.platform}-${process.arch}`;
|
|
44
|
+
process.stderr.write(
|
|
45
|
+
`kitewright-mcp: could not launch the kite binary (${bin}): ${res.error.message}\n` +
|
|
46
|
+
(PKG_BY_TARGET[target]
|
|
47
|
+
? `The prebuilt package for ${target} may have failed to install. `
|
|
48
|
+
: `No prebuilt binary is published for ${target}. `) +
|
|
49
|
+
`Set KITE_BINARY=/path/to/kite, or install it with \`cargo install --git https://github.com/kitewright/kitewright kitewright\`.\n`,
|
|
50
|
+
);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
process.exit(res.status == null ? 1 : res.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "kitewright-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Kitewright browser-automation MCP server — run with npx, no build step. Backed by the Rust kite engine.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "github:kitewright/kitewright",
|
|
7
|
+
"bin": {
|
|
8
|
+
"kitewright-mcp": "bin.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin.js"
|
|
12
|
+
],
|
|
13
|
+
"optionalDependencies": {
|
|
14
|
+
"@kitewright/mcp-darwin-arm64": "0.1.0",
|
|
15
|
+
"@kitewright/mcp-darwin-x64": "0.1.0",
|
|
16
|
+
"@kitewright/mcp-linux-x64-gnu": "0.1.0",
|
|
17
|
+
"@kitewright/mcp-win32-x64-msvc": "0.1.0"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"mcp",
|
|
21
|
+
"model-context-protocol",
|
|
22
|
+
"browser",
|
|
23
|
+
"automation",
|
|
24
|
+
"playwright-alternative",
|
|
25
|
+
"kitewright"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=18"
|
|
29
|
+
}
|
|
30
|
+
}
|