Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ All notable user-facing changes to Rustwright are documented in this file.

- Moved actionability waits for supported, optionless `AsyncPage.click()` and `AsyncPage.fill()` calls into the Rust core while preserving trusted browser input and a single action deadline.
- Centralized evaluation value decoding in the Rust core for the Go/C-ABI and native Rust surfaces, and added structured timeout, closed, crashed, and disconnected errors for the Python API.
- Promoted the native Rust MCP server (`mcp-rs/`) into the open-source tree as the canonical `rustwright-mcp` implementation; documentation now targets it.
- Promoted the native Rust MCP server (`mcp-rs/`) into the open-source tree as the canonical `rustwright-mcp` implementation; documentation now targets it, the `rustwright mcp` CLI verb launches it, and its cargo package and binary are named `rustwright-mcp` to match the npm distribution.

### Deprecated

Expand Down
3 changes: 2 additions & 1 deletion CODE_ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ C-ABI bindings.
| `python/rustwright/pytest_plugin.py` | Pytest fixtures. |
| `python/playwright/*`, `python/patchright/*`, `python/cloakbrowser/*` | Compatibility import packages. Public alpha compatibility imports should be enabled only through opt-in compatibility mode. |
| `rust-native/` | Native Rust facade crate over `rustwright-core` (crates.io `rustwright`); also the facade `mcp-rs/` consumes. |
| `mcp-rs/` | Native Rust MCP stdio server on the promoted engine facade. |
| `mcp-rs/` | `rustwright-mcp`: the canonical native Rust MCP stdio server on the promoted engine facade, with its npm packaging under `mcp-rs/npm/`. |
| `mcp/` | Deprecated Python MCP server (present in the public tree only, outside the sync map); superseded by `mcp-rs/` and removed once the native tool set reaches parity. |
| `node/` | napi-rs binding (in-process, links `rustwright-core` directly). |
| `capi/` | Shared C ABI (`librustwright_capi`) over `rustwright-core`; the boundary for the Go/Java/C#/Ruby/PHP bindings. |
| `go/`, `java/`, `csharp/`, `ruby/`, `php/` | C-ABI language bindings (alpha surface) + per-language conformance runners. |
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ compact accessibility snapshots and inline PNG screenshots. It lives in
From source (needs a Rust toolchain):

```bash
cargo install --git https://github.com/Skyvern-AI/rustwright mcp-rs
cargo install --git https://github.com/Skyvern-AI/rustwright rustwright-mcp
```

