#!/usr/bin/env node
import { StdioServerTransport as s } from "@modelcontextprotocol/sdk/server/stdio.js";
import c from "dotenv";
import { g as i } from "./mcp-server-BxuJ84xm.js";
function p() {
  const o = process.env.TODOIST_BASE_URL, r = process.env.TODOIST_API_KEY;
  if (!r)
    throw new Error("TODOIST_API_KEY is not set");
  const e = i({ todoistApiKey: r, baseUrl: o }), t = new s();
  e.connect(t).then(() => {
    console.error("Server started");
  }).catch((n) => {
    console.error("Error starting the Todoist MCP server:", n), process.exit(1);
  });
}
c.config();
p();
