MCPcopy Create free account
hub / github.com/chokcoco/iCSS / checkServerExecutability

Function checkServerExecutability

MCP/diagnose-mcp.js:50–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49// 检查服务器可执行性
50function checkServerExecutability() {
51 console.log('\n2️⃣ Checking Server Executability:\n');
52
53 const serverPath = path.resolve('./server.js');
54 console.log(` Server path: ${serverPath}`);
55
56 if (!fs.existsSync(serverPath)) {
57 console.log(' ❌ server.js not found');
58 return false;
59 }
60
61 console.log(' ✅ server.js exists');
62
63 // 检查权限
64 try {
65 fs.accessSync(serverPath, fs.constants.R_OK);
66 console.log(' ✅ server.js is readable');
67 } catch (err) {
68 console.log(' ❌ server.js is not readable');
69 return false;
70 }
71
72 return true;
73}
74
75// 手动测试 MCP 协议
76function testMCPProtocol() {

Callers 1

runDiagnosisFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected