Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 974fa36

Browse files
himanshusinghskmruiz
andauthored
feat: adds an export tool and exported-data resource MCP-16 (#424)
Co-authored-by: Kevin Mas Ruiz <kevin.mas@hey.com>
1 parent 7572ec5 commit 974fa36

File tree

23 files changed

+2012
-66
lines changed

23 files changed

+2012
-66
lines changed

‎scripts/accuracy/generateTestSummary.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ function generateMarkdownBrief(
230230
markdownTexts.push(
231231
...[
232232
"## 📊 Baseline Comparison",
233+
"| Metric | Value |",
233234
"|--------|-------|",
234235
`| **Baseline Commit** | \`${baselineInfo.commitSHA}\` |`,
235236
`| **Baseline Run ID** | \`${baselineInfo.accuracyRunId}\` |`,

‎src/common/config.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export interface UserConfig {
1919
apiClientSecret?: string;
2020
telemetry: "enabled" | "disabled";
2121
logPath: string;
22+
exportsPath: string;
23+
exportTimeoutMs: number;
24+
exportCleanupIntervalMs: number;
2225
connectionString?: string;
2326
connectOptions: ConnectOptions;
2427
disabledTools: Array<string>;
@@ -35,6 +38,9 @@ export interface UserConfig {
3538
const defaults: UserConfig = {
3639
apiBaseUrl: "https://cloud.mongodb.com/",
3740
logPath: getLogPath(),
41+
exportsPath: getExportsPath(),
42+
exportTimeoutMs: 300000, // 5 minutes
43+
exportCleanupIntervalMs: 120000, // 2 minutes
3844
connectOptions: {
3945
readConcern: "local",
4046
readPreference: "secondaryPreferred",
@@ -59,17 +65,21 @@ export const config = {
5965
...getCliConfig(),
6066
};
6167

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+
}
6973

74+
function getLogPath(): string {
75+
const logPath = path.join(getLocalDataPath(), "mongodb-mcp", ".app-logs");
7076
return logPath;
7177
}
7278

79+
function getExportsPath(): string {
80+
return path.join(getLocalDataPath(), "mongodb-mcp", "exports");
81+
}
82+
7383
// Gets the config supplied by the user as environment variables. The variable names
7484
// are prefixed with `MDB_MCP_` and the keys match the UserConfig keys, but are converted
7585
// to SNAKE_UPPER_CASE.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /