fix(configurable): require opt-in for stdio MCP configs #2497
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.63) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 273 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.336
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #2497"
general
weight: 0.35
ktsoator
Linked issue
Problem: An agent config can select a local command for an stdio
McpToolsetwithout operator opt-in.Solution: Require
ADK_ALLOW_CONFIG_STDIO_MCP_SERVERSbefore argument parsing. The Go config factory only supports stdio, so it can check the switch at entry. The accepted values match ADK Python (config guard, environment parser).Behavior change
The internal config loader now rejects stdio MCP configs by default. Set
ADK_ALLOW_CONFIG_STDIO_MCP_SERVERSto1ortrue(case-insensitive) only if you trust every config the process loads. Go callers can still usemcptoolset.Newdirectly without setting the variable.Testing Plan
Unit Tests:
go mod tidy -diffpassed in both modules.With your source change reverted and your tests kept, which test fails?
TestResolveToolReferenceMcpToolsetStdioOptInfails in the rejection cases.Manual End-to-End (E2E) Tests:
Ran
adkcli --helpwith a stdio MCP config. The CLI rejected it with0and loaded it withTrUe.Checklist
Additional context
Supersedes #1591. Maintainer request.