from ag_kit_py.tools.mcp import MCPToolkit
from ag_kit_py.agents import LangGraphAgent
from langgraph.graph import StateGraph, MessagesState
# Create MCP toolkit
toolkit = 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 tools
await toolkit.initialize()
# Get available tools
tools = 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