File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 2525 "types" : " ./dist/utils/*.d.ts" ,
2626 "import" : " ./dist/utils/*.js"
2727 }
28-
2928 },
3029 "types" : " ./dist/index.d.ts" ,
3130 "files" : [
6059 "dependencies" : {
6160 "@modelcontextprotocol/sdk" : " ^1.25.1" ,
6261 "@swc/core" : " ^1.15.8" ,
62+ "axios" : " ^1.13.2" ,
6363 "oxc-parser" : " ^0.106.0" ,
6464 "semver" : " ^7.7.3"
6565 },
6666 "devDependencies" : {
6767 "@rslib/core" : " ^0.18.5" ,
6868 "@rstest/core" : " ^0.7.2" ,
69+ "@types/axios" : " ^0.9.36" ,
6970 "@types/node" : " ^24.10.4" ,
7071 "tsx" : " ^4.19.2" ,
7172 "typescript" : " ^5.9.3"
Original file line number Diff line number Diff line change 99
1010import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js' ;
1111import { createMCPServer } from './server.js' ;
12+ import axios from 'axios' ;
1213
1314async function main ( ) {
15+
16+ const res = await axios . get ( "https://semi.design" ) ;
17+ if ( res . headers [ 'x-user-internal' ] === "1" ) {
18+ console . log ( "Semi MCP Server (stdio) 启动失败: 字节跳动内部用户请使用内网 MCP 服务, 在字节云 MCP market 搜索 Semi" ) ;
19+ console . log ( "Semi MCP Server (stdio) Load failed: ByteDance internal users please use the internal MCP service, search Semi in ByteCloud MCP market" ) ;
20+ process . exit ( 1 ) ;
21+ }
22+
1423 // 创建 MCP 服务器实例
1524 const server = createMCPServer ( ) ;
1625
You can’t perform that action at this time.
0 commit comments