Skip to content

Repository files navigation

Granola MCP Server

An MCP (Model Context Protocol) server that wraps the Granola API, providing tools to search and retrieve meeting notes and documents.

Features

  • Unified Search: Search meeting notes by participant, time range, or topic in a single tool
  • Full Document Retrieval: Fetch complete meeting notes in Markdown format
  • List Document Collections: View all document lists and their metadata

Prerequisites

  • Ruby 3.0 or higher
  • A Granola account with API access
  • Your Granola Bearer token

Installation

  1. Clone this repository:
git clone <repository-url>
cd granola-mcp
  1. Install dependencies:
bundle install

Configuration

  1. Copy the example environment file:
cp .env.example .env
  1. Edit .env and add your Granola Bearer token:
GRANOLA_BEARER_TOKEN=your-bearer-token-here

Alternatively, you can export it as an environment variable:

export GRANOLA_BEARER_TOKEN="your-bearer-token-here"

Usage

Running the Server

ruby granola_mcp_server.rb

Or make it executable:

chmod +x granola_mcp_server.rb
./granola_mcp_server.rb

Available Tools

1. SearchMeetingNotesTool

Search for meeting notes using multiple criteria. You can search by participant, date range, topic, or any combination of these.

Parameters:

  • participant (optional): Name or email of participant to search for
  • start_date (optional): Start date in ISO format (YYYY-MM-DD)
  • end_date (optional): End date in ISO format (YYYY-MM-DD)
  • topic (optional): Topic or keywords to search for
  • search_content (optional): Whether to search in document content (slower) or just titles (default: false)
  • limit (optional): Maximum number of results to return (default: 20)

Note: At least one search criterion must be provided. If using date range, both start_date and end_date are required.

Example searches:

  • Find all meetings with a specific person
  • Find meetings within a date range
  • Find meetings about a specific topic
  • Combine criteria to narrow results

2. FetchMeetingNoteTool

Retrieve the full content of a specific meeting note in Markdown format.

Parameters:

  • document_id (required): The ID of the document to fetch

Returns a complete Markdown representation including:

  • Meeting title and date
  • Participants list
  • Meeting summary
  • Full notes content with proper formatting

3. GetDocumentListsTool

Retrieve all document collections/lists.

No parameters required.

Returns metadata for each list including:

  • List ID and title
  • Document count
  • Visibility settings
  • Member information
  • Timestamps

Response Format

All tools return responses in this format:

Search Results

{
  "success": true,
  "count": 5,
  "documents": [
    {
      "id": "document-uuid",
      "title": "Meeting Title",
      "date": "2025-01-15T10:00:00Z",
      "updated_at": "2025-01-15T11:30:00Z",
      "participants": [
        {
          "name": "John Doe",
          "email": "john@example.com",
          "role": "creator"
        }
      ],
      "preview": "Meeting notes preview..."
    }
  ]
}

Full Document

{
  "success": true,
  "document": {
    "id": "document-uuid",
    "title": "Meeting Title",
    "created_at": "2025-01-15T10:00:00Z",
    "updated_at": "2025-01-15T11:30:00Z",
    "content_markdown": "# Meeting Title\n\n**Date:** January 15, 2025...\n\n## Participants\n\n..."
  }
}

MCP Client Configuration

To use this server with an MCP client, add it to your MCP settings:

{
  "mcpServers": {
    "granola": {
      "command": "ruby",
      "args": ["/path/to/granola_mcp_server.rb"],
      "env": {
        "GRANOLA_BEARER_TOKEN": "your-bearer-token"
      }
    }
  }
}

Error Handling

The server handles common errors:

  • Missing bearer token
  • API request failures
  • Invalid date formats
  • Document not found errors
  • Rate limiting

Errors are returned in this format:

{
  "success": false,
  "error": "Error message"
}

Development

Adding New Tools

To add a new tool, create a new class inheriting from FastMcp::Tool:

class MyNewTool < FastMcp::Tool
  description "Tool description"
  
  arguments do
    required(:param_name).filled(:string).description("Parameter description")
    optional(:optional_param).filled(:integer).description("Optional parameter")
  end
  
  def call(param_name:, optional_param: nil)
    # Tool implementation
  end
end

# Register it in the server setup
server.register_tool(MyNewTool)

License

MIT License

About

MCP server for Granola API - provides tools to search and fetch meeting documents

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages