| 12345678910111213141516171819202122 |
- #!/usr/bin/env node
- // Simple MCP server that bypasses commander for stdio mode
- // This avoids any stdin parsing conflicts with MCP protocol
- import { startMcpServer } from './server.js';
- // Handle command line arguments manually for simplicity
- const args = process.argv.slice(2);
- // Check if transport is specified and is stdio
- if (args.includes('--transport') && args.includes('stdio')) {
- // Start MCP server directly
- startMcpServer().catch((error) => {
- console.error('Server error:', error);
- process.exit(1);
- });
- } else {
- console.error('Error: --transport stdio is required');
- console.error('Usage: docs-rag-mcp --transport stdio');
- process.exit(1);
- }
|