AI Agent with MCP tools using LangChain.js
A sample serverless AI agent that uses LangChain.js and the Model Context Protocol to browse a menu, place an order and track status against a burger-ordering API, deployed on Azure Static Web Apps and Functions.
This sample demonstrates building an AI agent that calls real-world APIs through the Model Context Protocol: a LangChain.js agent handles LLM reasoning and tool calling, and an MCP server exposes a complete burger-ordering system, with a serverless API, web interfaces, and order tracking, as callable tools.
The application is hosted on Azure Static Web Apps for the web front ends and Azure Functions for the API and MCP servers, with Azure Cosmos DB for NoSQL as its data store, deployed with a single Infrastructure-as-Code command. It can also be run and tested locally with no cloud deployment or cost, and the MCP server works with other MCP-compatible clients such as GitHub Copilot and Claude.