
bookingagent
MCP and Langchain implementation to create a 15 minutes meeting meeting with various city departments
Repository Info
About This Server
MCP and Langchain implementation to create a 15 minutes meeting meeting with various city departments
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
🏗️ Architecture Diagram
┌──────────────────────────────┐
│ User (chat) │
└──────────────┬───────────────┘
│ free-text
▼
┌──────────────────────────────┐
│ UserIntentAgent (GPT-4o) │
└──────────────┬───────────────┘
│ topic_key
▼
┌──────────────────────────────┐
│ BookingAgent (LangChain) │
└──────────────┬───────────────┘
│ booking URL
▼
┌──────────────────────────────┐
│ Microsoft Bookings page │
└──────────────────────────────┘
- UserIntentAgent classifies free-text into one of 20
topic_keystrings. - It sends a
link_requestmessage to BookingAgent. - BookingAgent calls the LangChain tool
get_booking_link(topic_key). - The static public booking URL is sent back to the user.
🚀 Quick Start
# 1. Clone & enter project
git clone <repo> && cd mcp_langchain_bot
# 2. Python environment
python -m venv .venv && source .venv/bin/activate # Windows: .\.venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Set Azure OpenAI variables
export AZURE_OPENAI_API_KEY=... \
AZURE_OPENAI_ENDPOINT=...
# 5. Run CLI demo
python run_simulation.py
A booking link will be printed for the simulated user.
### 💬 Example Interaction (CLI)
User : I need structural engineering help.
Bot : https://outlook.office365.com/.../StructuralEngineering
User : Questions about tree code on my lot.
Bot : https://outlook.office365.com/.../ZoningTreeCode
###🗄️ Folder Layout
requirements.txt # Python deps
README.md # This file
│
├─ mcp_server/
│ core.py # Message & Agent base classes
│ runtime.py # Simple message-queue loop
│
├─ agents/
│ user_intent_agent.py # GPT-4o classifier agent
│ booking_agent.py # Returns booking links
│
├─ tools/
│ ms_booking_tool.py # get_booking_link() LangChain tool
│
├─ langchain_env.py # AzureChatOpenAI config
├─ appointment_flows.py # (stub for future dialog logic)
└─ run_simulation.py # CLI driver
### 🔑 Appointment Keys & Slugs (excerpt)
| Key | Booking slug |
|--------------------------------|-----------------------------|
| `land_use` | `LandUseAppointment` |
| `environmental` | `EnvironmentalAppointment` |
| `zoning_tree` | `ZoningTreeCode` |
| `residential_building` | `ResidentialBuildingCode` |
| `commercial_building` | `CommercialBuildingCode` |
| `structural_engineering` | `StructuralEngineering` |
| … etc. (see `ms_booking_tool.py` for full list) |
### 🛠️ Extending
Replace static tool with Graph-API scheduling.
Add DialogManagerAgent to collect address, email, etc.
Connect a web UI , an open source chatbot or MS Teams bot to the runtime.
### 📄 License
MIT
Quick Start
Clone the repository
git clone https://github.com/rajbagchi/bookingagentInstall dependencies
cd bookingagent
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.