关于 Nworks
nworks 是面向 NAVER WORKS(LINE WORKS)的命令行工具与 MCP 服务,可供外部 AI Agent 和终端操作消息、日历、云盘、邮件、任务与公告板。项目为社区维护的非官方项目,与 NAVER WORKS 无关联。
主要功能
- 01命令行与 MCP 服务双重接口
- 02覆盖消息、日历、云盘、邮件、任务、公告板等模块
- 03支持 --json 输出,便于脚本与 Agent 解析
- 04消息发送支持 --dry-run 测试模式
- 05通过 Service Account 或用户 OAuth 进行认证
适用场景
- 01AI Agent 查询日程并创建会议
- 02CI/CD 部署完成后向团队频道发送通知
- 03脚本批量向组织成员发送消息
MCP 相关
以 MCP 服务形式对外提供 36 个工具,供 Claude Desktop、Cursor 等 MCP 客户端调用,涵盖消息、日历、云盘、邮件、任务、公告板与通讯录。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
nworks
功能齐全的 LINE WORKS(NAVER WORKS)MCP 服务。 CLI + MCP 服务,提供 36 个工具,涵盖消息、日历、网盘、邮件、任务和公告板。
nworks 让外部 AI Agent(Claude、Cursor)和终端能够从外部操作 LINE WORKS,与 LINE WORKS 自带的产品内 AI(AiStudio、WORKS AI)互为补充,并非替代。此项目为非官方项目,由社区维护;与 LINE WORKS / NAVER WORKS 无关联。
快速入门
npm install -g nworks
nworks login --user
nworks calendar list
首次使用? 首先需要创建 Developer Console 应用(Client ID/Secret)、注册重定向 URL;如果要发送机器人消息,还需要管理员批准。请参阅入门与管理员设置指南。
AI Agent 实际使用方式
User: Show me today's schedule
Claude → nworks_calendar_list
→ 3 events: Standup (10:00), Lunch meeting (12:00), Code review (15:00)
User: Send a deploy complete message to the team channel
Claude → nworks_message_send
{ "channel": "C001", "text": "v1.2.0 deploy complete" }
→ Message sent
User: Check my unread emails and summarize them
Claude → nworks_mail_list (unread)
→ 3 unread emails
Claude → nworks_mail_read (each)
→ "3 unread: 1) Deploy approval from CTO, 2) Meeting invite for Friday, 3) Weekly report reminder"
安装
npx nworks # Run directly
npm install -g nworks # Global install
登录
# User OAuth (calendar, drive, mail, tasks, boards)
nworks login --user --scope "calendar calendar.read file file.read mail mail.read task task.read board board.read user.read"
# Bot messaging (Service Account)
nworks login
# Check auth status
nworks whoami
# Logout
nworks logout
nworks login --user只需要 CLIENT_ID + CLIENT_SECRET。通过环境变量或现有配置设置的值不会再次询问。
Developer Console:要使用 User OAuth,请在 Developer Console 中将
http://localhost:9876/callback注册为 Redirect URL。
AI Agent 集成(MCP 服务)
兼容 Claude Desktop、Cursor 和其他支持 MCP 的客户端。
设置
请先登录:
nworks login --user --scope "calendar calendar.read file file.read mail mail.read task task.read board board.read user.read"
然后将其添加到 MCP 配置(~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"nworks": {
"command": "nworks",
"args": ["mcp"]
}
}
}
登录一次即可启用全部 36 个工具。无需额外设置环境变量。
如果未通过 CLI 登录,AI Agent 可以调用
nworks_setup→nworks_login_user,直接通过浏览器完成身份验证。Client Secret 和 Private Key 路径必须通过 MCP 配置的env字段或系统环境变量预先设置。
MCP 工具(32 个)
| 工具 | 描述 | 身份验证 |
|---|---|---|
| 设置 / 身份验证 | ||
nworks_setup | 配置 API 凭据(客户端 ID 等)。客户端密钥通过环境变量设置 | — |
nworks_login_user | 用户通过 OAuth 浏览器登录(包含所有权限范围) | — |
nworks_logout | 删除凭据和令牌 | — |
nworks_whoami | 检查身份验证状态 | — |
nworks_doctor | 诊断连接(身份验证、令牌、API 健康状况) | — |
| 消息 | ||
nworks_message_send | 向用户 / 频道发送消息 | 服务账号 |
nworks_message_members | 列出频道成员 | 服务账号 |
nworks_directory_members | 列出组织成员 | 服务账号 |
| 日历 | ||
nworks_calendar_list | 列出日历活动 | 用户 OAuth(calendar.read) |
nworks_calendar_create | 创建日历活动 | 用户 OAuth(calendar + calendar.read) |
nworks_calendar_update | 更新日历活动 | 用户 OAuth(calendar + calendar.read) |
nworks_calendar_delete | 删除日历活动 | 用户 OAuth(calendar + calendar.read) |
| 云盘 | ||
nworks_drive_list | 列出云盘文件 / 文件夹 | 用户 OAuth(file.read) |
nworks_drive_upload | 将文件上传到云盘 | 用户 OAuth(file) |
nworks_drive_download | 下载文件(超过 5MB 时保存到本地) | 用户 OAuth(file.read) |
nworks_sharedrive_list | 列出共享云盘 | 用户 OAuth(file.read) |
nworks_sharedrive_files | 列出共享云盘中的文件 / 文件夹 | 用户 OAuth(file.read) |
nworks_sharedrive_download | 下载共享云盘文件(超过 5MB 时保存到本地) | 用户 OAuth(file.read) |
| 邮件 | ||
nworks_mail_send | 发送邮件 | 用户 OAuth(mail) |
nworks_mail_list | 列出邮箱邮件 | 用户 OAuth(mail.read) |
nworks_mail_read | 阅读邮件详情 | 用户 OAuth(mail.read) |
nworks_mail_download_attachment | 下载邮件附件(超过 5MB 时保存到本地) | 用户 OAuth(mail.read) |
| 任务 | ||
nworks_task_list | 列出任务 | 用户 OAuth(task.read) |
nworks_task_create | 创建任务 | 用户 OAuth(task + user.read) |
nworks_task_update | 更新 / 完成任务 | 用户 OAuth(task + user.read) |
nworks_task_delete | 删除任务 | 用户 OAuth(task + user.read) |
| 看板 | ||
nworks_board_list | 列出看板 | 用户 OAuth(board.read) |
nworks_board_posts | 列出看板帖子 | 用户 OAuth(board.read) |
nworks_board_read | 阅读看板帖子详情 | 用户 OAuth(board.read) |
nworks_board_create | 创建看板帖子 | 用户 OAuth(board) |
| 联系人 | ||
nworks_contact_list | 列出联系人 | 用户 OAuth(contact.read) |
nworks_contact_get | 获取联系人详情 | 用户 OAuth(contact.read) |
nworks_contact_create | 创建联系人 | 用户 OAuth(contact) |
nworks_contact_update | 更新联系人 | 用户 OAuth(contact) |
nworks_contact_delete | 删除联系人 | 用户 OAuth(contact) |
nworks_contact_list_tags | 列出联系人标签 | 用户 OAuth(contact.read) |
AI Agent 使用示例
User: Schedule a meeting tomorrow at 2pm and notify the team channel
Claude → nworks_calendar_create
{ "summary": "Meeting", "start": "2026-03-15T14:00:00", "end": "2026-03-15T15:00:00" }
→ Event created
Claude → nworks_message_send
{ "channel": "C001", "text": "Meeting scheduled tomorrow at 14:00" }
→ Message sent
User: Check my unread emails and summarize them
Claude → nworks_mail_list (unread)
→ 3 unread emails
Claude → nworks_mail_read (each)
→ "3 unread: 1) Deploy approval from CTO, 2) Meeting invite for Friday, 3) Weekly report reminder"
CLI 使用方法
所有命令都支持
--json,便于通过管道 / 脚本 / Agent 解析。message send、mail send和drive upload支持--dry-run,可在不发送的情况下进行测试。
消息(Bot API)
# Send text to user
nworks message send --to <userId> --text "Hello"
# Send text to channel
nworks message send --channel <channelId> --text "Announcement"
# Button message
nworks message send --to <userId> --type button --text "PR review request" \
--actions '[{"type":"message","label":"Approve","postback":"approve"}]'
# List message
nworks message send --to <userId> --type list --text "Today's tasks" \
--elements '[{"title":"Code review","subtitle":"PR #382"}]'
# List channel members
nworks message members --channel <channelId>
目录
nworks directory members # List organization members
日历(用户 OAuth)
# List today's events
nworks calendar list
# Specify date range
nworks calendar list --from "2026-03-14T00:00:00+09:00" --until "2026-03-14T23:59:59+09:00"
# Create event
nworks calendar create --title "Meeting" --start "2026-03-14T14:00+09:00" --end "2026-03-14T15:00+09:00"
# With location/description
nworks calendar create --title "Lunch" --start "2026-03-14T12:00+09:00" --end "2026-03-14T13:00+09:00" \
--location "Conference Room" --description "Quarterly review"
# With attendees + notification
nworks calendar create --title "Team meeting" --start "2026-03-14T10:00+09:00" --end "2026-03-14T11:00+09:00" \
--attendees "[email protected],[email protected]" --notify
# Update event
nworks calendar update --id <eventId> --title "Updated title"
# Delete event
nworks calendar delete --id <eventId>
云盘(用户 OAuth)
# List files/folders
nworks drive list
# Upload file
nworks drive upload --file ./report.pdf
# Upload to specific folder
nworks drive upload --file ./report.pdf --folder <folderId>
# Download file
nworks drive download --file-id <fileId>
# Specify output path/name
nworks drive download --file-id <fileId> --out ./downloads --name report.pdf
# List shared drives
nworks drive sharedrive-list
# List files in a shared drive (root)
nworks drive sharedrive-files --sharedrive <sharedriveId>
# List files in a shared drive folder
nworks drive sharedrive-files --sharedrive <sharedriveId> --folder <fileId>
# Download a shared drive file
nworks drive sharedrive-download --sharedrive <sharedriveId> --file-id <fileId>
邮件(用户 OAuth)
# Send mail
nworks mail send --to "[email protected]" --subject "Subject" --body "Body"
# With CC/BCC
nworks mail send --to "[email protected]" --cc "[email protected]" --subject "Subject" --body "Body"
# List inbox
nworks mail list
# Unread only
nworks mail list --unread
# Read mail detail
nworks mail read --id <mailId>
# Download a mail attachment
nworks mail download-attachment --id <mailId> --attachment-id <attachmentId>
# Specify output path/name
nworks mail download-attachment --id <mailId> --attachment-id <attachmentId> --out ./downloads --name invoice.pdf
任务(用户 OAuth)
# List tasks
nworks task list
# Incomplete only
nworks task list --status TODO
# Create task
nworks task create --title "Code review" --body "Review PR #382"
# With due date
nworks task create --title "Deploy" --due 2026-03-20
# Mark as done
nworks task update --id <taskId> --status done
# Delete task
nworks task delete --id <taskId>
看板(用户 OAuth)
# List boards
nworks board list
# List posts
nworks board posts --board <boardId>
# Read post detail
nworks board read --board <boardId> --post <postId>
# Create post
nworks board create --board <boardId> --title "Announcement" --body "Content"
# With notification + disable comments
nworks board create --board <boardId> --title "Notice" --body "Content" --notify --no-comment
联系人(用户 OAuth)
# List contacts
nworks contact list
# Filter by tag
nworks contact list --tag <contactTagId>
# Get contact detail
nworks contact get --id <contactId>
# Create contact
nworks contact create --payload '{"contactName":{"lastName":"Kim","firstName":"Chulsoo"},"emails":[{"email":"[email protected]","primary":true}],"permission":{"accessibleRange":"MEMBER","isCoEditing":false,"accessibleMembers":[{"id":"<yourUserId>","type":"USER"}]}}'
# Update contact
nworks contact update --id <contactId> --payload '{"telephones":[{"type":"CELLPHONE","telephone":"010-1234-5678","primary":true}]}'
# Delete contact
nworks contact delete --id <contactId>
# List contact tags
nworks contact list-tags
contact create需要contactName和permission;permission.accessibleMembers必须至少列出一位成员(通常是你自己)。通过nworks whoami获取你自己的用户 ID。
CI/CD 部署通知
# Notify team channel after deployment in GitHub Actions
nworks message send --channel $CHANNEL_ID --text "v${VERSION} deployed"
团队自动化脚本
# Send daily standup reminder to all members
for userId in $(nworks directory members --json | jq -r '.users[].userId'); do
nworks message send --to "$userId" --text "Standup at 10:00 today"
done
OAuth 权限范围
在 LINE WORKS Developer Console 中添加所需的权限范围。
| 权限范围 | 用途 | 认证方式 | 适用于 |
|---|---|---|---|
bot | Bot 消息收发 | 服务账号 | message send |
bot.read | 读取 Bot 频道/成员 | 服务账号 | message members |
calendar | 日历写入 | 用户 OAuth | calendar create/update/delete(需要 calendar.read) |
calendar.read | 日历读取 | 用户 OAuth | calendar list,日历写入也需要此权限 |
file | Drive 读取/写入 | 用户 OAuth | drive list/upload/download |
file.read | Drive 只读 | 用户 OAuth | drive list/download |
mail | 邮件读取/写入 | 用户 OAuth | mail send/list/read |
mail.read | 邮件只读 | 用户 OAuth | mail list/read |
task | 任务读取/写入 | 用户 OAuth | task create/update/delete(需要 user.read) |
task.read | 任务只读 | 用户 OAuth | task list |
user.read | 读取用户信息 | 服务账号/用户 OAuth | directory members,任务写入也需要此权限 |
board | Board 读取/写入 | 用户 OAuth | board list/posts/read/create |
board.read | Board 只读 | 用户 OAuth | board list/posts/read |
contact | 联系人读取/写入 | 用户 OAuth | contact create/update/delete(需要 contact.read) |
contact.read | 联系人只读 | 用户 OAuth | contact list/get/list-tags |
预设比逐项列出权限范围更简单:
nworks login --user --preset all # 默认:一次登录即可使用全部功能 nworks login --user --preset readonly # 只读权限范围
default是all的别名。消息发送使用服务账号(bot),因此不受预设影响。 重新登录不会缩小访问权限——新申请的权限范围会与现有令牌合并,因此切换预设只会增加功能。如需手动选择权限范围,请使用--scope "calendar calendar.read"。
环境变量
设置环境变量即可在不运行 nworks login 的情况下使用 nworks(适用于 CI/Agent)。
# Required
NWORKS_CLIENT_ID=
NWORKS_CLIENT_SECRET=
# Bot messaging only (not needed for User OAuth)
NWORKS_SERVICE_ACCOUNT=
NWORKS_PRIVATE_KEY_PATH=
NWORKS_BOT_ID=
# Optional
NWORKS_DOMAIN_ID=
NWORKS_SCOPE= # default: bot bot.read user.read
NWORKS_VERBOSE=1 # debug logging
使用环境变量的 MCP 服务
敏感值(Client Secret、Private Key 路径)必须通过 MCP 配置的 env 字段设置。Client ID 等非敏感值可由 AI Agent 通过 nworks_setup 工具配置。
{
"mcpServers": {
"nworks": {
"command": "npx",
"args": ["-y", "nworks", "mcp"],
"env": {
"NWORKS_CLIENT_SECRET": "<Client Secret>",
"NWORKS_PRIVATE_KEY_PATH": "<Private Key file absolute path (for Service Account)>"
}
}
}
}
许可证
Apache-2.0
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。