BaseModel
Class Attributes
| Attribute | Type | Default |
|---|---|---|
id | UUID | — |
url | AnyUrl | — |
state | ConnectorState | — |
auth_request | AuthorizationCodeRequest | None | None |
disconnect_reason | str | None | None |
metadata | Metadata | None | None |
created_at | AwareDatetime | None | None |
updated_at | AwareDatetime | None | None |
created_by | UUID | None | None |
Methods
async staticmethod create
Create a new connector
async staticmethod create
Create a new connector
Create a new connector.Args:
url: The URL of the connector/MCP server
client_id: OAuth client ID (optional)
client_secret: OAuth client secret (optional)
metadata: Additional metadata for the connector (optional)
match_preset: Whether to match against preset connectors
client: Optional PlatformClient instanceReturns:
The created Connector instance
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
url | AnyUrl | str | — |
client_id | str | None | None |
client_secret | str | None | None |
metadata | Metadata | None | None |
match_preset | bool | True |
client | PlatformClient | None | None |
'Connector'async staticmethod list
List all connectors for the current user
async staticmethod list
List all connectors for the current user
List all connectors for the current user.Returns:
A paginated list of Connector instances
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
PaginatedResult['Connector']async get
Read a specific connector by ID
async get
Read a specific connector by ID
Read a specific connector by ID.
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
'Connector'async delete
Delete a connector
async delete
Delete a connector
Delete a connector.Args:
client: Optional PlatformClient instance
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
Noneasync refresh
This is just a syntactic sugar for calling Connector.get()
async refresh
This is just a syntactic sugar for calling Connector.get()
This is just a syntactic sugar for calling Connector.get().
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
'Connector'async wait_for_state
Wait for the connector to reach connected state
async wait_for_state
Wait for the connector to reach connected state
Wait for the connector to reach connected state.This is useful after calling connect() and opening the browser for OAuth.
It will poll the server until the connector reaches ‘connected’ state or
timeout is exceeded.Args:
poll_interval: Seconds between polls (default: 2)
client: Optional PlatformClient instanceReturns:
Updated Connector instance when connectedRaises:
TimeoutError: If connector doesn’t reach connected state within timeout (300 seconds)
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
state | ConnectorState | ConnectorState.connected |
poll_interval | int | 1 |
client | PlatformClient | None | None |
'Connector'async wait_for_deletion
async wait_for_deletion
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
poll_interval | int | 1 |
client | PlatformClient | None | None |
Noneasync connect
Connect a connector (establish authorization)
async connect
Connect a connector (establish authorization)
Connect a connector (establish authorization).If the connector requires OAuth authorization, this will automatically
open the browser with the authorization endpoint.Args:
redirect_url: OAuth redirect URL (optional)
access_token: OAuth access token (optional)
client: Optional PlatformClient instanceReturns:
The updated Connector instance
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
redirect_url | AnyUrl | str | None | None |
access_token | str | None | None |
client | PlatformClient | None | None |
'Connector'async disconnect
Disconnect a connector
async disconnect
Disconnect a connector
Disconnect a connector.Args:
client: Optional PlatformClient instanceReturns:
The updated Connector instance
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
'Connector'async mcp_proxy
Proxy a streaming request through to the connector's MCP endpoint
async mcp_proxy
Proxy a streaming request through to the connector's MCP endpoint
Proxy a streaming request through to the connector’s MCP endpoint.This allows direct communication with the Model Context Protocol server
exposed by the connector. The response is streamed to avoid loading
large responses into memory.Args:
method: HTTP method (GET, POST, etc.)
headers: Optional HTTP headers to include
content: Optional request body content
client: Optional PlatformClient instanceYields:
Response content chunks as bytes
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
method | str | — |
headers | dict | None | None |
content | bytes | None | None |
client | PlatformClient | None | None |
AsyncIterator[MCPProxyResponse]async staticmethod presets
List all available connector presets
async staticmethod presets
List all available connector presets
List all available connector presets.Returns:
A paginated list of ConnectorPreset instances
Parameters
Returns:
| Name | Type | Default |
|---|---|---|
client | PlatformClient | None | None |
PaginatedResult['ConnectorPreset']