LangChain.js Agent

v1.0.0Coding Agentsstable

Serverless AI agent using LangChain.js and Model Context Protocol (MCP) integration to order burgers from a burger restaurant

agentaiapiazdazd-templates
Share:
183
Stars
0
Downloads
0
Weekly
0/5

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

Serverless AI agents with LangChain.js
E2E automation example
Azure deployment support
Azure-Samples

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 13, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-agent-langchainjs

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-langchainjs
2

Install all dependencies

Install npm dependencies for all packages in the monorepo (agent web app, agent API, burger API, MCP server, and more).

npm install
3

(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__"
4

Run all services locally

Start all services with a single command. Wait for the 'All services ready' message before opening the web app.

npm start
5

Deploy to Azure (optional)

Use Azure Developer CLI to provision all resources and deploy all services to Azure in one step.

azd auth login
azd up
6

Connect 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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-agent-langchainjs": { "command": "npx", "args": ["-y", "mcp-agent-langchainjs"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides