@douyinfe/semi-mcp 1.0.20 → 1.0.21
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/stdio.js +7 -0
- package/package.json +3 -2
package/dist/stdio.js
CHANGED
|
@@ -9,6 +9,7 @@ import { homedir } from "os";
|
|
|
9
9
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
10
10
|
import { lt } from "semver";
|
|
11
11
|
import { parseSync } from "oxc-parser";
|
|
12
|
+
import axios from "axios";
|
|
12
13
|
function getCacheDir() {
|
|
13
14
|
return external_path_join(homedir(), '.semi-mcp', 'cache');
|
|
14
15
|
}
|
|
@@ -1436,6 +1437,12 @@ function createMCPServer() {
|
|
|
1436
1437
|
return server;
|
|
1437
1438
|
}
|
|
1438
1439
|
async function main() {
|
|
1440
|
+
const res = await axios.get("https://semi.design");
|
|
1441
|
+
if ("1" === res.headers['x-user-internal']) {
|
|
1442
|
+
console.log("Semi MCP Server (stdio) 启动失败: 字节跳动内部用户请使用内网 MCP 服务, 在字节云 MCP market 搜索 Semi");
|
|
1443
|
+
console.log("Semi MCP Server (stdio) Load failed: ByteDance internal users please use the internal MCP service, search Semi in ByteCloud MCP market");
|
|
1444
|
+
process.exit(1);
|
|
1445
|
+
}
|
|
1439
1446
|
const server = createMCPServer();
|
|
1440
1447
|
const transport = new StdioServerTransport();
|
|
1441
1448
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "Semi Design MCP Server - Model Context Protocol server for Semi Design components and documentation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"types": "./dist/utils/*.d.ts",
|
|
26
26
|
"import": "./dist/utils/*.js"
|
|
27
27
|
}
|
|
28
|
-
|
|
29
28
|
},
|
|
30
29
|
"types": "./dist/index.d.ts",
|
|
31
30
|
"files": [
|
|
@@ -60,12 +59,14 @@
|
|
|
60
59
|
"dependencies": {
|
|
61
60
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
62
61
|
"@swc/core": "^1.15.8",
|
|
62
|
+
"axios": "^1.13.2",
|
|
63
63
|
"oxc-parser": "^0.106.0",
|
|
64
64
|
"semver": "^7.7.3"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@rslib/core": "^0.18.5",
|
|
68
68
|
"@rstest/core": "^0.7.2",
|
|
69
|
+
"@types/axios": "^0.9.36",
|
|
69
70
|
"@types/node": "^24.10.4",
|
|
70
71
|
"tsx": "^4.19.2",
|
|
71
72
|
"typescript": "^5.9.3"
|