Managed Deep Agents can call tools exposed by registered MCP servers. MCP servers are workspace-level resources, so register or connect them before you deploy an agent that references them. You can see all your MCP servers in the Settings tab of LangSmith.Documentation Index
Fetch the complete documentation index at: https://docs.langchain.com/llms.txt
Use this file to discover all available pages before exploring further.
Managed Deep Agents is in private preview. Join the waitlist to request access.
CLI: connect MCP tools
Add a static-header MCP server
Register a server:--header for multiple headers:
Add an OAuth MCP server
Register and connect an OAuth MCP server:- Creates the MCP server with
auth_type=oauthandoauth_mode=per_user_dynamic_client. - Registers or discovers the caller’s per-user OAuth provider with
/v1/deepagents/mcp-servers/{mcp_server_id}/oauth-provider. - Starts an OAuth session with
/v1/deepagents/auth-sessions. - Prints and opens the verification URL.
- Polls
/v1/deepagents/auth-sessions/{session_id}until OAuth completes.
--scope to request OAuth scopes:
--timeout 0 to start the OAuth flow without polling:
deepagents mcp-servers connect <mcp_server_id> later to complete or reuse the connection.
Reference MCP tools
Reference MCP tools from atools.json file in your project root. Each entry names a tool exposed by a registered MCP server and points at that server by URL:
name and mcp_server_url. The mcp_server_name and display_name fields are optional.
Use interrupt_config to require human approval before a tool runs. Key each entry by "{mcp_server_url}::{tool_name}" and set it to true. Additional ::{mcp_server_name} components are accepted for compatibility.
deepagents init does not create tools.json. Add it yourself when your agent calls MCP tools, then run deepagents deploy. An agent with no tools.json deploys with no MCP tools.Validate tools at deploy time
Before deploying, the CLI validates referenced MCP server URLs:- If a server URL is not registered, deploy fails with a command hint to add it.
- If an OAuth server is registered but the caller cannot invoke it, deploy fails with a hint to run
deepagents mcp-servers connect <mcp_server_id>.
API: connect MCP tools
Set request defaults:X-Api-Key header:
POST /v1/deepagents/mcp-servers:
- Python (httpx)
- JavaScript (fetch)
- cURL
POST /v1/deepagents/mcp-serverswithauth_type=oauthandoauth_mode=per_user_dynamic_client.POST /v1/deepagents/mcp-servers/{mcp_server_id}/oauth-provider.POST /v1/deepagents/auth-sessions.GET /v1/deepagents/auth-sessions/{session_id}until the session status isCOMPLETED.
tools.json file that references the registered MCP server URLs.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

