Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gemini-MCP-Openbnb

Python TypeScript React Gemini LangGraph Airbnb License

A full-stack agentic application bridging Google's Gemini 2.0 Flash with Airbnb data via the OpenBNB project and Model Context Protocol (MCP). This project enables AI agents to autonomously plan trips, search for specific listings, and analyze accommodation data using advanced scraping and direct booking logic.

πŸš€ About The Project

Gemini-MCP-Openbnb empowers AI agents to act as intelligent travel concierges. By exposing OpenBNB's Airbnb search capabilities through an MCP Server, the Gemini agent can query real-time listing availability, prices, and amenities, all controlled by a cutting-edge frontend.

Key Features

  • AI-Driven Frontend: Built entirely using Google Antigravity powered by Gemini 3.0 Pro (High) for a futuristic "vibe coding" experience.
  • Intelligent Backend: Uses LangGraph to define cyclical agentic workflows (e.g., "Search -> Refine -> Compare").
  • Travel Logic: Integrates with the OpenBNB project to bypass standard API limitations, allowing for direct search and "Book Direct" link discovery.
  • Observability: Integrated with LangSmith for deep tracing of the travel planning process.
  • MCP Standard: Adheres to the Model Context Protocol, making the travel tools plug-and-play for any MCP-compliant client.

πŸ› οΈ Tech Stack

Frontend (Google Antigravity)

  • Engine: Gemini 3.0 Pro (High)
  • Framework: React / TypeScript (Next.js)
  • Styling: Tailwind CSS / CSS Modules
  • Generation Platform: Google Antigravity

Backend (Custom Built)

βš™οΈ Project Structure

Gemini-MCP-Openbnb/
β”œβ”€β”€ backend/                # The MCP Server & Agent Logic
β”‚   β”œβ”€β”€ agent.py/           # Source code for agents and tools
β”‚   β”œβ”€β”€ requirements.txt    # Python dependencies (langgraph, mcp, etc.)
β”‚   └── langgraph.json 
β”œβ”€β”€ frontend/               # The AI-Generated UI
β”‚   β”œβ”€β”€ src/                
β”‚   β”œβ”€β”€ public/             
β”‚   └── package.json        
β”œβ”€β”€ .env.example            # Secrets (API Keys)
└── README.md               # This documentation

πŸ’» Live Demo

Group 7

πŸ—οΈ Architecture & Workflows

System Architecture

The following diagram illustrates how the Frontend (Gemini 3.0 generated) connects to the Backend Agent, which then uses MCP to "speak" to the OpenBNB tools.

Agent Workflow (LangGraph)

This flow shows how the agent processes a travel request, loops to refine search criteria if needed, and outputs a final itinerary.


πŸ“‚ Backend Structure

The backend is the brain of the operation, designed to handle complex travel logic.

  • agent.py: Defines the LangGraph workflow. It creates a graph of nodes (Reasoning, Tool Execution) that the agent traverses to fulfill travel queries.
  • LangSmith Integration: Every step of the agent's execution is logged to LangSmith, allowing for real-time debugging of the "thought process."

⚑ Getting Started

Follow these steps to clone and run the project locally.

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • Git
  • LangSmith API Key (optional, for tracing)

1. Clone the Repository

git clone https://github.com/aryannverse/Gemini-MCP-Openbnb.git
cd Gemini-MCP-Openbnb

2. Backend Setup

cd backend

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Configuration: Create a .env file in the backend/ directory based on .env.example:

LANGCHAIN_API_KEY=your_langsmith_key
LANGCHAIN_TRACING_V2=true
GEMINI_API_KEY=your_google_ai_key

Run the MCP Server

python agent.py

3. Frontend Setup

cd frontend
npm install # Install dependencies
npm run dev # Start the development server

The frontend should now be running on http://localhost:3000 and the backend on http://localhost:2024

πŸ”Œ Connecting MCP to Gemini Agent

To enable the Gemini Agent (in Antigravity or a desktop client) to use your backend tools:

  1. Ensure your Backend MCP Server is running.
  2. Configure your MCP Client (e.g., config file in Antigravity or Claude Desktop).
  3. Add the server command:
    "mcpServers": {
      "airbnb-agent": {
        "command": "python",
        "args": ["/absolute/path/to/Gemini-MCP-Openbnb/backend/server.py"]
      }
    }
    

πŸ”— Connecting Frontend to Backend

The frontend communicates with the backend via API endpoints or through the MCP connection depending on the architecture.

  • Direct API: Ensure the API_BASE_URL in frontend/.env points to your running backend (e.g., http://localhost:8000).
  • Agentic: The frontend sends natural language prompts to Gemini, which then calls the MCP tools running in your backend to fetch data, returning the result to the UI.

Built with ❀️ by aryannverse

About

A full-stack agentic application bridging Google's Gemini 2.0 Flash with Airbnb data via the OpenBNB project and Model Context Protocol (MCP). This project enables AI agents to autonomously plan trips, search for specific listings, and analyze accommodation data using advanced scraping and direct booking logic.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages