Labsco
pedramamini logo

GranolaMCP

โ˜… 42

from pedramamini

An MCP server for accessing and analyzing Granola.ai meeting data.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeNeeds API keys

GranolaMCP

A comprehensive Python library and CLI tool for accessing and analyzing Granola.ai meeting data, featuring a complete MCP (Model Context Protocol) server for AI integration.

๐Ÿ“‹ Changelog

2025-07-04 - New Collect Command ๐ŸŽฏ

  • NEW: Added granola collect command for exporting your own words from meetings
  • FEATURE: Automatically filters microphone audio (your spoken words) vs system audio (what you heard)
  • FEATURE: Organizes exported text by day into YYYY-MM-DD.txt files
  • FEATURE: Supports flexible date ranges (--last 7d, --from/--to)
  • FEATURE: Optional timestamps and meeting metadata inclusion
  • FEATURE: Minimum word filtering to exclude short utterances
  • USE CASE: Perfect for creating LLM training datasets from your own speech

Overview

GranolaMCP provides complete access to Granola.ai meeting data through multiple interfaces:

  • ๐Ÿ“š Python Library - Programmatic access to meetings, transcripts, and summaries
  • ๐Ÿ’ป Command Line Interface - Rich CLI with advanced filtering and analytics
  • ๐Ÿค– MCP Server - Model Context Protocol server for AI integration (Claude, etc.)
  • ๐Ÿ“Š Analytics & Visualization - Comprehensive statistics with ASCII charts

Data Source

GranolaMCP operates entirely on local cache files - it reads meeting data directly from Granola's local cache file (cache-v3.json) without making any API calls to Granola's servers. This approach provides:

  • ๐Ÿ”Œ No Network Dependency - Works completely offline
  • โšก Fast Access - Direct file system access with no API rate limits
  • ๐Ÿ”’ Privacy Focused - Your meeting data never leaves your machine
  • ๐Ÿ›ก๏ธ No Authentication - No need to manage API keys or tokens

Alternative Approach Available: While not implemented in this library, it's technically possible to extract access tokens from Granola's supabase.json configuration file and communicate directly with the Granola API. However, the cache-based approach provides better performance, privacy, and reliability for most use cases.

โœจ Key Features

Core Data Access

  • ๐Ÿ” Smart JSON Parsing - Handles Granola's complex double-JSON cache structure
  • ๐Ÿ“ AI Summary Extraction - Separates AI-generated summaries from human notes
  • ๐Ÿ’ฌ Full Transcript Access - Complete speaker-identified transcripts with timing
  • ๐Ÿ“ Folder Organization - Meeting organization by folders (OPSWAT, Mozilla, Personal, etc.)
  • ๐Ÿ• Accurate Duration Calculation - Real meeting duration from transcript timing
  • ๐Ÿท๏ธ Rich Metadata - Participants, timestamps, and meeting context

Advanced CLI Interface

  • ๐ŸŽฏ Intelligent Filtering - Filter by date, participant, title, or folder
  • ๐Ÿ“Š Table Display - Clean tables showing transcript/summary word counts
  • ๐Ÿ” Smart Search - Search across titles, content, and participants
  • ๐Ÿ“ˆ Analytics Dashboard - Meeting frequency, duration patterns, and trends
  • ๐ŸŽจ Beautiful Output - Color-coded, formatted terminal displays
  • ๐Ÿ“„ Export Capabilities - Export to markdown with full formatting

MCP Server for AI Integration

  • ๐Ÿค– 8 Comprehensive Tools - Complete meeting data access for AI assistants
  • ๐Ÿ”Œ Claude Desktop Integration - Ready-to-use configuration for Claude
  • ๐Ÿ“ก JSON-RPC Protocol - Standard MCP protocol implementation
  • โšก Real-time Access - Live access to your latest meeting data
  • ๐Ÿ›ก๏ธ Robust Error Handling - Graceful handling of missing data and errors

Enterprise-Ready Features

  • ๐Ÿ Zero Dependencies - Pure Python standard library only
  • โš™๏ธ Flexible Configuration - Environment variables, .env files, CLI arguments
  • ๐Ÿ• Timezone Aware - Proper UTC to local timezone conversion
  • ๐Ÿ“… Flexible Date Parsing - Relative (3d, 24h, 1w) and absolute dates
  • ๐ŸŽฏ Production Ready - Comprehensive error handling and logging

๐Ÿค– MCP Server for AI Integration

Start the MCP server to integrate with AI assistants like Claude Desktop:

# Start MCP server
python -m granola_mcp.mcp

# Start with debug logging
python -m granola_mcp.mcp --debug

# Start with custom cache path
python -m granola_mcp.mcp --cache-path "/path/to/cache.json"

Claude Desktop Integration

Add to your ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "granola-mcp": {
      "command": "python",
      "args": ["-m", "granola_mcp.mcp"],
      "env": {
        "GRANOLA_CACHE_PATH": "/Users/[username]/Library/Application Support/Granola/cache-v3.json"
      }
    }
  }
}

Available MCP Tools

The server provides 10 comprehensive tools:

  1. get_recent_meetings - Get the most recent X meetings (goes back as far as needed)
  2. list_meetings - Simple meeting list with date filters (defaults to last 3 days)
  3. search_meetings - Advanced search with text, participant, and date filters
  4. get_meeting - Complete meeting details with metadata
  5. get_transcript - Full transcript with speaker identification
  6. get_meeting_notes - Structured AI summaries and human notes
  7. list_participants - Participant analysis with meeting history
  8. get_statistics - Generate analytics (summary, frequency, duration, patterns)
  9. export_meeting - Export meetings in markdown format
  10. analyze_patterns - Analyze meeting patterns and trends

MCP Usage Examples

// Get the 5 most recent meetings (regardless of date)
{
  "name": "get_recent_meetings",
  "arguments": {
    "count": 5
  }
}

// List recent meetings (last 3 days by default)  
{
  "name": "list_meetings",
  "arguments": {
    "limit": 10
  }
}

// List meetings from last week
{
  "name": "list_meetings", 
  "arguments": {
    "from_date": "7d",
    "limit": 5
  }
}

// Search meetings with text query
{
  "name": "search_meetings",
  "arguments": {
    "query": "project review",
    "from_date": "7d"
  }
}

// Get complete meeting details
{
  "name": "get_meeting",
  "arguments": {
    "meeting_id": "f47f8acd-70bd-49b7-8b0d-83c49eee07d1"
  }
}

// Get meeting statistics
{
  "name": "get_statistics",
  "arguments": {
    "stat_type": "summary"
  }
}

Project Structure

granola_mcp/
โ”œโ”€โ”€ __init__.py              # Main package exports
โ”œโ”€โ”€ core/                    # Core functionality
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ parser.py           # JSON cache parser
โ”‚   โ”œโ”€โ”€ meeting.py          # Meeting data model
โ”‚   โ”œโ”€โ”€ transcript.py       # Transcript data model
โ”‚   โ””โ”€โ”€ timezone_utils.py   # UTC to CST conversion
โ”œโ”€โ”€ utils/                   # Utility functions
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ config.py           # Configuration management
โ”‚   โ””โ”€โ”€ date_parser.py      # Date parsing utilities
โ”œโ”€โ”€ cli/                     # CLI tools (Phase 2 & 4)
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ main.py             # Main CLI entry point
โ”‚   โ”œโ”€โ”€ commands/           # CLI commands
โ”‚   โ”‚   โ”œโ”€โ”€ list.py         # List meetings
โ”‚   โ”‚   โ”œโ”€โ”€ show.py         # Show meeting details
โ”‚   โ”‚   โ”œโ”€โ”€ export.py       # Export meetings
โ”‚   โ”‚   โ””โ”€โ”€ stats.py        # Statistics & analytics
โ”‚   โ””โ”€โ”€ formatters/         # Output formatters
โ”‚       โ”œโ”€โ”€ colors.py       # ANSI color utilities
โ”‚       โ”œโ”€โ”€ table.py        # Table formatting
โ”‚       โ”œโ”€โ”€ markdown.py     # Markdown export
โ”‚       โ””โ”€โ”€ charts.py       # ASCII charts & visualizations
โ””โ”€โ”€ mcp/                     # MCP server (Phase 3)
    โ””โ”€โ”€ __init__.py

Architecture

See ARCHITECTURE.md for detailed architecture documentation.

Roadmap

See ROADMAP.md for development roadmap and future plans.