Skip to main content
POST
/
mcp-servers
Register an MCP server
curl --request POST \
  --url https://api.smith.langchain.com/v1/deepagents/mcp-servers \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "name": "tavily",
  "url": "https://mcp.tavily.com/mcp/",
  "headers": [
    {
      "key": "Authorization",
      "value": "Bearer tvly-..."
    }
  ]
}
'
{
  "id": "5b6f6a2b-2c95-4f0f-9c2b-7c3a3e4f8d11",
  "tenant_id": "33499cf9-4c02-49af-909d-b8f42e051eab",
  "name": "tavily",
  "url": "https://mcp.tavily.com/mcp/",
  "headers": [
    {
      "key": "Authorization",
      "value": "Bearer tvly-..."
    }
  ],
  "auth_type": "",
  "oauth_mode": "",
  "created_at": "2026-05-20T20:50:32.708302+00:00",
  "updated_at": "2026-05-20T20:50:32.708302+00:00",
  "mcp_vendor_id": null,
  "vendor_id": null,
  "external_system_id": null
}

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.

Authorizations

X-Api-Key
string
header
default:LANGSMITH_API_KEY
required

Body

application/json
name
string
required

Human-readable name for the MCP server.

url
string<uri>
required

MCP server URL. Must be a valid HTTPS endpoint.

headers
object[]

Credential headers attached to every invocation of this MCP server. Omitted from response bodies when the caller lacks invoke permission on the server.

auth_type
string

Authentication scheme used by the MCP server. Defaults to no authentication.

oauth_provider_id
string<uuid> | null

Optional OAuth provider ID for legacy shared OAuth providers. Not applicable to Managed Deep Agents in private preview.

oauth_mode
enum<string>

OAuth mode. Managed Deep Agents only supports static headers credentials in private preview.

Available options:
legacy_shared_provider,
per_user_dynamic_client
vendor_id
string

Optional vendor identifier for catalog grouping.

external_system_id
string

Optional opaque external system identifier.

Response

MCP server registered.

id
string<uuid>
tenant_id
string<uuid>
name
string
url
string<uri>
headers
object[]

Credential headers attached to every invocation of this MCP server. Omitted from response bodies when the caller lacks invoke permission on the server.

auth_type
string
oauth_provider_id
string<uuid> | null
oauth_mode
string
created_at
string<date-time>
updated_at
string<date-time>
mcp_vendor_id
string | null
vendor_id
string | null
external_system_id
string | null
can_invoke
boolean

Whether the caller has invoke permission on this server. Omitted when ambient permissions already imply invoke.