Skip to content

armgit / camel

Public Imported from GitHub
0

๐Ÿซ CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

3.0 KB
Raw Blame

๐Ÿก Airbnb Listings Search (Streamlit + CAMEL-AI + MCP)

A Streamlit app that leverages the CAMEL-AI OWL framework and MCP (Model Context Protocol) to automatically search Airbnb listings via a custom MCP server. The app displays search parameters and returns the top 5 listings in a clean, responsive card-grid UI.


โœจ Features

  • Interactive UI: Sidebar for entering city, check-in/out dates and number of adults.
  • Session state: Remembers your last chosen dates.
  • Agent-driven search: Uses a CAMEL-AI ChatAgent + MCPToolkit to query Airbnb via @openbnb/mcp-server-airbnb.
  • Responsive cards: Displays each listing in its own styled card. Airbnb Listings Search UI

๐Ÿ“‹ Prerequisites

  • Python >=3.10,<3.13
  • Node.js & npm (for the MCP server plugin)
  • A valid OpenAI API key set in your environment:
    export OPENAI_API_KEY="your_api_key_here"
    

๐Ÿ› ๏ธ Setup

  1. Clone the repo

    git clone https://github.com/your-org/your-repo.git
    cd your-repo/owl/community_usecase/Airbnb-MCP
    
  2. Create a virtual environment

    python -m venv venv
    source venv/bin/activate      # macOS/Linux
    venv\\Scripts\\activate     # Windows
    
  3. Install Python dependencies

    pip install -r requirements.txt
    

โš™๏ธ Configuration

  1. Environment variables Create a .env file in the project root with:

    OPENAI_API_KEY=your_openai_key_here
    
  2. MCP Server config Ensure mcp_servers_config.json (next to app.py) contains:

    {
      "mcpServers": {
        "airbnb": {
          "command": "npx",
          "args": ["-y", "@openbnb/mcp-server-airbnb", "--ignore-robots-txt"]
        }
      }
    }
    

๐Ÿš€ Running the App

From the Airbnb-MCP folder, run:

streamlit run app.py

This will launch the Streamlit UI in your browser. Use the sidebar to choose your city, dates and number of guests, then click Search Listings.


๐Ÿ”ง Customization

  • Prompt: Edit the search prompt inside app.py if you want to tweak wording or number of results.
  • Styling: Modify the CSS in the header section of app.py to change colors, fonts or card layout.
  • Logging: Change set_log_level("DEBUG") to INFO in production.

๐Ÿ“‚ Project Structure

Airbnb-MCP/
โ”œโ”€โ”€ assets/
โ”‚   โ”œโ”€โ”€ logo_camel_ai.png
โ”‚   โ””โ”€โ”€ logo_airbnb_mcp.png
โ”œโ”€โ”€ mcp_servers_config.json
โ”œโ”€โ”€ app.py              # Main Streamlit application
โ”œโ”€โ”€ requirements.txt    # Python deps
โ””โ”€โ”€ .env                # Env file with OPENAI_API_KEY

๐Ÿ“š References


Happy listing searches!