lc on Discord: "mcp 搜索出去的脱敏了吗?"
A searcher model is asked through serve, which masks its request, and the
image and vision MCPs go through the masked routes too. But the search
APIs (Tavily, Brave, Exa, Firecrawl, SearXNG, ...), a Kimi Code plan's
search service and WorkBuddy's search were sent the query as it came. A
model's own web_search writes its query from a request already masked, but
an agent's call to the search MCP carries the query as the agent's model
wrote it, with the values put back, so a secret or phone number in it went
out as written.
maskedQuery masks the query, as Settings say, where it leaves magpie for
each of those three (a plan the user set to go unmasked, SkipsRedaction,
keeps it), and searchMCPRun puts the values back in what it returns to
the agent. Scoped by where the value goes (the query field of a search
service's request), not by a key's name.
Run: TestSearchQueryMasked; each of the four changes removed alone turns it
red (search API, Kimi, WorkBuddy asked the phone number; the agent got the
placeholder back). -run 'Search|Redact|Kimi|WorkBuddy|MCP' over
internal/gateway (sandbox HOME); gofmt -l; go vet darwin, GOOS=linux
-tags nogui, GOOS=windows. docs/subsystems/gateway-routing.md says it.
Not tried: a real search API or a real agent's MCP call.