How to Build a Meeting Prep Agent with Tavily and Google Calendar

5月8日 Published inOffice Productivity

The Meeting Prep Agent integrates the Tavily search API with Google Calendar through the Model Context Protocol (MCP) to automate your pre-meeting research. By pulling participant profiles and company data from the web in real time, the agent ensures you have the necessary context to walk into any meeting fully prepared.

The architecture is flexible: you can connect your own data sources, modify the agent logic, or swap the underlying LLM to suit your needs.

Customization Options

  • Connect private or internal data repositories.
  • Refine the agent’s reasoning logic or use a different LLM provider.
  • Integrate additional communication or meeting platforms via MCP.

Key Features

  • Live Web Search: Leverages Tavily’s API to fetch current information from across the web.
  • Intelligent Reasoning: Utilizes an MCP and ReAct agent flow to provide context-aware analysis.
  • Real-time Step Streaming: Displays the agent’s thought process as it happens, ensuring transparency in how it reaches conclusions.
  • Automated Citations: Every piece of information gathered from the web includes a direct reference link.
  • Google Calendar Sync: Uses MCP to read and interpret your scheduled calendar events.
  • Asynchronous FastAPI Backend: Built for speed with non-blocking responses.
  • Responsive React Frontend: An interactive interface designed for a smooth user experience.

Project Structure

  • agent.py: Contains the agent logic (MCP + LangChain / Tavily ReAct agent).
  • Frontend (ui/): The React-based user interface for viewing meeting insights.
  • Server (app.py): The FastAPI server managing API endpoints and data streaming.

Local Setup Required Python Version: 3.13.2

Google Calendar MCP Setup

  1. Google Cloud Configuration: Navigate to the Google Cloud Console. Create a new project or select an existing one, then enable the Google Calendar API.

  2. OAuth 2.0 Credentials:

    • Go to “Credentials” → “Create Credentials” → “OAuth Client ID.”
    • Select “User data.”
    • Provide an application name and support email.
    • Set the application type to “Desktop app.”
    • Under the OAuth consent screen settings, add your own email as a test user.
  3. Configuration File: Inside the google-calendar-mcp root directory, create a file named gcp-oauth.keys.json. Paste your downloaded credentials into this file. It should follow this structure:

    {
        "installed": {
            "client_id": "<your-client-id>",
            "project_id": "<your-project-id>",
            "auth_uri": "<your-auth-uri>",
            "token_uri": "<your-token-uri>",
            "auth_provider_x509_cert_url": "<your-auth-provider>",
            "client_secret": "<your-secret>",
            "redirect_uris": ["http://localhost"]
        }
    }
    
  4. Install MCP: Navigate to the folder (cd google-calendar-mcp) and run npm install.

  5. Set Configuration Path: The environment variable GOOGLE_CALENDAR_CONFIG must point to your build file: <absolute-path>/mcp-use-case/google-calendar-mcp/build/index.js

  6. Verify MCP: Use the mcp-test.ipynb notebook to ensure the connection is active and working correctly.

Backend Setup

  1. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate   # On Windows: .\venv\Scripts\activate
    
  2. Install the required dependencies:

    python3 -m pip install -r requirements.txt
    
  3. Configure your environment variables:

    export TAVILY_API_KEY="your-tavily-api-key"
    export OPENAI_API_KEY="your-openai-api-key"
    export GROQ_API_KEY="<your-groq-api-key>"
    export GOOGLE_CALENDAR_CONFIG="<absolute-path>/mcp-use-case/google-calendar-mcp/build/index.js"
    
  4. Launch the backend server:

    python app.py
    

Frontend Setup

  1. Navigate to the UI folder: cd ui
  2. Install the necessary packages: npm install
  3. Start the development server: npm run dev

Example .env File

TAVILY_API_KEY=your-tavily-api-key
OPENAI_API_KEY=your-openai-api-key
GROQ_API_KEY=your-groq-api-key
GOOGLE_CALENDAR_CONFIG=your-google-config-absolute-path

API Endpoint

  • POST /api/analyze-meetings: This endpoint manages the streaming execution of the LangGraph logic.