22
33from __future__ import annotations
44
5- from typing import Optional
5+ from typing import Iterable , Optional
66
77import httpx
88
2020from ..pagination import SyncMcpConfigsCursorIDPage , AsyncMcpConfigsCursorIDPage
2121from .._base_client import AsyncPaginator , make_request_options
2222from ..types .mcp_config_view import McpConfigView
23+ from ..types .shared_params .custom_header import CustomHeader
2324
2425__all__ = ["McpConfigsResource" , "AsyncMcpConfigsResource" ]
2526
@@ -50,6 +51,7 @@ def create(
5051 allowed_tools : SequenceNotStr [str ],
5152 endpoint : str ,
5253 name : str ,
54+ custom_headers : Optional [Iterable [CustomHeader ]] | Omit = omit ,
5355 description : Optional [str ] | Omit = omit ,
5456 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5557 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -75,6 +77,9 @@ def create(
7577 The first segment before '-' is used as the service name for tool routing (e.g.,
7678 'github-readonly' uses 'github' as the service name).
7779
80+ custom_headers: Additional headers applied to upstream requests after the credential. At most 8
81+ entries.
82+
7883 description: Optional description for this MCP configuration.
7984
8085 extra_headers: Send extra headers
@@ -94,6 +99,7 @@ def create(
9499 "allowed_tools" : allowed_tools ,
95100 "endpoint" : endpoint ,
96101 "name" : name ,
102+ "custom_headers" : custom_headers ,
97103 "description" : description ,
98104 },
99105 mcp_config_create_params .McpConfigCreateParams ,
@@ -146,6 +152,7 @@ def update(
146152 id : str ,
147153 * ,
148154 allowed_tools : Optional [SequenceNotStr [str ]] | Omit = omit ,
155+ custom_headers : Optional [Iterable [CustomHeader ]] | Omit = omit ,
149156 description : Optional [str ] | Omit = omit ,
150157 endpoint : Optional [str ] | Omit = omit ,
151158 name : Optional [str ] | Omit = omit ,
@@ -165,6 +172,9 @@ def update(
165172 allowed_tools: New glob patterns specifying which tools are allowed. Examples: ['*'] for all
166173 tools, ['github.search_*'] for specific patterns.
167174
175+ custom_headers: New list of additional headers. Replaces the existing list entirely; use an
176+ empty list to clear all custom headers. At most 8 entries.
177+
168178 description: New description for this MCP configuration.
169179
170180 endpoint: New target MCP server endpoint URL.
@@ -188,6 +198,7 @@ def update(
188198 body = maybe_transform (
189199 {
190200 "allowed_tools" : allowed_tools ,
201+ "custom_headers" : custom_headers ,
191202 "description" : description ,
192203 "endpoint" : endpoint ,
193204 "name" : name ,
@@ -336,6 +347,7 @@ async def create(
336347 allowed_tools : SequenceNotStr [str ],
337348 endpoint : str ,
338349 name : str ,
350+ custom_headers : Optional [Iterable [CustomHeader ]] | Omit = omit ,
339351 description : Optional [str ] | Omit = omit ,
340352 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
341353 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -361,6 +373,9 @@ async def create(
361373 The first segment before '-' is used as the service name for tool routing (e.g.,
362374 'github-readonly' uses 'github' as the service name).
363375
376+ custom_headers: Additional headers applied to upstream requests after the credential. At most 8
377+ entries.
378+
364379 description: Optional description for this MCP configuration.
365380
366381 extra_headers: Send extra headers
@@ -380,6 +395,7 @@ async def create(
380395 "allowed_tools" : allowed_tools ,
381396 "endpoint" : endpoint ,
382397 "name" : name ,
398+ "custom_headers" : custom_headers ,
383399 "description" : description ,
384400 },
385401 mcp_config_create_params .McpConfigCreateParams ,
@@ -432,6 +448,7 @@ async def update(
432448 id : str ,
433449 * ,
434450 allowed_tools : Optional [SequenceNotStr [str ]] | Omit = omit ,
451+ custom_headers : Optional [Iterable [CustomHeader ]] | Omit = omit ,
435452 description : Optional [str ] | Omit = omit ,
436453 endpoint : Optional [str ] | Omit = omit ,
437454 name : Optional [str ] | Omit = omit ,
@@ -451,6 +468,9 @@ async def update(
451468 allowed_tools: New glob patterns specifying which tools are allowed. Examples: ['*'] for all
452469 tools, ['github.search_*'] for specific patterns.
453470
471+ custom_headers: New list of additional headers. Replaces the existing list entirely; use an
472+ empty list to clear all custom headers. At most 8 entries.
473+
454474 description: New description for this MCP configuration.
455475
456476 endpoint: New target MCP server endpoint URL.
@@ -474,6 +494,7 @@ async def update(
474494 body = await async_maybe_transform (
475495 {
476496 "allowed_tools" : allowed_tools ,
497+ "custom_headers" : custom_headers ,
477498 "description" : description ,
478499 "endpoint" : endpoint ,
479500 "name" : name ,
0 commit comments