Skip to main content
Glama

olk — 在终端中使用 Microsoft Outlook

olk 是一个可通过脚本调用的 CLI 和 MCP 服务器,用于通过 Microsoft Graph 访问 Outlook 邮件、日历、联系人、任务和 OneDrive。它适用于个人 Outlook.com 账户和企业 Microsoft 365 账户。

安装

brew install rlrghb/tap/olk
# or
go install github.com/rlrghb/olkcli/cmd/olk@latest

npm 包名为 olkcli;安装后的命令为 olk

npm install -g olkcli

如果 macOS 在升级后要求 Keychain 访问权限,请参阅 macOS 说明

Related MCP server: Microsoft MCP

快速开始

olk auth login
olk auth status
olk mail list --json --results-only --select id,subject,from
olk mail search 'from:person@example.com subject:urgent'
olk calendar view --days 7
olk contacts search "Alex"
olk todo lists list
olk drive ls

对于工作/学校账户以及仅限企业版的功能:

olk auth login --enterprise

常用命令

需求

命令

检查已登录的账户

olk auth statusolk whoami

查找消息 ID 和主题

olk mail list --json --results-only --select id,subject,from

搜索邮件

olk mail search "from:person@example.com subject:urgent"

查看接下来一周

olk calendar view --days 7

搜索联系人

olk contacts search "Alex"

列出任务列表

olk todo lists list

浏览 OneDrive

olk drive ls

发送邮件

olk mail send --to person@example.com --subject "Hi" --body "Hello"

同步更改

olk changes --json

在脚本中使用 JSON

olk mail list --json --results-only

用作 MCP 服务器

olk mcp

有关所有命令和标志,请参阅命令参考

输出与脚本编写

结果写入 stdout;诊断信息和提示写入 stderr。

olk mail list --json --results-only | jq '.[].subject'
olk contacts list --plain

输出模式包括 JSON(--json)、TSV(--plain)以及默认的对齐表格。使用 --concise 可省略大型正文/预览,使用 --select 可在支持的场景下限制字段。请参阅脚本编写与同步

安全默认设置

  • 对于无人值守的只读运行,请使用 --no-write --no-send --no-input

  • MCP 仅公开精选工具,并且修改操作需要明确选择加入。

  • 外部邮件、日历、联系人和文件文本可使用 --wrap-untrusted 进行包装,以便代理安全地消费。

  • 刷新令牌存储在操作系统钥匙串中;访问令牌仅保存在内存中。

在连接代理或共享日志之前,请阅读安全与隐私指南

文档

贡献

make build
make test
make lint

有关仓库结构、验证、CI 和发布详情,请参阅开发与发布

许可证

请参阅 LICENSE

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessResponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    A Model Context Protocol server that enables interaction with Microsoft 365 services (Excel, Calendar, Mail, OneDrive, Teams, etc.) through the Graph API, allowing AI assistants to manage Microsoft 365 resources via natural language.
    188
    47,489
    951
    MIT
  • F
    license
    C
    quality
    F
    maintenance
    A powerful MCP server that enables AI assistants to interact with Microsoft Graph API for managing Outlook emails, Calendar events, OneDrive files, and Contacts through natural language commands.
    35
    56
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Lightweight MCP server that enables AI agents to manage Microsoft Outlook email, calendar, and files using PKCE authentication with only a Client ID.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol (MCP) server that gives AI assistants full access to Microsoft Outlook emails, calendar, and contacts via the Microsoft Graph API.
    114
    2
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rlrghb/olkcli'

If you have feedback or need assistance with the MCP directory API, please join our Discord server