Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(cli): bare help token for mcp

Steven Enamakel884b07b872c4
diff --git a/crates/openhuman-rpc/src/host.rs b/crates/openhuman-rpc/src/host.rs
index c449aae075..a394ae2525 100644
--- a/crates/openhuman-rpc/src/host.rs
+++ b/crates/openhuman-rpc/src/host.rs
@@ -144,7 +144,7 @@ fn cli_command_uses_storage(args: &[String], has_cli_handler: impl Fn(&str) -> b
"run" | "serve" | "tui" | "chat" | "sentry-test" => false,
// The MCP server speaks stdio when given no function and runs agent
// sessions, so it needs the backend.
- "mcp" | "mcp-server" => !tail.iter().any(|a| matches!(*a, "-h" | "--help")),
+ "mcp" | "mcp-server" => !tail.iter().any(|a| is_help(a)),
// `call` and `agent` print help when given none, or on a help token
// or flag anywhere in their own tails.
"call" | "agent" => match tail.first() {
diff --git a/crates/openhuman-rpc/src/host_tests.rs b/crates/openhuman-rpc/src/host_tests.rs
index 8b67616a8f..e7f0635f55 100644
--- a/crates/openhuman-rpc/src/host_tests.rs
+++ b/crates/openhuman-rpc/src/host_tests.rs
@@ -127,6 +127,7 @@ fn cli_storage_is_opened_for_one_shot_commands_only() {
assert!(uses(&["cron", "list", "--format", "json", "--help"]));
assert!(uses(&["cron", "add", "--name", "--help"]));
assert!(uses(&["mcp"]));
+ assert!(!uses(&["mcp", "help"]));
assert!(!uses(&["mcp", "--verbose", "--help"]));
assert!(!uses(&["agent", "foo", "help"]));
assert!(!uses(&["call", "foo", "help"]));