nat.plugins.mcp.client_config#
Classes#
Configuration for overriding tool properties when exposing from MCP server. |
|
Server connection details for MCP client. |
|
Configuration for connecting to an MCP server as a client and exposing selected tools. |
Module Contents#
- class MCPToolOverrideConfig(/, **data: Any)#
Bases:
pydantic.BaseModelConfiguration for overriding tool properties when exposing from MCP server.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.
- class MCPServerConfig(/, **data: Any)#
Bases:
pydantic.BaseModelServer connection details for MCP client. Supports stdio, sse, and streamable-http transports. streamable-http is the recommended default for HTTP-based connections.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- transport: Literal['stdio', 'sse', 'streamable-http'] = None#
- auth_provider: str | nat.data_models.component_ref.AuthenticationRef | None = None#
- validate_model()#
Validate that stdio and SSE/Streamable HTTP properties are mutually exclusive.
- class MCPClientConfig(/, **data: Any)#
Bases:
nat.data_models.function.FunctionGroupBaseConfigConfiguration for connecting to an MCP server as a client and exposing selected tools.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- server: MCPServerConfig = None#
- tool_call_timeout: datetime.timedelta = None#
- auth_flow_timeout: datetime.timedelta = None#
- tool_overrides: dict[str, MCPToolOverrideConfig] | None = None#
- session_idle_timeout: datetime.timedelta = None#
- _validate_reconnect_backoff() MCPClientConfig#
Validate reconnect backoff values.