Nworks について
nworks は NAVER WORKS(LINE WORKS)向けのコマンドラインツールおよび MCP サーバーで、外部の AI エージェントやターミナルからメッセージ、カレンダー、ドライブ、メール、タスク、ボードを操作できます。コミュニティが維持する非公式プロジェクトで、NAVER WORKS や LINE WORKS とは提携していません。
主な機能
- 01コマンドラインと MCP サーバーの両方のインターフェース
- 02メッセージ、カレンダー、ドライブ、メール、タスク、ボードに対応
- 03スクリプトやエージェント向けの JSON 出力
- 04メッセージ送信とメール送信のドライランモード
- 05Service Account とユーザー OAuth による認証
活用シーン
- 01AI エージェントによる今日の予定確認と会議の作成
- 02CI での デプロイ完了通知のチャネル投稿
- 03スクリプトによる組織メンバーへの一括メッセージ送信
MCP 対応
MCP 経由で 36 個のツールを提供し、Claude Desktop や Cursor などのクライアントから、メッセージ、カレンダー、ドライブ、メール、タスク、ボード、連絡先を操作できます。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
このサーバーのパッケージやリモートエンドポイントはまだ取得できていません。プロジェクトの README の手順に従ってください。
ツール
ローカルサーバーのツールはマシン上で起動して初めて取得できます。メンテナーはまだツール一覧を提供していません。
詳細
nworks
LINE WORKS (NAVER WORKS) 向けの全機能搭載 MCP サーバーです。 CLI + MCP サーバー — メッセージ、カレンダー、ドライブ、メール、タスク、掲示板をカバーする 36 個のツール。
nworks は、外部の AI エージェント (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 エージェントは実際にこのように使います
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をリダイレクト URL として登録してください。
AI エージェント連携 (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 エージェントは
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 エージェントの使用例
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をサポートしています。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には少なくとも 1 人のメンバー (通常は自分自身) を指定する必要があります。自分のユーザー ID はnworks whoamiで取得できます。
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 デベロッパーコンソール で追加してください。
| スコープ | 目的 | 認証 | 必要な機能 |
|---|---|---|---|
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 | 掲示板読み取り/書き込み | ユーザー OAuth | board list/posts/read/create |
board.read | 掲示板読み取り専用 | ユーザー 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 # default: full functionality in one login nworks login --user --preset readonly # read-only scopes
defaultはallのエイリアスです。メッセージ送信はサービスアカウント (bot) を使用するため、プリセットに関係なく動作します。 再ログインでアクセスが狭まることはありません — 新しく要求されたスコープは既存のトークンにマージされるため、プリセットの切り替えは機能を追加するだけです。個別に指定する場合は--scope "calendar calendar.read"を使用してください。
環境変数
nworks login を使わずに nworks を利用するには環境変数を設定します (CI/エージェントで便利です)。
# 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 エージェントが 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 サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。