dingtalk-wiki 1.1.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.
@@ -0,0 +1,32 @@
1
+ # mcporter Example
2
+
3
+ ## Direct stdio mode
4
+
5
+ Use the server directly over stdio. In this mode, call the tool names directly:
6
+
7
+ ```bash
8
+ mcporter call --stdio "node /absolute/path/to/dingtalk-wiki-mcp/index.js" show_config
9
+ mcporter call --stdio "node /absolute/path/to/dingtalk-wiki-mcp/index.js" list_wiki_workspaces
10
+ mcporter call --stdio "node /absolute/path/to/dingtalk-wiki-mcp/index.js" create_wiki_doc workspace_id="your_workspace_id" name="Weekly Summary"
11
+ ```
12
+
13
+ ## Registered server mode
14
+
15
+ If you registered the server under the name `dingtalk-wiki`, then use namespaced calls:
16
+
17
+ ```bash
18
+ mcporter call dingtalk-wiki.show_config
19
+ mcporter call dingtalk-wiki.list_wiki_workspaces
20
+ mcporter call dingtalk-wiki.create_wiki_doc workspace_id="your_workspace_id" name="Weekly Summary"
21
+ ```
22
+
23
+ ## Environment setup
24
+
25
+ You can either export variables before calling:
26
+
27
+ ```bash
28
+ export DINGTALK_APP_KEY=your-app-key
29
+ export DINGTALK_APP_SECRET=your-app-secret
30
+ ```
31
+
32
+ Or keep them in a local `.env` file next to the repository, which `index.js` now auto-loads.
@@ -0,0 +1,31 @@
1
+ # OpenClaw Example
2
+
3
+ This repository includes a `SKILL.md`, so it can be used as a reusable skill package in OpenClaw-style agent workflows.
4
+
5
+ ## Option 1: use as a skill package
6
+
7
+ 1. Place the repository in a skill-accessible directory.
8
+ 2. Install dependencies:
9
+
10
+ ```bash
11
+ npm install
12
+ ```
13
+
14
+ 3. Provide environment variables:
15
+
16
+ ```bash
17
+ export DINGTALK_APP_KEY=your-app-key
18
+ export DINGTALK_APP_SECRET=your-app-secret
19
+ ```
20
+
21
+ 4. Let your OpenClaw agent discover and use the skill.
22
+
23
+ ## Option 2: use as a local MCP server
24
+
25
+ If your OpenClaw setup supports stdio MCP backends, point it to:
26
+
27
+ ```bash
28
+ node /absolute/path/to/dingtalk-wiki-mcp/index.js
29
+ ```
30
+
31
+ The exact wiring may vary by your OpenClaw setup and version, but the server itself is stdio-compatible and packaged for reuse.
@@ -0,0 +1,108 @@
1
+ # DingTalk Wiki MCP Server 参考文档
2
+
3
+ 钉钉知识库 MCP Server,支持通过 MCP 协议读写钉钉 Wiki / Docs 内容。
4
+
5
+ ## 功能特性
6
+
7
+ ### 知识库管理
8
+ - `list_wiki_workspaces` - 列出知识库工作空间列表
9
+ - `get_wiki_workspace` - 获取知识库详情
10
+ - `list_wiki_nodes` - 列出知识库节点(文档 / 目录)
11
+ - `get_wiki_node` - 获取节点详情
12
+ - `create_wiki_doc` - 创建文档(支持 `DOC` / `WORKBOOK` / `MIND` / `FOLDER`)
13
+ - `search_wiki` - 搜索知识库内容
14
+ - `list_notable_sheets` - 获取 `.able` / AI 表格中的所有数据表
15
+ - `list_notable_records` - 获取指定数据表中的 records
16
+
17
+ ### 组织架构
18
+ - `list_departments` - 列出部门列表
19
+ - `get_department_users` - 获取部门成员
20
+ - `get_user_info` - 获取用户详情(包含 `unionid`)
21
+
22
+ ### 配置管理
23
+ - `set_operator` - 设置操作者 `unionid`
24
+ - `show_config` - 显示当前配置信息
25
+
26
+ ---
27
+
28
+ ## 环境变量
29
+
30
+ ```bash
31
+ cp .env.example .env
32
+ ```
33
+
34
+ 填写:
35
+
36
+ ```env
37
+ DINGTALK_APP_KEY=your-app-key
38
+ DINGTALK_APP_SECRET=your-app-secret
39
+ ```
40
+
41
+ 可选:
42
+
43
+ ```env
44
+ DINGTALK_WIKI_CONFIG_PATH=/absolute/path/to/config.json
45
+ ```
46
+
47
+ 如果不设置 `DINGTALK_WIKI_CONFIG_PATH`,程序默认读取当前目录下的 `config.json`。
48
+
49
+ ---
50
+
51
+ ## 配置文件
52
+
53
+ 先复制示例配置:
54
+
55
+ ```bash
56
+ cp config.example.json config.json
57
+ ```
58
+
59
+ 然后填入你自己的:
60
+ - 默认用户
61
+ - userId / unionId
62
+ - 常用 workspace 信息
63
+
64
+ ---
65
+
66
+ ## 配置文件格式
67
+
68
+ ```json
69
+ {
70
+ "defaultUser": "your-default-user",
71
+ "users": {
72
+ "your-default-user": {
73
+ "name": "Your Name",
74
+ "userId": "your-user-id"
75
+ }
76
+ },
77
+ "workspaces": {
78
+ "Your Workspace": {
79
+ "id": "your_workspace_id",
80
+ "url": "https://alidocs.dingtalk.com/i/spaces/your-space-id/overview",
81
+ "type": "TEAM"
82
+ }
83
+ },
84
+ }
85
+ ```
86
+
87
+ ---
88
+
89
+ ## API 端点
90
+
91
+ - Wiki API v2.0: `https://api.dingtalk.com/v2.0/wiki`
92
+ - 创建文档: `POST /v1.0/doc/workspaces/{workspaceId}/docs`
93
+
94
+ ---
95
+
96
+ ## 注意事项
97
+
98
+ 1. `operator_id` 使用 DingTalk `unionId`
99
+ 2. 不传 `operator_id` 时,默认使用配置文件中的默认用户
100
+ 3. 只能访问当前账号有权限的知识库
101
+ 4. `config.json` 不建议提交到 Git 仓库
102
+
103
+ ---
104
+
105
+ ## 相关链接
106
+
107
+ - [钉钉开放平台 - 知识库概述](https://open.dingtalk.com/document/development/knowledge-base-overview)
108
+ - [Create Team Space Document](https://open.dingtalk.com/document/development/create-team-space-document)