Skip to main content

ServerManager

method init

Initialize the server manager.Parameters
mcp_use.client.client.MCPClient
required
The MCPClient instance managing server connections
mcp_use.agents.adapters.base.BaseAdapter
required
The LangChainAdapter for converting MCP tools to LangChain tools
Signature

method get_active_server_tools

Get tools from the currently active server.Returns
list[langchain_core.tools.base.BaseTool]
List of tools from the active server, or empty list if no server is active
Signature

method get_management_tools

Get the server management tools.Returns
list[langchain_core.tools.base.BaseTool]
List of server management tools
Signature