Damaged Baggage Compensation with Kaiban MCP Integration
Discover how the Kaiban platform enables interoperability between AI agents built with any SDK. This example demonstrates integrating a KaibanJS damaged baggage compensation team with the Kaiban platform using the A2A protocol and MCP (Model Context Protocol) for card lifecycle management—delivering instant compensation offers powered by real-time market prices via Tavily.

Kaiban Platform: SDK-Agnostic Interoperability
The Kaiban platform provides enterprise workflow management and agent orchestration that works with agents built using any SDK or framework. Through the standardized A2A (Agent-to-Agent) protocol, you can integrate KaibanJS teams either via the Kaiban SDK or the Kaiban MCP (Model Context Protocol)—giving you flexibility in how your agents interact with cards, boards, and workflow states on the platform.
This example showcases the MCP-based approach for damaged baggage compensation: instead of using the Kaiban SDK directly, KaibanJS agents call MCP tools (get_card, move_card, update_card, create_card_activities) to manage the card lifecycle. The Compensation Calculation Agent also uses Tavily tools to search for real-time product market prices—up to 5 items per claim—enabling defensible, policy-backed compensation offers.
Use Case: Automated Damaged Baggage Compensation
Inspired by the Kaiban use case, this example automates the generation of instant baggage compensation offers from damage claim data. According to the U.S. Department of Transportation, the top 10 U.S. airlines mishandled nearly 245,000 bags in January 2025. At scale, damaged baggage claims cost airlines millions of dollars each month.
Variable Compensation
Each case is handled differently. Offers often reflect emotion, negotiation pressure, or subjective assessment rather than policy-driven logic.
No Audit Trail
Claims are submitted through various channels. There is no centralized oversight or auditability, increasing fraud risk.
Lack of Tools
Agents lack tools for reliable, data-backed guidance—no standardized reference for baggage valuation or replacement costs.
Escalations
Dissatisfied passengers escalate to customer service, where higher payouts are issued to quickly resolve issues, raising costs.
The Solution: A2A Protocol + Kaiban MCP + Tavily
The KaibanJS team receives A2A activities from the Kaiban platform. Card lifecycle (get card, move to doing/done, update result, activities) is handled by agents using Kaiban MCP tools via the @modelcontextprotocol/sdk with Streamable HTTP transport. The Compensation Calculation Agent uses Tavily to search for real-time market prices (1 call per product, max 5 per claim) for fair, defensible offers.
MCP Instead of SDK
Uses Kaiban MCP tools for card operations instead of the Kaiban SDK. Ideal for MCP-first architectures and tool-based agent designs.
A2A Protocol
Communication follows the A2A protocol. Kaiban sends activities to the agent endpoint; the executor processes them and triggers the team.
Tavily for Market Prices
The Compensation Calculation Agent calls search_product_market_price (Tavily) for real-time product prices, enabling policy-backed, defensible compensation offers.
Error Handling
On team failure, the executor calls MCP move_card to BLOCKED and logs activities for manual review.
Integration Architecture
End-to-end flow from Kaiban.io to KaibanJS team via A2A and MCP
Kaiban Sends A2A Activity
When a card is created or moved in a Kaiban board, the platform sends an A2A message with Kaiban activity data (card_id, board_id, team_id, activity type).
Executor Validates via MCP
The A2A executor receives the activity, calls MCP get_card to validate the card (description present, column is todo), then starts the Damaged Baggage Compensation Team.
Task 0: Get Card & Move to Doing (MCP)
The Kaiban Card Sync Agent uses MCP tools: gets the card, extracts the description (claim text), moves the card to doing, and passes the claim to the next task.
Tasks 1–3: Extract, Calculate, Generate Offer
Claim Extraction & Validation parses the claim; Compensation Calculation uses get_airline_policy, get_historical_payouts, and search_product_market_price (Tavily, max 5 products); Compensation Offer produces the final offer text.
Task 4: Update Card & Move to Done (MCP)
The Kaiban Card Sync Agent uses MCP update_card and move_card to write the compensation offer to the card and move it to done, with activities logged.
Key Components
- ✓Kaiban MCP Client: Uses
@modelcontextprotocol/sdkwith Streamable HTTP transport; exposes get_card, move_card, update_card, create_card_activities - ✓A2A Executor: Parses Kaiban activities, validates cards via MCP, starts team; on error calls MCP move_card to blocked
- ✓Kaiban Card Sync Agent: Handles Task 0 and Task 4 using Kaiban MCP tools
- ✓Tavily search_product_market_price: Real-time product price lookup (1 call per product, max 5 per claim)
- ✓Damaged Baggage Team: 5 tasks, 4 agents (Claim Extraction, Compensation Calculation, Compensation Offer, plus Kaiban Card Sync)
KaibanJS Team Structure & Tools
Sequential team with 5 tasks and 4 agents; Kaiban interaction via MCP; Tavily for real-time market prices
Team Flow
- Task 0: Get card & move to doing (Kaiban Card Sync Agent, MCP tools) → output: userMessage (claim text)
- Task 1: Extract & Validate claim (Claim Extraction & Validation Agent)
- Task 2: Calculate Compensation (Compensation Calculation Agent: get_airline_policy, get_historical_payouts, search_product_market_price via Tavily)
- Task 3: Generate Compensation Offer (Compensation Offer Agent)
- Task 4: Update card & move to done (Kaiban Card Sync Agent, MCP tools)
Tools (Policy, Historical, Tavily)
The Compensation Calculation Agent uses three tools:
- •
get_airline_policy– Mock depreciation rules, caps, currency - •
get_historical_payouts– Mock historical payouts by damage type and product category - •
search_product_market_price–Tavily real-time search (1 call per product, max 5 per claim)
Kaiban MCP: get_card, move_card, update_card, create_card_activities. Env: KAIBAN_MCP_URL, KAIBAN_API_TOKEN, TAVILY_API_KEY.
Interactive Demo
Watch how the KaibanJS damaged baggage compensation team integrates with the Kaiban platform via A2A and MCP
Demo: KaibanJS Damaged Baggage Compensation Team with Kaiban MCP
See how cards created in the Kaiban platform trigger the KaibanJS team, which uses MCP tools to manage the card lifecycle and Tavily for real-time product prices while extracting, validating, and generating instant compensation offers.
View Source Code on GitHubMCP vs SDK: Two Paths to Kaiban Integration
Choose the integration approach that fits your architecture
| Kaiban MCP (This Example) | Kaiban SDK (e.g. Revenue Management Example) |
|---|---|
Uses @modelcontextprotocol/sdk with Streamable HTTP | Uses @kaiban/sdk for direct API calls |
| Card operations via MCP tools: get_card, move_card, update_card, create_card_activities | Card operations via SDK methods (cards, activities, columns) |
| Agents invoke tools; tool schemas from MCP server (JSON Schema → Zod) | Kaiban Controller orchestrates workflow; no agent tool calls for card ops |
| Ideal for MCP-first designs, tool-based agents | Ideal for controller-driven workflows, SDK familiarity |
Getting Started
Follow the Kaiban quick start, then run the damaged baggage compensation example:
1. Clone and Install
git clone https://github.com/kaiban-ai/kaiban-agents-starter.git
cd examples/damaged-baggage-compensation-mcp-kaibanjs
npm install2. Configure Environment
KAIBAN_MCP_URL=https://<tenant>-<env>.kaiban.io/mcps/kaiban/mcp
KAIBAN_API_TOKEN=your-token
OPENAI_API_KEY=your-key
TAVILY_API_KEY=your-tavily-key
A2A_BASE_URL=your-public-url3. Register Agent in Kaiban
Register using Agent Card URL and Agent URL. Copy the Agent ID to KAIBAN_AGENT_ID or KAIBAN_DAMAGED_BAGGAGE_COMPENSATION_AGENT_ID.
Endpoints: Card /damagedBaggageCompensation/a2a/.well-known/agent-card.json; Agent POST /damagedBaggageCompensation/a2a.
4. Assign to Board & Run
Assign the agent to a Kaiban board. Create cards with baggage claim descriptions. Run npm run dev and watch cards move through TODO → DOING → DONE. Sample claim: GET /damagedBaggageCompensation/samples/baggage-claim-example.txt.
Ready to Build Baggage Claim Automation?
The Kaiban platform supports both SDK and MCP integration. Use KaibanJS with either approach to build instant damaged baggage compensation automation and other airline workflows.
We’re almost there! 🌟 Help us hit 100 stars!
Star KaibanJS - Only 100 to go! ⭐