import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { server } from "./projectMcpServer.js";

async function runMcpServer() {
  console.error("Starting Self-Driving Jira MCP Server...");
  
  // Set up the transport layer
  const transport = new StdioServerTransport();
  
  // Connect the exported server to the transport
  await server.connect(transport);
  
  console.error("Self-Driving Jira MCP Server is running and listening on stdio.");
}

runMcpServer().catch((error) => {
  console.error("Failed to start server:", error);
  process.exit(1);
});
