claude-gemini-multimodal-bridge
Version:
Enterprise-grade AI integration bridge connecting Claude Code, Gemini CLI, and Google AI Studio with intelligent routing and advanced multimodal processing capabilities
59 lines (58 loc) • 2.21 kB
JavaScript
import { config } from 'dotenv';
import { createRequire } from 'module';
import { CGMBServer } from './core/CGMBServer.js';
import { logger } from './utils/logger.js';
const require = createRequire(import.meta.url);
const packageJson = require('../package.json');
const VERSION = packageJson.version;
async function main() {
try {
config();
logger.info('Starting CGMB MCP Server for Claude Code integration...', {
version: VERSION,
nodeVersion: process.version,
platform: process.platform,
mcpMode: true,
});
const server = new CGMBServer();
await server.start();
logger.info('CGMB MCP Server ready', {
version: VERSION,
mainTool: 'cgmb - handles all CGMB requests',
capabilities: {
'Commands': 'chat, search, analyze, generate, process, extract, translate',
'Files': 'PDF, images, audio, documents (relative/absolute paths)',
'URLs': 'Direct processing without download',
'Generation': 'Images (Imagen 3), Audio (TTS)',
'Routing': 'Automatic optimal AI layer selection'
},
tips: [
'Always use "CGMB" keyword in prompts',
'Relative paths like ./file.pdf are auto-resolved',
'URLs are processed directly by Gemini CLI'
]
});
process.on('SIGINT', async () => {
logger.info('Received SIGINT, shutting down MCP server...');
process.exit(0);
});
process.on('SIGTERM', async () => {
logger.info('Received SIGTERM, shutting down MCP server...');
process.exit(0);
});
}
catch (error) {
logger.error('Failed to start CGMB MCP server', error);
process.exit(1);
}
}
if (import.meta.url === `file://${process.argv[1]}`) {
main().catch((error) => {
console.error('Unhandled error in main:', error);
process.exit(1);
});
}
export { CGMBServer } from './core/CGMBServer.js';
export { LayerManager } from './core/LayerManager.js';
export * from './core/types.js';