This installs the server binary as `mcp-rs`. An npm package (`rustwright-mcp`,
This installs the server binary as `rustwright-mcp`. An npm package (`rustwright-mcp`,
prebuilt binaries via `npx rustwright-mcp`) is on the way.

If Chrome or Chromium is already installed, point Rustwright at it with
Expand All @@ -156,7 +156,7 @@ Open `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS
{
"mcpServers": {
"rustwright": {
"command": "mcp-rs"
"command": "rustwright-mcp"
}
}
}
Expand All @@ -168,7 +168,7 @@ Open `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS
{
"mcpServers": {
"rustwright": {
"command": "mcp-rs"
"command": "rustwright-mcp"
}
}
}
Expand Down
24 changes: 12 additions & 12 deletions mcp-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mcp-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "mcp-rs"
name = "rustwright-mcp"
version = "0.1.0"
edition = "2024"
publish = false
Expand Down
6 changes: 3 additions & 3 deletions mcp-rs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ new capabilities land here only.
From source (needs a Rust toolchain):

```bash
cargo install --git https://github.com/Skyvern-AI/rustwright mcp-rs
cargo install --git https://github.com/Skyvern-AI/rustwright rustwright-mcp
```

The server binary is installed as `mcp-rs`. An npm distribution
The server binary is installed as `rustwright-mcp`. An npm distribution
(`rustwright-mcp`, prebuilt per-platform binaries, run with
`npx rustwright-mcp`) is prepared under [`npm/`](npm/) and is on the way.

Expand Down Expand Up @@ -48,7 +48,7 @@ other MCP client:
{
"mcpServers": {
"rustwright": {
"command": "mcp-rs",
"command": "rustwright-mcp",
"env": {
"RUSTWRIGHT_CHROMIUM": "/path/to/chrome-or-chromium"
}
Expand Down
10 changes: 5 additions & 5 deletions mcp-rs/npm/main/platforms.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"darwin-arm64": {
"package": "@skyvernai/rustwright-mcp-darwin-arm64",
"binary": "mcp-rs"
"binary": "rustwright-mcp"
},
"darwin-x64": {
"package": "@skyvernai/rustwright-mcp-darwin-x64",
"binary": "mcp-rs"
"binary": "rustwright-mcp"
},
"linux-x64": {
"package": "@skyvernai/rustwright-mcp-linux-x64-gnu",
"binary": "mcp-rs"
"binary": "rustwright-mcp"
},
"linux-arm64": {
"package": "@skyvernai/rustwright-mcp-linux-arm64-gnu",
"binary": "mcp-rs"
"binary": "rustwright-mcp"
},
"win32-x64": {
"package": "@skyvernai/rustwright-mcp-win32-x64",
"binary": "mcp-rs.exe"
"binary": "rustwright-mcp.exe"
}
}
2 changes: 1 addition & 1 deletion mcp-rs/npm/scripts/build-npm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function crateVersion() {
const manifest = fs.readFileSync(path.join(crateDirectory, 'Cargo.toml'), 'utf8');
const packageSection = manifest.match(/\[package\]([\s\S]*?)(?=\n\[|$)/);
const version = packageSection?.[1].match(/^version\s*=\s*"([^"]+)"\s*$/m)?.[1];
if (!version) fail('could not read the mcp-rs package version from Cargo.toml');
if (!version) fail('could not read the rustwright-mcp package version from Cargo.toml');
return version;
}

Expand Down
10 changes: 5 additions & 5 deletions mcp-rs/npm/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"rustTarget": "aarch64-apple-darwin",
"os": "darwin",
"cpu": "arm64",
"binary": "mcp-rs",
"binary": "rustwright-mcp",
"package": "@skyvernai/rustwright-mcp-darwin-arm64",
"runner": "macos-15",
"cross": false
Expand All @@ -16,7 +16,7 @@
"rustTarget": "x86_64-apple-darwin",
"os": "darwin",
"cpu": "x64",
"binary": "mcp-rs",
"binary": "rustwright-mcp",
"package": "@skyvernai/rustwright-mcp-darwin-x64",
"runner": "macos-15-intel",
"cross": false
Expand All @@ -28,7 +28,7 @@
"os": "linux",
"cpu": "x64",
"libc": "glibc",
"binary": "mcp-rs",
"binary": "rustwright-mcp",
"package": "@skyvernai/rustwright-mcp-linux-x64-gnu",
"runner": "ubuntu-24.04",
"zig": true,
Expand All @@ -42,7 +42,7 @@
"os": "linux",
"cpu": "arm64",
"libc": "glibc",
"binary": "mcp-rs",
"binary": "rustwright-mcp",
"package": "@skyvernai/rustwright-mcp-linux-arm64-gnu",
"runner": "ubuntu-24.04",
"zig": true,
Expand All @@ -55,7 +55,7 @@
"rustTarget": "x86_64-pc-windows-msvc",
"os": "win32",
"cpu": "x64",
"binary": "mcp-rs.exe",
"binary": "rustwright-mcp.exe",
"package": "@skyvernai/rustwright-mcp-win32-x64",
"runner": "windows-2022",
"cross": false
Expand Down
5 changes: 4 additions & 1 deletion mcp-rs/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ fn output_content(
impl ServerHandler for BrowserServer {
fn get_info(&self) -> ServerInfo {
ServerInfo::new(ServerCapabilities::builder().enable_tools().build())
.with_server_info(Implementation::new("mcp-rs", env!("CARGO_PKG_VERSION")))
.with_server_info(Implementation::new(
"rustwright-mcp",
env!("CARGO_PKG_VERSION"),
))
.with_instructions("Browser commands execute in order on one dedicated owner thread.")
}

Expand Down
2 changes: 1 addition & 1 deletion mcp-rs/tests/stdio_e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ impl ServerProcess {
remote: Option<(&str, &Value, u64)>,
environment: &[(&str, &str)],
) -> Self {
let mut command = Command::new(env!("CARGO_BIN_EXE_mcp-rs"));
let mut command = Command::new(env!("CARGO_BIN_EXE_rustwright-mcp"));
command
.env_remove("RUSTWRIGHT_MCP_CDP_ENDPOINT")
.env_remove("RUSTWRIGHT_MCP_CDP_HEADERS")
Expand Down
2 changes: 1 addition & 1 deletion mcp-rs/tests/validation_p1b_remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ struct ServerProcess {

impl ServerProcess {
fn spawn_remote(endpoint: &str, headers: &Value) -> Self {
let mut child = Command::new(env!("CARGO_BIN_EXE_mcp-rs"))
let mut child = Command::new(env!("CARGO_BIN_EXE_rustwright-mcp"))
.env_remove("RUSTWRIGHT_MCP_CDP_ENDPOINT")
.env_remove("RUSTWRIGHT_MCP_CDP_HEADERS")
.env_remove("RUSTWRIGHT_MCP_CDP_TIMEOUT_MS")
Expand Down
4 changes: 2 additions & 2 deletions python/rustwright/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1481,7 +1481,7 @@ def _mcp_main(argv: Sequence[str], *, program: str) -> int:
if binary is None:
print(
"rustwright mcp requires the native rustwright-mcp server binary; "
"install it with: cargo install --git https://github.com/Skyvern-AI/rustwright mcp-rs\n"
"install it with: cargo install --git https://github.com/Skyvern-AI/rustwright rustwright-mcp\n"
"or install the rustwright-mcp npm package once it is published",
file=sys.stderr,
)
Expand Down Expand Up @@ -1554,7 +1554,7 @@ def _print_mcp_help(program: str) -> None:
print(
f"usage: {program} mcp [args...]\n\n"
"Run the native MCP stdio server (requires the rustwright-mcp binary).\n"
"Install with: cargo install --git https://github.com/Skyvern-AI/rustwright mcp-rs"
"Install with: cargo install --git https://github.com/Skyvern-AI/rustwright rustwright-mcp"
)


Expand Down
9 changes: 5 additions & 4 deletions tests/test_cli_mcp_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ def _native_server_binary():
if found:
return Path(found)
for profile in ("debug", "release"):
candidate = REPOSITORY / "mcp-rs" / "target" / profile / "mcp-rs"
if candidate.is_file() and os.access(candidate, os.X_OK):
return candidate
for name in ("rustwright-mcp", "mcp-rs"):
candidate = REPOSITORY / "mcp-rs" / "target" / profile / name
if candidate.is_file() and os.access(candidate, os.X_OK):
return candidate
return None


Expand Down Expand Up @@ -122,7 +123,7 @@ def read_stdout():
assert "error" not in initialize_response
initialize_result = initialize_response["result"]
assert initialize_result["protocolVersion"] == "2024-11-05"
assert initialize_result["serverInfo"]["name"] == "mcp-rs"
assert initialize_result["serverInfo"]["name"] == "rustwright-mcp"

_send_message(
process,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli_mcp_verb.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_mcp_missing_binary_prints_install_help_without_traceback(
captured = capsys.readouterr()
assert captured.out == ""
assert (
"cargo install --git https://github.com/Skyvern-AI/rustwright mcp-rs"
"cargo install --git https://github.com/Skyvern-AI/rustwright rustwright-mcp"
in captured.err
)
assert len(captured.err.splitlines()) == 2
Expand Down Expand Up @@ -97,4 +97,4 @@ def test_help_mcp_prints_usage_and_install_hint(capsys):
captured = capsys.readouterr()
assert captured.err == ""
assert "usage: rustwright mcp [args...]" in captured.out
assert "cargo install --git https://github.com/Skyvern-AI/rustwright mcp-rs" in captured.out
assert "cargo install --git https://github.com/Skyvern-AI/rustwright rustwright-mcp" in captured.out
4 changes: 2 additions & 2 deletions tests/test_validation_mcp_verb.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_validation_missing_binary_is_clean_two_line_error(
assert captured.out == ""
assert captured.err.splitlines() == [
"rustwright mcp requires the native rustwright-mcp server binary; "
"install it with: cargo install --git https://github.com/Skyvern-AI/rustwright mcp-rs",
"install it with: cargo install --git https://github.com/Skyvern-AI/rustwright rustwright-mcp",
"or install the rustwright-mcp npm package once it is published",
]
assert "Traceback" not in captured.err
Expand Down Expand Up @@ -96,7 +96,7 @@ def test_validation_help_mcp_succeeds(capsys):
assert captured.err == ""
assert "usage: rustwright mcp [args...]" in captured.out
assert (
"cargo install --git https://github.com/Skyvern-AI/rustwright mcp-rs"
"cargo install --git https://github.com/Skyvern-AI/rustwright rustwright-mcp"
in captured.out
)

Expand Down
Loading