Skip to main content
An MCP connector adds tools from remote Model Context Protocol (MCP) servers to a Managed Deep Agent. Managed Deep Agents creates the MCP client, loads the tools, and adds them to the agent.
Managed Deep Agents is in public beta and available on LangSmith Cloud in the US region only.

Project structure

Declare MCP servers in a module directly under connectors/:
The module must export a named connector.

Add an MCP connector

Use connectors.mcp to declare one or more remote servers:
connectors/mcp.ts
Managed Deep Agents supports Streamable HTTP ("http") and legacy SSE ("sse") transports. Stdio MCP servers are not supported. Expose a stdio server over HTTP or implement its operation as an authored tool.

Select tools

By default, the connector exposes every tool from each server. To expose only selected tools, set an allowlist inside that server’s configuration:
To expose every tool except selected tools, replace includeTools with excludeTools. You can use both options together. The denylist applies after the allowlist, and the same tool cannot appear in both lists. Selection uses raw MCP tool names before Managed Deep Agents prefixes them. Tool names are prefixed with the server name by default to avoid collisions. For example, the search_docs_by_lang_chain tool from the langchainDocs server is exposed as langchainDocs__search_docs_by_lang_chain.

Configure connections

Each server accepts the following options: The connector also accepts these options: If a server requires credentials, read them from environment variables and pass them through headers. Keep local values in .env; Managed Deep Agents forwards eligible values as deployment secrets. Do not hard-code credentials in the connector declaration.

Distinguish connectors from other capabilities

  • MCP connectors add tools hosted by remote MCP servers.
  • Authored tools implement application logic in the project and are passed through the agent definition.
  • Channels receive external messages that start agent runs and deliver responses.