| 44 | }; |
| 45 | |
| 46 | async function main() { |
| 47 | // Create logger instance |
| 48 | const logger = new ConsoleLogger(); |
| 49 | |
| 50 | // Initialize the service with proper configuration |
| 51 | const specService = new FileSystemSpecService( |
| 52 | new DefaultSpecScanner(new DefaultSpecProcessor()), |
| 53 | specServiceConfig, |
| 54 | logger |
| 55 | ); |
| 56 | |
| 57 | // Create and configure the MCP service |
| 58 | const server = new McpService(specService).createServer(); |
| 59 | |
| 60 | // Start receiving messages on stdin and sending messages on stdout |
| 61 | const transport = new StdioServerTransport(); |
| 62 | await server.connect(transport); |
| 63 | } |
| 64 | |
| 65 | main().catch((error) => { |
| 66 | console.error("Error:", error); |