Skip to main content
Glama

SwiftOpenAI MCP Server

prepare-dist.js1.17 kB
#!/usr/bin/env node const fs = require('fs'); const path = require('path'); const { execSync } = require('child_process'); const distDir = path.join(__dirname, '..', 'dist'); const buildDir = path.join(__dirname, '..', '.build', 'release'); const binaryName = 'swiftopenai-mcp'; // Create dist directory if (!fs.existsSync(distDir)) { fs.mkdirSync(distDir, { recursive: true }); } // Detect platform const platform = process.platform; const arch = process.arch === 'x64' ? 'x64' : 'arm64'; const targetDir = path.join(distDir, `${platform}-${arch}`); if (!fs.existsSync(targetDir)) { fs.mkdirSync(targetDir, { recursive: true }); } // Copy binary from build directory const sourceBinary = path.join(buildDir, binaryName); const targetBinary = path.join(targetDir, binaryName); if (fs.existsSync(sourceBinary)) { console.log(`Copying binary from ${sourceBinary} to ${targetBinary}`); fs.copyFileSync(sourceBinary, targetBinary); fs.chmodSync(targetBinary, 0o755); console.log('Distribution prepared successfully!'); } else { console.error(`Binary not found at ${sourceBinary}`); console.error('Please run "npm run build" first'); process.exit(1); }

Latest Blog Posts

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/jamesrochabrun/SwiftOpenAIMCP'

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