Use this file to discover all available pages before exploring further.
AG-Kit provides comprehensive support for the Model Context Protocol (MCP), enabling seamless integration with external tools and services while exposing AG-Kit tools to other MCP-compatible applications.
Connect to existing MCP servers and use their tools:
from ag_kit_py.tools.mcp import MCPToolkitfrom ag_kit_py.agents import LangGraphAgentfrom langgraph.graph import StateGraph, MessagesState# Create MCP toolkittoolkit = MCPToolkit('mcp-toolkit')await toolkit.add_server('filesystem', { 'name': 'filesystem-server', 'version': '1.0.0', 'transport': { 'type': 'stdio', 'command': 'npx', 'args': ['@modelcontextprotocol/server-filesystem', './workspace'] }})# Initialize toolkit to load toolsawait toolkit.initialize()# Get available toolstools = toolkit.get_tools()# Note: MCP tools integration with LangGraph would be implemented# in the specific workflow nodes, similar to the examples in:# python-sdk/examples/langgraph/agents/agentic_chat/agent.py