Skip to main content
PATCH
/
mcp-servers
/
{mcp_server_id}
Update an MCP server
curl --request PATCH \
  --url https://api.smith.langchain.com/v1/deepagents/mcp-servers/{mcp_server_id} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "headers": [
    {
      "key": "Authorization",
      "value": "Bearer tvly-rotated-..."
    }
  ]
}
'
{ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "<string>", "url": "<string>", "headers": [ { "key": "<string>", "value": "<string>" } ], "oauth_provider_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "created_at": "2023-11-07T05:31:56Z", "updated_at": "2023-11-07T05:31:56Z", "mcp_vendor_id": "<string>", "vendor_id": "<string>", "external_system_id": "<string>", "can_invoke": true }

Documentation Index

Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-vicmda-1780088974-0fb0763.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Api-Key
string
header
default:LANGSMITH_API_KEY
required

Path Parameters

mcp_server_id
string<uuid>
required

MCP server ID.

Body

application/json

All fields are optional. Passing headers replaces the entire stored header array.

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. Passing this field replaces the entire stored array.

auth_type
enum<string>

Authentication scheme used by the MCP server.

Available options:
headers,
oauth
oauth_provider_id
string<uuid> | null

Optional OAuth provider ID for legacy shared OAuth providers.

oauth_mode
enum<string>

OAuth mode used by an OAuth MCP server.

Available options:
legacy_shared_provider,
per_user_dynamic_client

Response

MCP server updated.

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
enum<string>

Authentication scheme used by the MCP server.

Available options:
headers,
oauth
oauth_provider_id
string<uuid> | null

OAuth provider ID for legacy shared OAuth providers, when configured.

oauth_mode
enum<string>

OAuth mode used by an OAuth MCP server.

Available options:
legacy_shared_provider,
per_user_dynamic_client
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.