LangChain.js Agent
Serverless AI agent using LangChain.js and Model Context Protocol (MCP) integration to order burgers from a burger restaurant
What is LangChain.js Agent?
LangChain.js Agent is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to serverless ai agent using langchain.js and model context protocol (mcp) integration to order burgers from a burger restaurant
Serverless AI agent using LangChain.js and Model Context Protocol (MCP) integration to order burgers from a burger restaurant
This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Serverless AI agent using LangChain.js and Model Context Pro
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-agent-langchainjsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use LangChain.js Agent
This Azure Sample demonstrates how to build a fully serverless AI agent using LangChain.js and the Model Context Protocol that can interact with real-world APIs — using a burger ordering system as the end-to-end reference implementation. The architecture spans a React web app, a LangChain.js agent API backed by Azure Functions, a burger REST API, and an MCP server that exposes the burger operations as tools via Streamable HTTP transport. Developers and solution architects use it as a production-ready starting point for building MCP-powered agents on Azure, including local development with Ollama and one-command deployment via Azure Developer CLI.
Prerequisites
- Node.js 22 or higher
- Azure Developer CLI (azd) 1.19+ for cloud deployment
- An Azure account with appropriate permissions (for cloud deployment)
- Git to clone the repository
- Optional: Ollama installed locally for fully local development without cloud costs
Clone the repository
Clone the Azure-Samples/mcp-agent-langchainjs repository and navigate into it.
git clone https://github.com/Azure-Samples/mcp-agent-langchainjs.git
cd mcp-agent-langchainjsInstall all dependencies
Install npm dependencies for all packages in the monorepo (agent web app, agent API, burger API, MCP server, and more).
npm install(Optional) Configure local Ollama for development without cloud costs
If you want to run entirely locally, install Ollama, pull a model, and create a .env file pointing the agent at the local endpoint.
ollama pull qwen3:8b
# Create .env in the project root:
AZURE_OPENAI_API_ENDPOINT="http://localhost:11434/v1"
AZURE_OPENAI_MODEL="qwen3:8b"
AZURE_OPENAI_API_KEY="__not_used__"Run all services locally
Start all services with a single command. Wait for the 'All services ready' message before opening the web app.
npm startDeploy to Azure (optional)
Use Azure Developer CLI to provision all resources and deploy all services to Azure in one step.
azd auth login
azd upConnect the MCP server to an MCP-compatible client
The burger MCP server exposes tools over Streamable HTTP. Point any MCP client at the server URL to use browse_menu, place_order, and get_order_status tools directly.
LangChain.js Agent Examples
Client configuration
Connect Claude Desktop or another MCP client to the locally running burger MCP server via its Streamable HTTP endpoint.
{
"mcpServers": {
"burger-mcp": {
"type": "streamable-http",
"url": "http://localhost:7073/api/mcp"
}
}
}Prompts to try
Example agent interactions with the burger ordering MCP server.
- "Show me the full burger menu"
- "I'd like to order a Classic Cheeseburger and a side of fries"
- "What is the status of my order?"
- "What beers would pair well with a spicy burger? (uses the Beer MCP server with RAG)"
- "List all available toppings and suggest a build-your-own burger for someone who likes smoky flavours"Troubleshooting LangChain.js Agent
npm start fails because a service port is already in use
Check which process is using the conflicting port (lsof -i :7072 on macOS/Linux) and stop it, then run npm start again. The agent API uses 7072 and the burger API uses 7071 by default.
azd up fails with a capacity error on a free or student Azure account
Run `azd env set AZURE_OPENAI_MODEL_CAPACITY 1` before `azd up` to stay within free tier limits, then set an alternative OpenAI endpoint with AZURE_OPENAI_ALT_ENDPOINT and AZURE_OPENAI_API_KEY.
Ollama model gives incorrect or incomplete tool calls
Local models are less reliable for complex tool-calling tasks. Try a larger model (`ollama pull gpt-oss:20b`) if your hardware allows, or switch to a cloud-hosted model via AZURE_OPENAI_API_ENDPOINT.
Frequently Asked Questions about LangChain.js Agent
What is LangChain.js Agent?
LangChain.js Agent is a Model Context Protocol (MCP) server that serverless ai agent using langchain.js and model context protocol (mcp) integration to order burgers from a burger restaurant It connects AI assistants to external tools and data sources through a standardized interface.
How do I install LangChain.js Agent?
Follow the installation instructions on the LangChain.js Agent GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with LangChain.js Agent?
LangChain.js Agent works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is LangChain.js Agent free to use?
Yes, LangChain.js Agent is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
LangChain.js Agent Alternatives — Similar Coding Agents Servers
Looking for alternatives to LangChain.js Agent? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up LangChain.js Agent in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use LangChain.js Agent?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.