Skip to content

Fix Deep Agents MCP example — remove broken context manager usage#4638

Merged
Naomi Pentrel (npentrel) merged 1 commit into
mainfrom
docs/fix-deep-agents-mcp-context-manager
Jun 29, 2026
Merged

Fix Deep Agents MCP example — remove broken context manager usage#4638
Naomi Pentrel (npentrel) merged 1 commit into
mainfrom
docs/fix-deep-agents-mcp-context-manager

Conversation

@langsmith-fleet

Copy link
Copy Markdown
Contributor

Fixes DOC-1308

Summary

  • Replace the broken async with MultiServerMCPClient(...) as client: pattern in the Deep Agents MCP tools page with the correct direct-instantiation pattern
  • As of langchain-mcp-adapters==0.1.0, MultiServerMCPClient cannot be used as an async context manager — calling __aenter__ raises NotImplementedError
  • The updated example matches the already-correct pattern shown on the LangChain MCP quickstart page

Links

Verification

Not run; docs-only copy change removing a broken code pattern. The fix aligns with the already-correct JS example on the same page and the Python example on the LangChain MCP quickstart page.

Reviewers

Requested review from: Naomi Pentrel (@npentrel), Lauren Hirata Singh (@lnhsingh)

@github-actions github-actions Bot added deepagents For docs changes to Deep Agents oss external User is not a member of langchain-ai labels Jun 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Mintlify preview branch generated: preview-docsfi-1782565220-3e5e53a

Site preview: https://langchain-5e9cc07a-preview-docsfi-1782565220-3e5e53a.mintlify.app

Important

Preview links may take a few minutes to start working while the deployment finishes.

Changed documentation pages (preview deep links):

@npentrel
Naomi Pentrel (npentrel) marked this pull request as ready for review June 29, 2026 10:35
@npentrel
Naomi Pentrel (npentrel) merged commit f4cc86e into main Jun 29, 2026
29 checks passed
@npentrel
Naomi Pentrel (npentrel) deleted the docs/fix-deep-agents-mcp-context-manager branch June 29, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepagents For docs changes to Deep Agents external User is not a member of langchain-ai oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants