Skip to main content
Glama
Granola MCP Server

Granola MCP Server

by shardi-b
README.md
# GranolaMCP

A CLI and MCP server for accessing [Granola.ai](https://granola.ai) meeting notes, transcripts, and AI summaries from your terminal or AI assistant.

> Originally created by [Pedram Amini](https://github.com/pedramamini/GranolaMCP). This fork adds **Granola v4 support** with server-side API fetching for AI summaries.

## What's New in v0.2.0

- **Granola v4 cache support** -- auto-detects `cache-v4.json` (falls back to v3)
- **Server-side AI summary fetching** -- Granola v4 moved meeting summaries to their API. This version fetches them automatically when you use `--summary`
- **No dependencies** -- pure Python standard library, no pip packages required
- **Zero configuration** -- reads auth tokens from Granola's local config automatically

## Installation

```bash
# Install with pipx (recommended)
pipx install git+https://github.com/shardulbansal/GranolaMCP.git

# Or pip
pip install git+https://github.com/shardulbansal/GranolaMCP.git

# Or from source
git clone https://github.com/shardulbansal/GranolaMCP.git
cd GranolaMCP
pip install -e .
```

## Quick Start

```bash
# List recent meetings
granola list --last 7d

# Show AI summary for a meeting
granola show <meeting-id> --summary

# Search by title
granola list --title-contains "standup" --last 30d

# Show everything (summary + notes + transcript + metadata)
granola show <meeting-id> --all

# Export to markdown
granola export <meeting-id> > meeting.md
```

## CLI Commands

### List Meetings

```bash
granola list --last 7d                              # Last 7 days
granola list --last 24h                             # Last 24 hours
granola list --from 2025-01-01 --to 2025-01-31      # Date range
granola list --title-contains "standup"             # Search by title
granola list --participant "john@example.com"       # Filter by participant
granola list --folder "Work"                        # Filter by folder
granola list --sort-by date --reverse               # Sort options
granola list --limit 10                             # Limit results
```

### Show Meeting Details

```bash
granola show <meeting-id>                           # Basic info
granola show <meeting-id> --summary                 # AI-generated summary
granola show <meeting-id> --transcript              # Full transcript
granola show <meeting-id> --notes                   # Human-taken notes
granola show <meeting-id> --all                     # Everything
granola show <meeting-id> --speaker "John"          # Filter transcript by speaker
granola show <meeting-id> --timestamps              # Include timestamps
```

Partial meeting IDs work -- the first 8 characters are usually enough.

### Export

```bash
granola export <meeting-id>                         # Export to markdown
granola export <meeting-id> > meeting.md            # Save to file
```

### Statistics

```bash
granola stats --summary                             # Overview
granola stats --meetings-per-day --last 30d         # Frequency
granola stats --duration-distribution               # Duration stats
granola stats --participant-frequency               # Who you meet with
granola stats --all                                 # Full dashboard
```

### Collect Your Words

Extract your own spoken words from meetings (useful for LLM fine-tuning):

```bash
granola collect --last 7d --output-dir ./my-words
granola collect --from 2025-01-01 --to 2025-01-31 --output-dir ./january-words
```

## MCP Server (AI Integration)

Use Granola data from Claude Desktop or any MCP-compatible AI assistant.

### Claude Desktop Setup

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

```json
{
  "mcpServers": {
    "granola": {
      "command": "granola-mcp"
    }
  }
}
```

### Claude Code Setup

Add to your MCP settings:

```json
{
  "mcpServers": {
    "granola": {
      "command": "granola-mcp",
      "args": []
    }
  }
}
```

### Available MCP Tools

| Tool | Description |
|------|-------------|
| `get_recent_meetings` | Get the most recent N meetings |
| `list_meetings` | List meetings with date filters |
| `search_meetings` | Search by text, participant, date |
| `get_meeting` | Full meeting details |
| `get_transcript` | Speaker-identified transcript |
| `get_meeting_notes` | AI summaries and human notes |
| `list_participants` | Participant analysis |
| `get_statistics` | Meeting analytics |
| `export_meeting` | Export as markdown |
| `analyze_patterns` | Meeting pattern analysis |

## How It Works

GranolaMCP reads meeting data from two sources:

1. **Local cache** (`~/Library/Application Support/Granola/cache-v4.json`) -- meeting metadata, calendar events, transcripts
2. **Granola API** (`api.granola.ai`) -- AI-generated summaries and document panels (fetched on demand)

Authentication for the API uses the token stored in Granola's local `supabase.json` file. No manual configuration needed -- if Granola is installed and you're logged in, it just works.

### Granola v3 vs v4

| Feature | v3 | v4 |
|---------|----|----|
| Cache file | `cache-v3.json` | `cache-v4.json` |
| Cache format | Double JSON (string inside JSON) | Native JSON object |
| AI summaries | Stored locally in `documentPanels` | Stored server-side, fetched via API |
| Transcripts | In local cache | In local cache (unchanged) |

This tool handles both versions automatically.

## Python API

```python
from granola_mcp.core.parser import GranolaParser
from granola_mcp.core.meeting import Meeting

parser = GranolaParser()
meetings = parser.get_meetings()

for data in meetings[:5]:
    meeting = Meeting(data)
    print(f"{meeting.title} - {meeting.start_time}")
    if meeting.has_transcript():
        print(f"  Transcript: {meeting.transcript.word_count} words")

# Get a specific meeting with API-fetched summary
data = parser.get_meeting_by_id("your-meeting-id")
meeting = Meeting(data)
print(meeting.summary)  # Fetched from Granola API if not in local cache
```

## Requirements

- Python 3.10+
- macOS (Granola is a macOS app)
- Granola.ai installed and logged in
- No external Python dependencies

## License

MIT -- see [LICENSE](LICENSE) for details.

Originally created by [Pedram Amini](https://github.com/pedramamini/GranolaMCP). Granola v4 API support by [Shardul Bansal](https://github.com/shardulbansal).