Learn how to build custom agents using MCPClient and integrate tools with different agent frameworks
MCPAgent
class, custom agents give you maximum flexibility to integrate with existing systems, implement specialized behavior, or use different agent frameworks.LangChainAdapter
is a powerful component that converts MCP tools to LangChain tools, enabling you to use MCP tools with any LangChain-compatible agent.
create_tools
method:BaseAdapter
abstract class that handles most of the common functionality:
_convert_tool
method to convert MCP tools to your framework’s format_convert_tool
to convert a single MCP tool to your framework’s tool format.Implementation Guidelines
_convert_tool
method needed