会议笔记访问服务

Pantry是一个MCP服务器,使AI助手能够访问Granola会议笔记和转录内容。

  • by bhandzo
  • TypeScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 bhandzo/granola-mcp

使用说明

食品储藏室

MCP服务器,让AI助手访问您的 格兰诺拉麦片 会议记录和成绩单。

适用于任何兼容MCP的客户端: 克劳德代码, 克劳德桌面版等等。

先决条件

  • Node.js >= 18
  • Granola桌面应用程序 安装、运行和登录(服务器读取您的本地身份验证令牌)

安装

Claude Desktop(通过MCP捆绑包一键)

下载最新 pantry.mcpb 捆绑从 发布,然后双击它。Claude Desktop将自动安装服务器。

或者,从命令行安装:

claude mcp add-from-bundle pantry.mcpb

克劳德代码

claude mcp add pantry node /absolute/path/to/pantry/dist/index.js

手动设置(任何MCP客户端)

git clone https://github.com/bhandzo/pantry.git
cd pantry
npm install
npm run build

添加到客户的MCP配置中(例如。 claude_desktop_config.json):

{
  "mcpServers": {
    "pantry": {
      "command": "node",
      "args": ["/absolute/path/to/pantry/dist/index.js"]
    }
  }
}

工具

list-notes

列出您的Granola会议笔记,并可选择日期过滤。

参数 类型 必填 说明
date string no 单个日期(YYYY-MM-DD)或相对: today, yesterday, last week, last month
startDate string 否 日期范围的开始(YYYY-MM-DD)
endDate string 否 日期范围结束(YYYY-MM-DD)
limit number no 最大结果数(默认值:25)

返回一个JSON数组 { id, title, date } 对象,按日期降序排列。

list-transcripts

列出有记录的会议。参数和输出形状与 list-notes.使用 get-transcript 以获取实际的转录内容。

get-note

通过ID获取格兰诺拉麦片便条的全部内容。

参数 类型 必填 说明
noteId 字符串 是 文档ID(来自 list-notes)
contentType string 否 enhanced (AI面板), original (您的笔记),或 auto (最佳可用,默认)
path string no 要写入输出的文件路径。如果省略,则返回内联内容。

行内模式 (没有 path):以markdown文本的形式返回完整注释。

文件模式 (path 提供):使用YAML frontmatter写入一个markdown文件,并返回一个简短的确认。这为大笔记节省了上下文窗口空间。

---
title: "Weekly Standup"
date: "2025-01-15T10:00:00.000Z"
id: "abc123"
type: note
---

Meeting content here...

get-transcript

通过文档ID获取会议的完整记录。

参数 类型 必填 说明
noteId 字符串 是 文档ID(来自 list-notes 或 list-transcripts)
path string no 要写入输出的文件路径。如果省略,则返回内联内容。

行内模式:以带有说话者标签的markdown形式返回成绩单(**Me:**, **System:**).

文件模式:与相同的YAML frontmatter格式 get-note,与 type: transcript.

身份验证的工作原理

服务器从Granola桌面应用程序写入的本地配置文件中读取您的Granola身份验证令牌:

  • macOS: ~/Library/Application Support/Granola/supabase.json
  • 视窗: %APPDATA%/Granola/supabase.json

不需要API键或环境变量。如果Granola已安装并且您已登录,它就可以正常工作。

发展

npm test          # run tests (hits live Granola API)
npm run test:watch # run tests in watch mode
npm run lint       # check formatting and lint rules
npm run lint:fix   # auto-fix lint issues
npm run typecheck  # type check without emitting
npm run build      # compile TypeScript to dist/

构建MCP包

生成一个 pantry.mcpb 用于分发的捆绑包:

mise run bundle

这将编译TypeScript并将服务器打包成单个 .mcpb 文件使用 @anthropic-ai/mcpb该捆绑包仅包含已构建的 dist/ 输出和运行时依赖关系(源、测试和配置文件通过以下方式排除 .mcpbignore).

项目结构

src/
  index.ts              # MCP server entry point, tool registration
  api.ts                # Granola API client (auth, fetch, markdown conversion)
  types.ts              # Shared TypeScript types
  tools/
    list-notes.ts       # list-notes handler
    list-transcripts.ts # list-transcripts handler
    get-note.ts         # get-note handler
    get-transcript.ts   # get-transcript handler
  __tests__/
    api.test.ts         # API client tests
    tools.test.ts       # Tool handler tests
    server.test.ts      # MCP server registration tests

许可证

麻省理工学院