@lanonasis/cli
Version:
Professional CLI for LanOnasis Memory as a Service (MaaS) with MCP support, seamless inline editing, and enterprise-grade security
46 lines (45 loc) • 1.3 kB
JavaScript
/**
* Enhanced MCP Server - Simplified working version
*/
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { CLIConfig } from '../utils/config.js';
import { logger } from './logger.js';
export class EnhancedMCPServer {
server;
config;
constructor() {
this.config = new CLIConfig();
this.server = new Server({
name: "lanonasis-maas-server",
version: "1.0.0"
}, {
capabilities: {
tools: {},
resources: {},
prompts: {}
}
});
}
async start() {
try {
await this.config.init();
const transport = new StdioServerTransport();
await this.server.connect(transport);
logger.info('Enhanced MCP Server started successfully');
}
catch (error) {
logger.error('Failed to start Enhanced MCP Server', { error });
throw error;
}
}
}
// Main execution
async function main() {
const server = new EnhancedMCPServer();
await server.start();
}
if (import.meta.url === `file://${process.argv[1]}`) {
main().catch(console.error);
}