Agentic Travel Recommendations API
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Agentic Travel Recommendations API Recommend a vacation for member 42"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Agentic Travel Recommendations API
AI Concierge Proof of Concept — MCP Server
Related MCP server: expedia-travel-recommendations-mcp
Section A — Architecture & Trade-offs
Architecture Overview
The Agentic Travel Recommendations API is a TypeScript/Node.js service that exposes personalized travel recommendations to AI agents via the Model Context Protocol (MCP). The service sits between two upstream dependencies — a member data service and a partner configuration service — and a downstream AI agent such as Claude Code.
At runtime the flow works as follows: an AI agent connects to the MCP server and discovers available tools via the list_tools endpoint. The agent calls get_member_profile to retrieve a member's loyalty tier, travel history, and partner ID. It then calls get_recommendations, which fetches the member profile, retrieves the partner's configuration rules, loads the full recommendation catalog, and applies three sequential filters — category exclusions, loyalty tier eligibility, and recommendation cap — before returning an auditable response that includes both the filtered recommendations and the rules that were applied.
Both upstream services are mocked via static JSON files for this proof of concept. The mock structure mirrors what real API calls would look like, meaning the service layer can be swapped from file reads to HTTP calls without changing any business logic.
Design Trade-offs
Pre-populated catalog vs. LLM-generated recommendations
The recommendation pool is a static catalog rather than dynamically generated by a language model. An LLM-based approach might seem more "agentic" but would introduce significant reliability problems in a production context — generated hotel names and prices cannot be verified, category classification would be ambiguous making rule enforcement fragile, and outputs would be non-deterministic making the service untestable. A curated catalog ensures that category exclusions and recommendation caps are enforced against typed, validated data. The intelligence of the service lies in personalized selection and rule enforcement, not content generation.
Single partner per member
Each member is associated with exactly one partner, reflecting the reality that a member accessing the AI Concierge does so through a specific partner's branded portal. Supporting multiple partners per member would add complexity without demonstrating new behavior in the rule enforcement logic. In a production system this could be extended by passing an explicit partnerId alongside memberId in the request, allowing the caller to specify which partner context applies.
Handling Partner Configuration Changes
Because the partner configuration service is treated as read-only and loaded fresh on each request, configuration changes take effect immediately without requiring a service restart or cache invalidation. If a partner adds a new category exclusion or lowers their recommendation cap, the next request for any member under that partner will automatically reflect the updated rules. The only change required in this service would be adding the new category to the TravelCategory union type in types.ts if it is a category not previously defined — a one-line change. This design intentionally avoids caching partner config, accepting slightly higher read overhead in exchange for always-current rule enforcement.
Four-Week Delivery Plan
Ships first (Weeks 1–2):
MCP server with
get_member_profile,get_recommendations, andlist_memberstoolsPartner rule enforcement (category exclusions, recommendation cap, tier filtering)
Static catalog with typed data model
CLI demo and README documentation
Ships later (Weeks 3–4):
Replace file-based mocks with real HTTP calls to member data and partner config services
Add response caching for partner config with cache invalidation on config change events
Add support for multiple partner contexts per member
Add integration tests asserting rule enforcement across all partner configurations
Add logging and observability (structured logs per request with rulesApplied metadata)
Add pagination for recommendation results
Section B — Production Readiness & Incident Response
Incident Runbook Entry
Symptom: A member reports that the AI Concierge is showing cruise recommendations even though their partner's configuration excludes cruises.
Initial Diagnosis Steps:
Identify the member ID and partner ID from the report. Check the member's profile via
get_member_profileto confirm theirpartnerIdis correct and matches the expected partner.Query the partner configuration service directly for that
partnerIdand verify that"cruise"is present inexcludedCategories. If it is not present, the issue is in the partner config data itself — escalate to the partner configuration team as the config may have been accidentally modified or not yet propagated.If
"cruise"is correctly in the partner config, check the recommendation catalog and confirm that the cruise offerings have"cruise"as their exactcategoryvalue. A mismatch in casing or spelling — for example"Cruise"vs"cruise"— would cause the filter to silently pass cruise offers through.Check the version of the recommendation service that is currently deployed. If a recent deployment occurred, review the diff for any changes to the filtering logic in
recommendationService.ts, particularly the category exclusion filter.Check service logs for the member's recent sessions to see the raw
rulesAppliedfield in the response. IfexcludedCategoriesshows an empty array despite the partner config containing exclusions, the issue is in how partner config is being read or deserialized.
Resolution:
If the issue is a data mismatch in category strings, correct the catalog entry and redeploy
If the issue is in the partner config data, escalate to the partner config team with specific partnerId and expected vs actual values
If the issue is a code regression, roll back to the previous deployment and open a bug ticket with the specific commit that introduced the change
In all cases, verify the fix by calling
get_recommendationsfor an affected member and confirming cruises no longer appear in the response before closing the incident
Prevention: Add an integration test that specifically asserts cruise recommendations never appear for partners with cruise exclusions configured. This test should run on every deployment.
Running the Demo
Prerequisites
Node.js 18+
npm
Installation
npm installRun the full demo
npm run cliQuery a specific member
ts-node cli.ts WI001
ts-node cli.ts WI002
ts-node cli.ts WI003Start the MCP server
npm run devAvailable MCP Tools
list_members— discover valid member IDsget_member_profile— retrieve member profile by IDget_recommendations— get partner-rule-enforced recommendations for a member
Available Tools
3 toolsget_member_profileA
Retrieves a member profile including loyalty tier, partner, and travel history. Use this to understand who the member is before making recommendations.
Inputs: memberId (required).
get_recommendationsA
Returns personalized travel recommendations for a member, filtered by partner rules including category exclusions and recommendation caps. Always call get_member_profile first.
Inputs: memberId (required).
list_membersA
Returns all available members in the system. Use this to discover valid member IDs.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool serves a distinct purpose: list_members discovers valid IDs, get_member_profile provides detailed member context, and get_recommendations returns the actual recommendations. There is no overlap or ambiguity between them.
All tool names follow a consistent verb_noun snake_case pattern: list_members, get_member_profile, get_recommendations. The use of 'list' for collection retrieval and 'get' for single-item retrieval is a standard and predictable convention.
With exactly 3 tools, the server is minimal but well-scoped. Each tool is necessary and supports the core workflow of discovering members, understanding their profile, and generating recommendations. This fits comfortably within the ideal 3-15 range.
The tool surface fully covers the recommendations domain: listing all members, fetching member profiles, and generating personalized recommendations. There are no obvious dead ends or missing operations for the stated purpose.
Related MCP Connectors
MCP server for Travel & Transportation
Flight search MCP server providing search, pagination, and itinerary details for AI assistants.
AI marketplace — flights, tours, activities, transport & more via MCP. No auth required.
Search and compare flight offers through a cache-aware Streamable HTTP MCP server for AI agents.
Related MCP Servers
- FlicenseAqualityDmaintenanceAn AI-powered travel planner MCP server enabling flight and hotel search, weather forecasts, point-of-interest discovery, itinerary generation, and budget management.8-
- AlicenseNot gradedqualityDmaintenanceMCP server for Expedia travel recommendations. Enables LLMs to search hotels, flights, activities, and car rentals using natural language.24Apache 2.0
- FlicenseNot gradedqualityCmaintenanceProvides AI-driven, partner-aware travel recommendations with auditability, integrating member context and read-only partner policy rules.-
- FlicenseNot gradedqualityDmaintenanceMCP server for AI-powered travel planning that coordinates flights, hotels, events, weather, currency, and traffic data to generate complete trip itineraries.-