feat: add data dir option

This commit is contained in:
2026-07-09 09:57:21 +03:00
parent af3da35179
commit 92942a3bcd
3 changed files with 14 additions and 5 deletions
+5 -1
View File
@@ -4,6 +4,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
import { Command } from "commander";
import crypto from "node:crypto";
import http from "node:http";
import { initDataDir } from "./ews_client.ts";
import { registerAuthTools } from "./tools/auth.ts";
import { registerEmailTools } from "./tools/email.ts";
import { registerFolderTools } from "./tools/folders.ts";
@@ -17,11 +18,14 @@ const program = new Command()
"SHA-256 hash of bearer token for HTTP transport auth",
)
.option("--host <host>", "HTTP host", "127.0.0.1")
.option("--port <port>", "HTTP port", "8000");
.option("--port <port>", "HTTP port", "8000")
.option("--data-dir <path>", "Data directory for config.json", "./data");
program.parse(process.argv);
const options = program.opts();
initDataDir(options.dataDir);
function buildServer(): McpServer {
const server = new McpServer({
name: "exchange-mcp",