@@ -19,6 +19,9 @@ export interface UserConfig {
19
19
apiClientSecret ?: string ;
20
20
telemetry : "enabled" | "disabled" ;
21
21
logPath : string ;
22
+ exportsPath : string ;
23
+ exportTimeoutMs : number ;
24
+ exportCleanupIntervalMs : number ;
22
25
connectionString ?: string ;
23
26
connectOptions : ConnectOptions ;
24
27
disabledTools : Array < string > ;
@@ -35,6 +38,9 @@ export interface UserConfig {
35
38
const defaults : UserConfig = {
36
39
apiBaseUrl : "https://cloud.mongodb.com/" ,
37
40
logPath : getLogPath ( ) ,
41
+ exportsPath : getExportsPath ( ) ,
42
+ exportTimeoutMs : 300000 , // 5 minutes
43
+ exportCleanupIntervalMs : 120000 , // 2 minutes
38
44
connectOptions : {
39
45
readConcern : "local" ,
40
46
readPreference : "secondaryPreferred" ,
@@ -59,17 +65,21 @@ export const config = {
59
65
...getCliConfig ( ) ,
60
66
} ;
61
67
62
- function getLogPath ( ) : string {
63
- const localDataPath =
64
- process . platform === "win32"
65
- ? path . join ( process . env . LOCALAPPDATA || process . env . APPDATA || os . homedir ( ) , "mongodb" )
66
- : path . join ( os . homedir ( ) , ".mongodb" ) ;
67
-
68
- const logPath = path . join ( localDataPath , "mongodb-mcp" , ".app-logs" ) ;
68
+ function getLocalDataPath ( ) : string {
69
+ return process . platform === "win32"
70
+ ? path . join ( process . env . LOCALAPPDATA || process . env . APPDATA || os . homedir ( ) , "mongodb" )
71
+ : path . join ( os . homedir ( ) , ".mongodb" ) ;
72
+ }
69
73
74
+ function getLogPath ( ) : string {
75
+ const logPath = path . join ( getLocalDataPath ( ) , "mongodb-mcp" , ".app-logs" ) ;
70
76
return logPath ;
71
77
}
72
78
79
+ function getExportsPath ( ) : string {
80
+ return path . join ( getLocalDataPath ( ) , "mongodb-mcp" , "exports" ) ;
81
+ }
82
+
73
83
// Gets the config supplied by the user as environment variables. The variable names
74
84
// are prefixed with `MDB_MCP_` and the keys match the UserConfig keys, but are converted
75
85
// to SNAKE_UPPER_CASE.
0 commit comments