ractogateway.mcp._models
Pydantic models for MCP server and client configuration.
These models carry no optional-dependency imports: they are safe to import
even without the mcp package installed.
- class ractogateway.mcp._models.MCPServerConfig(**data)[source]
Bases:
BaseModelConfiguration for a
RactoMCPServerinstance.- Parameters:
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.
self is explicitly positional-only to allow self as a field name.
- name: str
- description: str
- version: str
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ractogateway.mcp._models.MCPClientConfig(**data)[source]
Bases:
BaseModelConfiguration for connecting to an MCP server.
- Parameters:
transport (Literal['stdio', 'sse', 'streamable-http']) – MCP transport to use.
"stdio"is standard for subprocess-based servers (e.g. Claude Desktop)."sse"/"streamable-http"are for HTTP-based servers.command (str | None) – Executable to launch the server process — required for stdio.
args (list[str]) – Command-line arguments passed to command (stdio only).
env (dict[str, str]) – Extra environment variables injected into the server process (stdio only). Merged on top of the inherited environment.
url (str | None) – Server URL — required for sse / streamable-http. Example:
"http://localhost:8000/sse".
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.
self is explicitly positional-only to allow self as a field name.
- transport: Literal['stdio', 'sse', 'streamable-http']
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ractogateway.mcp._models.MCPToolResult(**data)[source]
Bases:
BaseModelResult returned from calling a remote MCP tool.
- Parameters:
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.
self is explicitly positional-only to allow self as a field name.
- content: str
- is_error: bool
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].