Managed Deep Agents is in private preview, available on LangSmith Cloud in the US region only. Join the waitlist to request access.
CLI: connect MCP tools
Add a static-header MCP server
Register a server:--header for multiple headers:
tools.json snippet. To skip that step, pass --no-tools.
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 <id|name|url> later to complete or reuse the connection.
List available tools
List the tools exposed by a registered MCP server:tools.json snippet. Use this command when you need to add or refresh tool entries after registering a server.
Reference MCP tools
Reference MCP tools from thetools.json file in your project root. deepagents init creates this file with an empty tools array. 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.
Keep tools.json empty when the agent should deploy 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 <id|name|url>.
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.
GET /v1/deepagents/mcp/tools. Pass the registered server URL as url. For OAuth servers, also pass the oauth_provider_id returned on the MCP server record.
After you connect tools, deploy the agent with a tools.json file that references the registered MCP server URLs.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

