nworks 1.2.2 β 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -190
- package/README.ja.md +459 -393
- package/README.ko.md +459 -393
- package/README.md +459 -393
- package/dist/index.js +1467 -531
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +1948 -1218
- package/dist/mcp.js.map +1 -1
- package/package.json +61 -58
package/README.md
CHANGED
|
@@ -1,393 +1,459 @@
|
|
|
1
|
-
# nworks
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/nworks)
|
|
4
|
-
[](LICENSE)
|
|
5
|
-
[](https://www.npmjs.com/package/nworks)
|
|
6
|
-
[](https://glama.ai/mcp/servers/yjcho9317/nworks)
|
|
7
|
-
|
|
8
|
-
Featured in [awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers)
|
|
9
|
-
|
|
10
|
-
πΊπΈ English | [π°π· νκ΅μ΄](README.ko.md) | [π―π΅ ζ₯ζ¬θͺ](README.ja.md)
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<img src="assets/demo.gif" width="600" alt="nworks demo">
|
|
14
|
-
</p>
|
|
15
|
-
|
|
16
|
-
Full-featured MCP server for LINE WORKS (NAVER WORKS).
|
|
17
|
-
CLI + MCP server β
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
|
114
|
-
|
|
115
|
-
|
|
|
116
|
-
| `
|
|
117
|
-
|
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
121
|
-
| **
|
|
122
|
-
| `
|
|
123
|
-
| `
|
|
124
|
-
| `
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| **
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
|
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
|
|
|
138
|
-
| `
|
|
139
|
-
|
|
|
140
|
-
| `
|
|
141
|
-
| `
|
|
142
|
-
|
|
|
143
|
-
| `
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
#
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
#
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
#
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
1
|
+
# nworks
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/nworks)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://www.npmjs.com/package/nworks)
|
|
6
|
+
[](https://glama.ai/mcp/servers/yjcho9317/nworks)
|
|
7
|
+
|
|
8
|
+
Featured in [awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers)
|
|
9
|
+
|
|
10
|
+
πΊπΈ English | [π°π· νκ΅μ΄](README.ko.md) | [π―π΅ ζ₯ζ¬θͺ](README.ja.md)
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img src="assets/demo.gif" width="600" alt="nworks demo">
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
Full-featured MCP server for LINE WORKS (NAVER WORKS).
|
|
17
|
+
CLI + MCP server β 36 tools covering messages, calendar, drive, mail, tasks, and boards.
|
|
18
|
+
|
|
19
|
+
nworks lets **external** AI agents (Claude, Cursor) and your terminal *operate* LINE WORKS from the outside β complementary to LINE WORKS' own in-product AI (AiStudio, WORKS AI), not a replacement. Unofficial and community-maintained; not affiliated with LINE WORKS / NAVER WORKS.
|
|
20
|
+
|
|
21
|
+
## Quickstart
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g nworks
|
|
25
|
+
nworks login --user
|
|
26
|
+
nworks calendar list
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
> **First time?** You first need a Developer Console app (Client ID/Secret), a registered redirect URL, and β for bot messaging β admin approval. See the [Onboarding & Admin Setup guide](ONBOARDING.md).
|
|
30
|
+
|
|
31
|
+
### AI Agents Actually Use It Like This
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
User: Show me today's schedule
|
|
35
|
+
|
|
36
|
+
Claude β nworks_calendar_list
|
|
37
|
+
β 3 events: Standup (10:00), Lunch meeting (12:00), Code review (15:00)
|
|
38
|
+
|
|
39
|
+
User: Send a deploy complete message to the team channel
|
|
40
|
+
|
|
41
|
+
Claude β nworks_message_send
|
|
42
|
+
{ "channel": "C001", "text": "v1.2.0 deploy complete" }
|
|
43
|
+
β Message sent
|
|
44
|
+
|
|
45
|
+
User: Check my unread emails and summarize them
|
|
46
|
+
|
|
47
|
+
Claude β nworks_mail_list (unread)
|
|
48
|
+
β 3 unread emails
|
|
49
|
+
Claude β nworks_mail_read (each)
|
|
50
|
+
β "3 unread: 1) Deploy approval from CTO, 2) Meeting invite for Friday, 3) Weekly report reminder"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Install
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx nworks # Run directly
|
|
57
|
+
npm install -g nworks # Global install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Login
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# User OAuth (calendar, drive, mail, tasks, boards)
|
|
64
|
+
nworks login --user --scope "calendar calendar.read file file.read mail mail.read task task.read board board.read user.read"
|
|
65
|
+
|
|
66
|
+
# Bot messaging (Service Account)
|
|
67
|
+
nworks login
|
|
68
|
+
|
|
69
|
+
# Check auth status
|
|
70
|
+
nworks whoami
|
|
71
|
+
|
|
72
|
+
# Logout
|
|
73
|
+
nworks logout
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
> `nworks login --user` only requires CLIENT_ID + CLIENT_SECRET. Values already set via environment variables or existing config won't be asked again.
|
|
77
|
+
|
|
78
|
+
> **Developer Console**: To use User OAuth, register `http://localhost:9876/callback` as a Redirect URL in the [Developer Console](https://dev.worksmobile.com/en/).
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## AI Agent Integration (MCP Server)
|
|
83
|
+
|
|
84
|
+
Works with Claude Desktop, Cursor, and other MCP-compatible clients.
|
|
85
|
+
|
|
86
|
+
### Setup
|
|
87
|
+
|
|
88
|
+
Login first:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
nworks login --user --scope "calendar calendar.read file file.read mail mail.read task task.read board board.read user.read"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Then add to your MCP config (`~/.config/claude/claude_desktop_config.json`):
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"mcpServers": {
|
|
99
|
+
"nworks": {
|
|
100
|
+
"command": "nworks",
|
|
101
|
+
"args": ["mcp"]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
One login enables all 36 tools. No extra env setup needed.
|
|
108
|
+
|
|
109
|
+
> Without CLI login, an AI agent can call `nworks_setup` β `nworks_login_user` to authenticate via browser directly. Client Secret and Private Key path must be pre-configured via MCP config `env` field or system environment variables.
|
|
110
|
+
|
|
111
|
+
### MCP Tools (32)
|
|
112
|
+
|
|
113
|
+
| Tool | Description | Auth |
|
|
114
|
+
|------|-------------|------|
|
|
115
|
+
| **Setup / Auth** | | |
|
|
116
|
+
| `nworks_setup` | Configure API credentials (Client ID, etc.). Client Secret is set via env | β |
|
|
117
|
+
| `nworks_login_user` | User OAuth browser login (all scopes included) | β |
|
|
118
|
+
| `nworks_logout` | Delete credentials and tokens | β |
|
|
119
|
+
| `nworks_whoami` | Check auth status | β |
|
|
120
|
+
| `nworks_doctor` | Diagnose connection (auth, tokens, API health) | β |
|
|
121
|
+
| **Messages** | | |
|
|
122
|
+
| `nworks_message_send` | Send message to user/channel | Service Account |
|
|
123
|
+
| `nworks_message_members` | List channel members | Service Account |
|
|
124
|
+
| `nworks_directory_members` | List organization members | Service Account |
|
|
125
|
+
| **Calendar** | | |
|
|
126
|
+
| `nworks_calendar_list` | List calendar events | User OAuth (calendar.read) |
|
|
127
|
+
| `nworks_calendar_create` | Create calendar event | User OAuth (calendar + calendar.read) |
|
|
128
|
+
| `nworks_calendar_update` | Update calendar event | User OAuth (calendar + calendar.read) |
|
|
129
|
+
| `nworks_calendar_delete` | Delete calendar event | User OAuth (calendar + calendar.read) |
|
|
130
|
+
| **Drive** | | |
|
|
131
|
+
| `nworks_drive_list` | List drive files/folders | User OAuth (file.read) |
|
|
132
|
+
| `nworks_drive_upload` | Upload file to drive | User OAuth (file) |
|
|
133
|
+
| `nworks_drive_download` | Download file (saves locally if >5MB) | User OAuth (file.read) |
|
|
134
|
+
| `nworks_sharedrive_list` | List shared drives | User OAuth (file.read) |
|
|
135
|
+
| `nworks_sharedrive_files` | List files/folders in a shared drive | User OAuth (file.read) |
|
|
136
|
+
| `nworks_sharedrive_download` | Download a shared drive file (saves locally if >5MB) | User OAuth (file.read) |
|
|
137
|
+
| **Mail** | | |
|
|
138
|
+
| `nworks_mail_send` | Send mail | User OAuth (mail) |
|
|
139
|
+
| `nworks_mail_list` | List mailbox | User OAuth (mail.read) |
|
|
140
|
+
| `nworks_mail_read` | Read mail detail | User OAuth (mail.read) |
|
|
141
|
+
| `nworks_mail_download_attachment` | Download a mail attachment (saves locally if >5MB) | User OAuth (mail.read) |
|
|
142
|
+
| **Tasks** | | |
|
|
143
|
+
| `nworks_task_list` | List tasks | User OAuth (task.read) |
|
|
144
|
+
| `nworks_task_create` | Create task | User OAuth (task + user.read) |
|
|
145
|
+
| `nworks_task_update` | Update/complete task | User OAuth (task + user.read) |
|
|
146
|
+
| `nworks_task_delete` | Delete task | User OAuth (task + user.read) |
|
|
147
|
+
| **Boards** | | |
|
|
148
|
+
| `nworks_board_list` | List boards | User OAuth (board.read) |
|
|
149
|
+
| `nworks_board_posts` | List board posts | User OAuth (board.read) |
|
|
150
|
+
| `nworks_board_read` | Read board post detail | User OAuth (board.read) |
|
|
151
|
+
| `nworks_board_create` | Create board post | User OAuth (board) |
|
|
152
|
+
| **Contacts** | | |
|
|
153
|
+
| `nworks_contact_list` | List contacts | User OAuth (contact.read) |
|
|
154
|
+
| `nworks_contact_get` | Get contact detail | User OAuth (contact.read) |
|
|
155
|
+
| `nworks_contact_create` | Create contact | User OAuth (contact) |
|
|
156
|
+
| `nworks_contact_update` | Update contact | User OAuth (contact) |
|
|
157
|
+
| `nworks_contact_delete` | Delete contact | User OAuth (contact) |
|
|
158
|
+
| `nworks_contact_list_tags` | List contact tags | User OAuth (contact.read) |
|
|
159
|
+
|
|
160
|
+
### AI Agent Usage Example
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
User: Schedule a meeting tomorrow at 2pm and notify the team channel
|
|
164
|
+
|
|
165
|
+
Claude β nworks_calendar_create
|
|
166
|
+
{ "summary": "Meeting", "start": "2026-03-15T14:00:00", "end": "2026-03-15T15:00:00" }
|
|
167
|
+
β Event created
|
|
168
|
+
|
|
169
|
+
Claude β nworks_message_send
|
|
170
|
+
{ "channel": "C001", "text": "Meeting scheduled tomorrow at 14:00" }
|
|
171
|
+
β Message sent
|
|
172
|
+
|
|
173
|
+
User: Check my unread emails and summarize them
|
|
174
|
+
|
|
175
|
+
Claude β nworks_mail_list (unread)
|
|
176
|
+
β 3 unread emails
|
|
177
|
+
Claude β nworks_mail_read (each)
|
|
178
|
+
β "3 unread: 1) Deploy approval from CTO, 2) Meeting invite for Friday, 3) Weekly report reminder"
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## CLI Usage
|
|
184
|
+
|
|
185
|
+
> All commands support `--json` for pipe/script/agent parsing. `message send`, `mail send`, and `drive upload` support `--dry-run` for testing without sending.
|
|
186
|
+
|
|
187
|
+
### Messages (Bot API)
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Send text to user
|
|
191
|
+
nworks message send --to <userId> --text "Hello"
|
|
192
|
+
|
|
193
|
+
# Send text to channel
|
|
194
|
+
nworks message send --channel <channelId> --text "Announcement"
|
|
195
|
+
|
|
196
|
+
# Button message
|
|
197
|
+
nworks message send --to <userId> --type button --text "PR review request" \
|
|
198
|
+
--actions '[{"type":"message","label":"Approve","postback":"approve"}]'
|
|
199
|
+
|
|
200
|
+
# List message
|
|
201
|
+
nworks message send --to <userId> --type list --text "Today's tasks" \
|
|
202
|
+
--elements '[{"title":"Code review","subtitle":"PR #382"}]'
|
|
203
|
+
|
|
204
|
+
# List channel members
|
|
205
|
+
nworks message members --channel <channelId>
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Directory
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
nworks directory members # List organization members
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Calendar (User OAuth)
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# List today's events
|
|
218
|
+
nworks calendar list
|
|
219
|
+
|
|
220
|
+
# Specify date range
|
|
221
|
+
nworks calendar list --from "2026-03-14T00:00:00+09:00" --until "2026-03-14T23:59:59+09:00"
|
|
222
|
+
|
|
223
|
+
# Create event
|
|
224
|
+
nworks calendar create --title "Meeting" --start "2026-03-14T14:00+09:00" --end "2026-03-14T15:00+09:00"
|
|
225
|
+
|
|
226
|
+
# With location/description
|
|
227
|
+
nworks calendar create --title "Lunch" --start "2026-03-14T12:00+09:00" --end "2026-03-14T13:00+09:00" \
|
|
228
|
+
--location "Conference Room" --description "Quarterly review"
|
|
229
|
+
|
|
230
|
+
# With attendees + notification
|
|
231
|
+
nworks calendar create --title "Team meeting" --start "2026-03-14T10:00+09:00" --end "2026-03-14T11:00+09:00" \
|
|
232
|
+
--attendees "user1@example.com,user2@example.com" --notify
|
|
233
|
+
|
|
234
|
+
# Update event
|
|
235
|
+
nworks calendar update --id <eventId> --title "Updated title"
|
|
236
|
+
|
|
237
|
+
# Delete event
|
|
238
|
+
nworks calendar delete --id <eventId>
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Drive (User OAuth)
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
# List files/folders
|
|
245
|
+
nworks drive list
|
|
246
|
+
|
|
247
|
+
# Upload file
|
|
248
|
+
nworks drive upload --file ./report.pdf
|
|
249
|
+
|
|
250
|
+
# Upload to specific folder
|
|
251
|
+
nworks drive upload --file ./report.pdf --folder <folderId>
|
|
252
|
+
|
|
253
|
+
# Download file
|
|
254
|
+
nworks drive download --file-id <fileId>
|
|
255
|
+
|
|
256
|
+
# Specify output path/name
|
|
257
|
+
nworks drive download --file-id <fileId> --out ./downloads --name report.pdf
|
|
258
|
+
|
|
259
|
+
# List shared drives
|
|
260
|
+
nworks drive sharedrive-list
|
|
261
|
+
|
|
262
|
+
# List files in a shared drive (root)
|
|
263
|
+
nworks drive sharedrive-files --sharedrive <sharedriveId>
|
|
264
|
+
|
|
265
|
+
# List files in a shared drive folder
|
|
266
|
+
nworks drive sharedrive-files --sharedrive <sharedriveId> --folder <fileId>
|
|
267
|
+
|
|
268
|
+
# Download a shared drive file
|
|
269
|
+
nworks drive sharedrive-download --sharedrive <sharedriveId> --file-id <fileId>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Mail (User OAuth)
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
# Send mail
|
|
276
|
+
nworks mail send --to "user@example.com" --subject "Subject" --body "Body"
|
|
277
|
+
|
|
278
|
+
# With CC/BCC
|
|
279
|
+
nworks mail send --to "user@example.com" --cc "cc@example.com" --subject "Subject" --body "Body"
|
|
280
|
+
|
|
281
|
+
# List inbox
|
|
282
|
+
nworks mail list
|
|
283
|
+
|
|
284
|
+
# Unread only
|
|
285
|
+
nworks mail list --unread
|
|
286
|
+
|
|
287
|
+
# Read mail detail
|
|
288
|
+
nworks mail read --id <mailId>
|
|
289
|
+
|
|
290
|
+
# Download a mail attachment
|
|
291
|
+
nworks mail download-attachment --id <mailId> --attachment-id <attachmentId>
|
|
292
|
+
|
|
293
|
+
# Specify output path/name
|
|
294
|
+
nworks mail download-attachment --id <mailId> --attachment-id <attachmentId> --out ./downloads --name invoice.pdf
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Tasks (User OAuth)
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# List tasks
|
|
301
|
+
nworks task list
|
|
302
|
+
|
|
303
|
+
# Incomplete only
|
|
304
|
+
nworks task list --status TODO
|
|
305
|
+
|
|
306
|
+
# Create task
|
|
307
|
+
nworks task create --title "Code review" --body "Review PR #382"
|
|
308
|
+
|
|
309
|
+
# With due date
|
|
310
|
+
nworks task create --title "Deploy" --due 2026-03-20
|
|
311
|
+
|
|
312
|
+
# Mark as done
|
|
313
|
+
nworks task update --id <taskId> --status done
|
|
314
|
+
|
|
315
|
+
# Delete task
|
|
316
|
+
nworks task delete --id <taskId>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Boards (User OAuth)
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# List boards
|
|
323
|
+
nworks board list
|
|
324
|
+
|
|
325
|
+
# List posts
|
|
326
|
+
nworks board posts --board <boardId>
|
|
327
|
+
|
|
328
|
+
# Read post detail
|
|
329
|
+
nworks board read --board <boardId> --post <postId>
|
|
330
|
+
|
|
331
|
+
# Create post
|
|
332
|
+
nworks board create --board <boardId> --title "Announcement" --body "Content"
|
|
333
|
+
|
|
334
|
+
# With notification + disable comments
|
|
335
|
+
nworks board create --board <boardId> --title "Notice" --body "Content" --notify --no-comment
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Contacts (User OAuth)
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
# List contacts
|
|
342
|
+
nworks contact list
|
|
343
|
+
|
|
344
|
+
# Filter by tag
|
|
345
|
+
nworks contact list --tag <contactTagId>
|
|
346
|
+
|
|
347
|
+
# Get contact detail
|
|
348
|
+
nworks contact get --id <contactId>
|
|
349
|
+
|
|
350
|
+
# Create contact
|
|
351
|
+
nworks contact create --payload '{"contactName":{"lastName":"Kim","firstName":"Chulsoo"},"emails":[{"email":"chulsoo@example.com","primary":true}],"permission":{"accessibleRange":"MEMBER","isCoEditing":false,"accessibleMembers":[{"id":"<yourUserId>","type":"USER"}]}}'
|
|
352
|
+
|
|
353
|
+
# Update contact
|
|
354
|
+
nworks contact update --id <contactId> --payload '{"telephones":[{"type":"CELLPHONE","telephone":"010-1234-5678","primary":true}]}'
|
|
355
|
+
|
|
356
|
+
# Delete contact
|
|
357
|
+
nworks contact delete --id <contactId>
|
|
358
|
+
|
|
359
|
+
# List contact tags
|
|
360
|
+
nworks contact list-tags
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
> `contact create` requires `contactName` and `permission`; `permission.accessibleMembers` must list at least one member (usually yourself). Get your own user ID from `nworks whoami`.
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
### CI/CD Deploy Notification
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
# Notify team channel after deployment in GitHub Actions
|
|
370
|
+
nworks message send --channel $CHANNEL_ID --text "v${VERSION} deployed"
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
### Team Automation Script
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
# Send daily standup reminder to all members
|
|
377
|
+
for userId in $(nworks directory members --json | jq -r '.users[].userId'); do
|
|
378
|
+
nworks message send --to "$userId" --text "Standup at 10:00 today"
|
|
379
|
+
done
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## OAuth Scopes
|
|
385
|
+
|
|
386
|
+
Add the required scopes in the [LINE WORKS Developer Console](https://dev.worksmobile.com/en/).
|
|
387
|
+
|
|
388
|
+
| Scope | Purpose | Auth | Required For |
|
|
389
|
+
|-------|---------|------|-------------|
|
|
390
|
+
| `bot` | Bot messaging | Service Account | `message send` |
|
|
391
|
+
| `bot.read` | Bot channel/member read | Service Account | `message members` |
|
|
392
|
+
| `calendar` | Calendar write | User OAuth | `calendar create/update/delete` (requires calendar.read) |
|
|
393
|
+
| `calendar.read` | Calendar read | User OAuth | `calendar list`, also needed for calendar write |
|
|
394
|
+
| `file` | Drive read/write | User OAuth | `drive list/upload/download` |
|
|
395
|
+
| `file.read` | Drive read-only | User OAuth | `drive list/download` |
|
|
396
|
+
| `mail` | Mail read/write | User OAuth | `mail send/list/read` |
|
|
397
|
+
| `mail.read` | Mail read-only | User OAuth | `mail list/read` |
|
|
398
|
+
| `task` | Tasks read/write | User OAuth | `task create/update/delete` (requires user.read) |
|
|
399
|
+
| `task.read` | Tasks read-only | User OAuth | `task list` |
|
|
400
|
+
| `user.read` | User info read | Service Account / User OAuth | `directory members`, also needed for task write |
|
|
401
|
+
| `board` | Boards read/write | User OAuth | `board list/posts/read/create` |
|
|
402
|
+
| `board.read` | Boards read-only | User OAuth | `board list/posts/read` |
|
|
403
|
+
| `contact` | Contacts read/write | User OAuth | `contact create/update/delete` (requires contact.read) |
|
|
404
|
+
| `contact.read` | Contacts read-only | User OAuth | `contact list/get/list-tags` |
|
|
405
|
+
|
|
406
|
+
> **Presets** are simpler than listing scopes:
|
|
407
|
+
> ```bash
|
|
408
|
+
> nworks login --user --preset all # default: full functionality in one login
|
|
409
|
+
> nworks login --user --preset readonly # read-only scopes
|
|
410
|
+
> ```
|
|
411
|
+
> `default` is an alias of `all`. Message sending uses the Service Account (bot), so it works regardless of preset.
|
|
412
|
+
> Re-login never narrows access β newly requested scopes are merged with the existing token, so switching presets only adds capability. For a hand-picked set use `--scope "calendar calendar.read"`.
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## Environment Variables
|
|
417
|
+
|
|
418
|
+
Set environment variables to use nworks without `nworks login` (useful for CI/agents).
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
# Required
|
|
422
|
+
NWORKS_CLIENT_ID=
|
|
423
|
+
NWORKS_CLIENT_SECRET=
|
|
424
|
+
|
|
425
|
+
# Bot messaging only (not needed for User OAuth)
|
|
426
|
+
NWORKS_SERVICE_ACCOUNT=
|
|
427
|
+
NWORKS_PRIVATE_KEY_PATH=
|
|
428
|
+
NWORKS_BOT_ID=
|
|
429
|
+
|
|
430
|
+
# Optional
|
|
431
|
+
NWORKS_DOMAIN_ID=
|
|
432
|
+
NWORKS_SCOPE= # default: bot bot.read user.read
|
|
433
|
+
NWORKS_VERBOSE=1 # debug logging
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### MCP Server with Environment Variables
|
|
437
|
+
|
|
438
|
+
Sensitive values (Client Secret, Private Key path) must be set via MCP config `env` field. Non-sensitive values like Client ID can be configured by the AI agent through the `nworks_setup` tool.
|
|
439
|
+
|
|
440
|
+
```json
|
|
441
|
+
{
|
|
442
|
+
"mcpServers": {
|
|
443
|
+
"nworks": {
|
|
444
|
+
"command": "npx",
|
|
445
|
+
"args": ["-y", "nworks", "mcp"],
|
|
446
|
+
"env": {
|
|
447
|
+
"NWORKS_CLIENT_SECRET": "<Client Secret>",
|
|
448
|
+
"NWORKS_PRIVATE_KEY_PATH": "<Private Key file absolute path (for Service Account)>"
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
## License
|
|
458
|
+
|
|
459
|
+
Apache-2.0
|