MiniMax
Description
Enables high-quality text-to-speech, voice cloning, and video generation capabilities through MiniMax's API with robust error handling and file management features.
Visit the server homepage (↗) for more information about how to use this MCP server.
Authorisation
To use this MCP server, you need API credentials in your environment. Please refer to the server homepage (↗) for more information.
Usage
To use this MCP server in your Portia project, you need to create an McpToolRegistry
instance and pass it to the Portia
constructor.
McpToolRegistry.from_stdio_connection(
server_name="minmax",
command="uvx",
args=[
"minimax-mcp",
"-y",
],
env={
"MINIMAX_API_KEY": "<api_key>",
"MINIMAX_MCP_BASE_PATH": "<path_to_minimax>",
"MINIMAX_API_HOST": "https://api.minimax.io",
"MINIMAX_API_RESOURCE_MODE": "url",
},
)
Complete example
Equip your Portia
instance with the tools from the MCP server, in addition to the default tools from the DefaultToolRegistry
:
from portia import DefaultToolRegistry, McpToolRegistry, Portia, Config
config = Config.from_default()
tool_registry = DefaultToolRegistry(config) + McpToolRegistry.from_stdio_connection(
server_name="minmax",
command="uvx",
args=[
"minimax-mcp",
"-y",
],
env={
"MINIMAX_API_KEY": "<api_key>",
"MINIMAX_MCP_BASE_PATH": "<path_to_minimax>",
"MINIMAX_API_HOST": "https://api.minimax.io",
"MINIMAX_API_RESOURCE_MODE": "url",
},
)
portia = Portia(config=config, tools=tool_registry)
Click the "copy" icon in the top right corner of the code block to copy the code to your clipboard.
See more information about integrating MCP servers here (↗).