🥣 格兰诺拉麦片
代理优先CLI 格兰诺拉麦片 会议记录。从终端搜索、列出和检索您的会议。为AI代理构建——每个命令都返回结构化的HATEOAS JSON。
安装
curl -fsSL https://raw.githubusercontent.com/joelhooks/granola-cli/main/install.sh | sh或者从源代码构建:
git clone https://github.com/joelhooks/granola-cli.git
cd granola-cli
bun install
bun run build
cp granola ~/.local/bin/先决条件
设置
# Install mcporter
npm install -g mcporter
# Authenticate with Granola (opens browser)
granola auth远程机器:如果您已通过SSH登录,请先通过隧道连接回调端口: ``sh ssh -L 61200:127.0.0.1:61200 user@host -N`然后运行granola auth` 并在本地浏览器中打开URL。
用法
# Self-documenting command tree
granola
# List meetings
granola meetings
granola meetings --range last_30_days
granola meetings --range custom --start 2026-01-01 --end 2026-02-01
# Get meeting details
granola meeting
granola meeting --transcript
# Natural language search across all notes
granola search "what were the action items from last week"
granola search "decisions about pricing"输出格式
每个命令都返回一个JSON信封——没有纯文本,也没有表:
{
"ok": true,
"command": "granola meetings",
"result": {
"range": "last_30_days",
"meetings": [
{
"id": "abb60eae-...",
"title": "Quarterly planning session",
"date": "Feb 10, 2026 4:00 PM",
"participants": ["Joel Hooks"]
}
],
"count": 5
},
"next_actions": [
{ "command": "granola meeting abb60eae-...", "description": "Get details" },
{ "command": "granola search \"action items\"", "description": "Search across all notes" }
]
}错误包括 fix 字段告诉代理(或您)该做什么:
{
"ok": false,
"command": "granola meetings",
"error": { "message": "OAuth session expired", "code": "AUTH_EXPIRED" },
"fix": "Re-authenticate: granola auth"
}建筑
granola-cli ──→ mcporter ──→ Granola MCP (https://mcp.granola.ai/mcp)
(CLI) (OAuth + (4 tools: query, list, get, transcript)
transport)- 运输:Granola通过OAuth公开了一个MCP服务器。 麦克波特 处理OAuth流和MCP传输。
- 认证:基于浏览器的OAuth,令牌缓存在
~/.mcporter/credentials.json. - 配置:
~/.config/granola-cli/mcporter.json--首次运行时自动创建。 - 不需要API密钥 -通过MCP而不是企业API使用OAuth。
MCP工具
CLI封装了这些Granola MCP工具:
| 命令 | MCP工具 | 说明 |
|---|---|---|
search | query_granola_meetings | 带引文的自然语言搜索 |
meetings | list_meetings | 按时间范围列出 |
meeting | get_meetings | 详细信息、摘要、与会者 |
meeting --transcript | get_meeting_transcript | 逐字记录 |
发布
标记一个版本以触发GitHub Actions发布构建:
git tag v0.1.0
git push origin v0.1.0为macOS(arm64/x64)和Linux(arm64/x64)构建编译的二进制文件。
许可证
麻省理工学院
