Skip to main content
Glama

Draw Things MCP

by jaokuohsuan
build.mjs1.23 kB
#!/usr/bin/env node import { execSync } from 'child_process'; import fs from 'fs'; import path from 'path'; // create temporary directory const tempDir = 'dist-temp'; if (!fs.existsSync(tempDir)) { fs.mkdirSync(tempDir); } try { // first step: use SWC to translate TypeScript to JavaScript (keep the original build command logic) console.log('step 1: use SWC to translate TypeScript to JavaScript...'); execSync(`rimraf ${tempDir} && swc src -d ${tempDir} --strip-leading-paths`, { stdio: 'inherit' }); // second step: use Rollup to package as a single file console.log('step 2: use Rollup to package as a single file...'); execSync('rimraf dist && rollup -c', { stdio: 'inherit' }); // third step: ensure dist/index.js has execution permission (because it is a bin file) console.log('step 3: set execution permission...'); fs.chmodSync('dist/index.js', '755'); // fourth step: clean temporary directory console.log('step 4: clean temporary directory...'); execSync(`rimraf ${tempDir}`, { stdio: 'inherit' }); console.log('build completed! output: dist/index.js'); } catch (error) { console.error('error occurred during the build process:', error); process.exit(1); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jaokuohsuan/draw-things-mcp-cursor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server