dingtalk-mcp 1.0.13 → 1.0.14
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/dist/DingTalkMCPServer.js +1 -1
- package/dist/cli.js +4 -3
- package/package.json +1 -1
|
@@ -386,7 +386,7 @@ export class DingTalkMCPServer {
|
|
|
386
386
|
'Content-Type': 'application/json'
|
|
387
387
|
};
|
|
388
388
|
// 只有对新版API (api.dingtalk.com) 才添加token到header
|
|
389
|
-
if (tool.requestTemplate.url && !tool.requestTemplate.url.includes('oapi.dingtalk.com') &&
|
|
389
|
+
if (tool.requestTemplate.url && !tool.requestTemplate.url.includes('oapi.dingtalk.com') && this.accessToken) {
|
|
390
390
|
headers['x-acs-dingtalk-access-token'] = this.accessToken;
|
|
391
391
|
}
|
|
392
392
|
if (tool.requestTemplate.headers) {
|
package/dist/cli.js
CHANGED
|
@@ -5,9 +5,10 @@ async function main() {
|
|
|
5
5
|
const appId = process.env.DINGTALK_Client_ID;
|
|
6
6
|
const appSecret = process.env.DINGTALK_Client_Secret;
|
|
7
7
|
const accessToken = process.env.DINGTALK_ACCESS_TOKEN;
|
|
8
|
+
process.env.ACTIVE_PROFILES = 'dingtalk-contacts,dingtalk-department'
|
|
8
9
|
// 如果既没有AppKey/Secret也没有AccessToken,显示帮助信息
|
|
9
10
|
if (!accessToken && (!appId || !appSecret)) {
|
|
10
|
-
console.error('🔧 DingTalk
|
|
11
|
+
console.error('🔧 DingTalk MCP Server 配置指南');
|
|
11
12
|
console.error('');
|
|
12
13
|
console.error('📋 需要设置以下环境变量之一:');
|
|
13
14
|
console.error('');
|
|
@@ -27,7 +28,7 @@ async function main() {
|
|
|
27
28
|
console.error(' DINGTALK_Client_Secret=XXXXXXXXXXXXX');
|
|
28
29
|
console.error('');
|
|
29
30
|
console.error('🚀 启动命令:');
|
|
30
|
-
console.error(' npx dingtalk-
|
|
31
|
+
console.error(' npx dingtalk-mcp');
|
|
31
32
|
console.error('');
|
|
32
33
|
process.exit(1);
|
|
33
34
|
}
|
|
@@ -36,7 +37,7 @@ async function main() {
|
|
|
36
37
|
console.error('🎯 DingTalk MCP Server 启动中...');
|
|
37
38
|
console.error('🔗 连接方式:stdio transport');
|
|
38
39
|
await server.run();
|
|
39
|
-
console.error('🎯 DingTalk
|
|
40
|
+
console.error('🎯 DingTalk MCP Server 启动成功.');
|
|
40
41
|
}
|
|
41
42
|
catch (error) {
|
|
42
43
|
console.error('❌ 服务器启动失败:', error);
|