View the source code for this module on GitHub: https://github.com/mcp-use/mcp-use/blob/main/libraries/python/mcp_use/agents/adapters/base.py
BaseAdapter
from mcp_use.agents.adapters.base import BaseAdapter
method create_prompts
Create prompts from the MCPClient instance.This handles session creation and connector extraction automatically.
The created prompts are stored in self.prompts.ParametersReturnsmcp_use.client.client.MCPClientrequiredMCP client instance
Signaturelist[mcp_use.agents.adapters.base.T]A list of prompts in the target framework’s format.
def create_prompts(client: mcp_use.client.client.MCPClient):
method create_resources
Create resources from the MCPClient instance.This handles session creation and connector extraction automatically.
The created resources are stored in self.resources.ParametersReturnsmcp_use.client.client.MCPClientrequiredMCP client instance
Signaturelist[mcp_use.agents.adapters.base.T]A list of resources in the target framework’s format.
def create_resources(client: mcp_use.client.client.MCPClient):
method create_tools
Create tools from the MCPClient instance.This handles session creation and connector extraction automatically.
The created tools are stored in self.tools.ParametersReturnsmcp_use.client.client.MCPClientrequiredMCP client instance
Signaturelist[mcp_use.agents.adapters.base.T]A list of tools in the target framework’s format.
def create_tools(client: mcp_use.client.client.MCPClient):
method load_prompts_for_connector
Dynamically load prompts for a specific connector.ParametersReturnsmcp_use.client.connectors.base.BaseConnectorrequiredThe connector to load prompts for.
Signaturelist[mcp_use.agents.adapters.base.T]The list of prompts that were loaded in the target framework’s format.
def load_prompts_for_connector(connector: mcp_use.client.connectors.base.BaseConnector):
method load_tools_for_connector
Dynamically load tools for a specific connector.ParametersReturnsmcp_use.client.connectors.base.BaseConnectorrequiredThe connector to load tools for.
Signaturelist[mcp_use.agents.adapters.base.T]The list of tools that were loaded in the target framework’s format.
def load_tools_for_connector(connector: mcp_use.client.connectors.base.BaseConnector):