(beta) Connectors API - manage your connectors
Create a new MCP connector. You can customize its visibility, url and auth type.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .create (name = "<value>" , description = "unibody usually despite slushy wherever reward stingy from" , server = "https://royal-majority.net/" )
# Handle response
print (res )
Parameter
Type
Required
Description
name
str
✔️
The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes.
description
str
✔️
The description of the connector.
server
str
✔️
The url of the MCP server.
icon_url
OptionalNullable[str]
➖
The optional url of the icon you want to associate to the connector.
visibility
Optional[models.ResourceVisibility]
➖
N/A
headers
Dict[str, Any ]
➖
Optional organization-level headers to be sent with the request to the mcp server.
auth_data
OptionalNullable[models.AuthData]
➖
Optional additional authentication data for the connector.
system_prompt
OptionalNullable[str]
➖
Optional system prompt for the connector.
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.Connector
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
List all your custom connectors with keyset pagination and filters.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .list (page_size = 100 )
# Handle response
print (res )
models.PaginatedConnectors
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
Get the OAuth2 authorization URL for a connector to initiate user authentication.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .get_auth_url (connector_id_or_name = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
connector_id_or_name
str
✔️
N/A
app_return_url
OptionalNullable[str]
➖
N/A
credentials_name
OptionalNullable[str]
➖
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.AuthURLResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
Call a tool on an MCP connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .call_tool (tool_name = "<value>" , connector_id_or_name = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
tool_name
str
✔️
N/A
connector_id_or_name
str
✔️
N/A
credentials_name
OptionalNullable[str]
➖
N/A
arguments
Dict[str, Any ]
➖
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.ConnectorToolCallResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
List all tools available for an MCP connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .list_tools (connector_id_or_name = "<value>" , page = 1 , page_size = 100 , refresh = False , pretty = False )
# Handle response
print (res )
Parameter
Type
Required
Description
connector_id_or_name
str
✔️
N/A
page
Optional[int]
➖
N/A
page_size
Optional[int]
➖
N/A
refresh
Optional[bool]
➖
N/A
pretty
Optional[bool]
➖
Return a simplified payload with only name, description, annotations, and a compact inputSchema.
credentials_name
OptionalNullable[str]
➖
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.ResponseConnectorListToolsV1
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
get_authentication_methods
Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .get_authentication_methods (connector_id_or_name = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
connector_id_or_name
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
List[models.PublicAuthenticationMethod]
Error Type
Status Code
Content Type
errors.SDKError
4XX, 5XX
*/*
list_organization_credentials
List all credentials configured at the organization level for a given connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .list_organization_credentials (connector_id_or_name = "<value>" , fetch_default = False )
# Handle response
print (res )
models.CredentialsResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
create_or_update_organization_credentials
Create or update credentials at the organization level for a given connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .create_or_update_organization_credentials (connector_id_or_name = "<value>" , name = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
connector_id_or_name
str
✔️
N/A
name
str
✔️
Name of the credentials. Use this name to access or modify your credentials.
is_default
OptionalNullable[bool]
➖
Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged.
credentials
OptionalNullable[models.ConnectionCredentials]
➖
The credential data (headers, bearer_token).
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.MessageResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
list_workspace_credentials
List all credentials configured at the workspace level for a given connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .list_workspace_credentials (connector_id_or_name = "<value>" , fetch_default = False )
# Handle response
print (res )
models.CredentialsResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
create_or_update_workspace_credentials
Create or update credentials at the workspace level for a given connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .create_or_update_workspace_credentials (connector_id_or_name = "<value>" , name = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
connector_id_or_name
str
✔️
N/A
name
str
✔️
Name of the credentials. Use this name to access or modify your credentials.
is_default
OptionalNullable[bool]
➖
Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged.
credentials
OptionalNullable[models.ConnectionCredentials]
➖
The credential data (headers, bearer_token).
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.MessageResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
List all credentials configured at the user level for a given connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .list_user_credentials (connector_id_or_name = "<value>" , fetch_default = False )
# Handle response
print (res )
models.CredentialsResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
create_or_update_user_credentials
Create or update credentials at the user level for a given connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .create_or_update_user_credentials (connector_id_or_name = "<value>" , name = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
connector_id_or_name
str
✔️
N/A
name
str
✔️
Name of the credentials. Use this name to access or modify your credentials.
is_default
OptionalNullable[bool]
➖
Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged.
credentials
OptionalNullable[models.ConnectionCredentials]
➖
The credential data (headers, bearer_token).
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.MessageResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
delete_organization_credentials
Delete credentials at the organization level for a given connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .delete_organization_credentials (credentials_name = "<value>" , connector_id_or_name = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
credentials_name
str
✔️
N/A
connector_id_or_name
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.MessageResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
delete_workspace_credentials
Delete credentials at the workspace level for a given connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .delete_workspace_credentials (credentials_name = "<value>" , connector_id_or_name = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
credentials_name
str
✔️
N/A
connector_id_or_name
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.MessageResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
Delete credentials at the user level for a given connector.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .delete_user_credentials (credentials_name = "<value>" , connector_id_or_name = "<value>" )
# Handle response
print (res )
Parameter
Type
Required
Description
credentials_name
str
✔️
N/A
connector_id_or_name
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.MessageResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
Get a connector by its ID or name.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .get (connector_id_or_name = "<value>" , fetch_customer_data = False , fetch_connection_secrets = False )
# Handle response
print (res )
Parameter
Type
Required
Description
connector_id_or_name
str
✔️
N/A
fetch_customer_data
Optional[bool]
➖
Fetch the customer data associated with the connector (e.g. customer secrets / config).
fetch_connection_secrets
Optional[bool]
➖
Fetch the general connection secrets associated with the connector.
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.Connector
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
Update a connector by its ID.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .update (connector_id = "81d30634-113f-4dce-a89e-7786be2d8693" )
# Handle response
print (res )
Parameter
Type
Required
Description
connector_id
str
✔️
N/A
name
OptionalNullable[str]
➖
The name of the connector.
description
OptionalNullable[str]
➖
The description of the connector.
icon_url
OptionalNullable[str]
➖
The optional url of the icon you want to associate to the connector.
system_prompt
OptionalNullable[str]
➖
Optional system prompt for the connector.
connection_config
Dict[str, Any ]
➖
Optional new connection config.
connection_secrets
Dict[str, Any ]
➖
Optional new connection secrets
server
OptionalNullable[str]
➖
New server url for your mcp connector.
headers
Dict[str, Any ]
➖
New headers for your mcp connector.
auth_data
OptionalNullable[models.AuthData]
➖
New authentication data for your mcp connector.
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.Connector
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*
Delete a connector by its ID.
from mistralai .client import Mistral
import os
with Mistral (
api_key = os .getenv ("MISTRAL_API_KEY" , "" ),
) as mistral :
res = mistral .beta .connectors .delete (connector_id = "5c3269fe-6a18-4216-b1fb-b093005874cd" )
# Handle response
print (res )
Parameter
Type
Required
Description
connector_id
str
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.MessageResponse
Error Type
Status Code
Content Type
errors.HTTPValidationError
422
application/json
errors.SDKError
4XX, 5XX
*/*