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

Function main

MCP/bin/install.js:161–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159
160// 主安装流程
161async function main() {
162 try {
163 // 更新配置
164 const configFile = updateMcpConfig();
165
166 // 验证安装
167 verifyInstallation();
168
169 // 显示说明
170 showUsageInstructions(configFile);
171
172 } catch (error) {
173 console.error('\n❌ Installation failed:', error.message);
174 console.error('\n🔧 Manual setup instructions:');
175 console.error('1. Create ~/.config/cursor/mcp_settings.json');
176 console.error('2. Add the following configuration:');
177 console.error(JSON.stringify({
178 mcpServers: {
179 icss: {
180 command: "node",
181 args: [path.join(getPackagePath(), 'server.js')],
182 env: {}
183 }
184 }
185 }, null, 2));
186
187 process.exit(1);
188 }
189}
190
191// 如果直接运行此脚本
192if (import.meta.url === `file://${process.argv[1]}`) {

Callers 1

install.jsFile · 0.85

Calls 4

updateMcpConfigFunction · 0.85
verifyInstallationFunction · 0.85
showUsageInstructionsFunction · 0.85
getPackagePathFunction · 0.85

Tested by

no test coverage detected