feat: add data dir option
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user