The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(mcp): scrub secrets from MCP tool execution errors
Steven Enamakel426b0a1382f4
diff --git a/crates/openhuman-core/src/tools/impl/network/mcp.rs b/crates/openhuman-core/src/tools/impl/network/mcp.rsindex 427fb67517..15d6c56336 100644--- a/crates/openhuman-core/src/tools/impl/network/mcp.rs+++ b/crates/openhuman-core/src/tools/impl/network/mcp.rs@@ -402,6 +402,10 @@ impl SecretScrubber {self.scrub_text(text, true)}+ pub(super) fn scrub_error(&self, error: &anyhow::Error) -> String {+ self.scrub(&error.to_string())+ }+fn scrub_key(&self, text: &str) -> String {// Object keys carry structure (tool names and JSON schema fields). Keep// short query credentials from matching inside those names while stilldiff --git a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rsindex 4c48ca7650..9a59ec98ef 100644--- a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs+++ b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools.rs@@ -242,7 +242,11 @@ impl Tool for ConfiguredMcpServerTool {if !safe.iter().any(|candidate| candidate.name == tool) {anyhow::bail!("MCP tool is no longer available or safe: {server}/{tool}");}- let result = self.inner.execute(args).await?;+ let result = self+ .inner+ .execute(args)+ .await+ .map_err(|error| anyhow::anyhow!(self.scrubber.scrub_error(&error)))?;Ok(self.scrubber.scrub_result(result))}}