feat(langchain): langchain.mcp namespace, `MCPAdapter` #39922
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.35) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 162 lines diff across 2 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.305
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #39922"
general
weight: 0.35
eyurtsev
adopts a new
langchain.mcpnamespace that exportsMCPAdapter:a thin wrapper over a FastMCP client that will yield a list of langchain compatible tools for an mcp connection through
.get_tools()these tools will be able to handle elicitation through interrupt semantics (now possible since mcp is stateless!)
intended as a spiritual successor to (
langchain-mcp-adapters)also is an alt implementation to what we're thinking of doing in #39887
there is a long tail of things that we're intending to support within
langchain.mcp-- for right now i'm just hoping to get good understanding on mcp connection handling + lifecycle, and will stack PRs as iterative improvements on top. To name a few still to do:broader error normalization
content conversion to langchain standard types (notably NOT resources/prompts, moreso has to do with tool I/O)
server metadata and instructions
how we handle multiple server instances (a big benefit of
MultiServerMCPClientatm, working with FastMCP to ideate here)resources and prompts
things we know we're deferring