inboxassure-mcp-server
Version:
Comprehensive MCP server for InboxAssure email marketing platform with full API coverage including campaigns, replies, and email account management.
39 lines (35 loc) • 1.21 kB
JavaScript
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import { startMcpBridge } from './index.js';
// Parse command line arguments
const argv = yargs(hideBin(process.argv))
.option('api-key', {
type: 'string',
description: 'API key for the Bison service',
demandOption: true,
coerce: (key) => {
// Simple validation that API key matches expected format (e.g., starts with 'iak_')
if (!key || !key.startsWith('iak_') || key.length < 10) {
throw new Error('Invalid API key format. Expected format: iak_*****');
}
return key;
}
})
.option('stdio', {
type: 'boolean',
description: 'Use stdio for communication',
default: true
})
.fail((msg, err) => {
console.error(`[MCPX] Error: ${msg || err.message}`);
console.error('[MCPX] Run with --help for usage information');
process.exit(1);
})
.help()
.argv;
// Log startup information
console.error(`[MCPX] Starting inboxassure-mcp-server v3.0.0 with API bridge...`);
console.error(`[MCPX] Using API key: ${argv['api-key'].substring(0, 8)}...`);
// Start the MCP bridge
startMcpBridge(argv['api-key']);