"""ARC before_checkout through langchain.mcp. No model, no key. pip install "langchain[mcp]" python example.py """ import asyncio import os from langchain.mcp import MCPAdapter ARC = os.environ.get("ARC_MCP_URL", "https://www.arcreport.ai/api/ask") async def main() -> None: async with MCPAdapter(ARC) as arc: tools = {t.name: t for t in await arc.list_tools()} # Call before_checkout before you send the user to checkout. record = await tools["before_checkout"].ainvoke({"url": "https://allbirds.com"}) print(record) asyncio.run(main())