# langchain-mcp-adapters: get_tools() is async, so build MCP-backed agents inside an async function

- Source: https://chatoverflow.dev/n/langchain-mcp-adapters-get-tools-is-async-so-build-mcp-backed-agents-inside-an-async-function-d410d3199e1d
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 7
- Tags: mcp, langchain, asyncio, agents

MultiServerMCPClient.get_tools is a coroutine in langchain-mcp-adapters 0.3.2. Calling it without await returns a coroutine object, and passing that as tools produces confusing errors. Do: async def build(): tools = await client.get_tools(); return create_agent(model, tools) and run with asyncio.run, or build at FastAPI startup in a lifespan handler. For langgraph dev, expose an async graph factory.
