imo-publications-mcp-server
Version:
MCP server for IMO (International Maritime Organization) publications - Node.js TypeScript version
38 lines (31 loc) • 1.15 kB
JavaScript
import { chmod } from 'fs/promises';
import { join } from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import { existsSync } from 'fs';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
async function makeExecutable() {
try {
const files = [
join(__dirname, 'bin', 'cli.js'),
join(__dirname, 'npx-test.js')
];
for (const filePath of files) {
if (existsSync(filePath)) {
await chmod(filePath, '755');
console.log(`✅ IMO Publications MCP Server: Made ${filePath} executable`);
} else {
console.warn(`⚠️ Warning: File not found: ${filePath}`);
}
}
console.log('✅ IMO Publications MCP Server: Installation completed successfully');
console.log('📖 Usage: npx imo-publications-mcp-server --help');
console.log('🧪 Test: npm run test-npx');
} catch (error) {
console.warn('⚠️ Warning: Could not make scripts executable:', error.message);
console.log('💡 You may need to run: chmod +x bin/cli.js npx-test.js');
}
}
makeExecutable();