Skip to content

Commit bf96284

Browse files
committed
merge main into ni/pnpm
2 parents f725fb0 + c507982 commit bf96284

File tree

9 files changed

+125
-131
lines changed

9 files changed

+125
-131
lines changed

.github/workflows/prepare-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
pnpm run generate:arguments
4343
4444
- name: Create release PR
45-
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # 7.0.8
45+
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # 7.0.9
4646
id: create-pr
4747
with:
4848
title: "chore: release ${{ steps.bump-version.outputs.NEW_VERSION }}"

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?logo=data:image/svg%2bxml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgNDggNDgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiPjxwYXRoIGQ9Ik00NC45OTkgMTAuODd2MjYuMjFjMCAxLjAzLS41OSAxLjk3LTEuNTEgMi40Mi0yLjY4IDEuMjktOCAzLjg1LTguMzUgNC4wMS0uMTMuMDctLjM4LjItLjY3LjMxLjM1LS42LjUzLTEuMy41My0yLjAyVjYuMmMwLS43NS0uMi0xLjQ1LS41Ni0yLjA2LjA5LjA0LjE3LjA4LjI0LjExLjIuMSA1Ljk4IDIuODYgOC44IDQuMkM0NC40MDkgOC45IDQ0Ljk5OSA5Ljg0IDQ0Ljk5OSAxMC44N3pNNy40OTkgMjYuMDNjMS42IDEuNDYgMy40MyAzLjEzIDUuMzQgNC44NmwtNC42IDMuNWMtLjc3LjU3LTEuNzguNS0yLjU2LS4wNS0uNS0uMzYtMS44OS0xLjY1LTEuODktMS42NS0xLjAxLS44MS0xLjA2LTIuMzItLjExLTMuMTlDMy42NzkgMjkuNSA1LjE3OSAyOC4xMyA3LjQ5OSAyNi4wM3pNMzEuOTk5IDYuMnYxMC4xMWwtNy42MyA1LjgtNi44NS01LjIxYzQuOTgtNC41MyAxMC4wMS05LjExIDEyLjY1LTExLjUyQzMwLjg2OSA0Ljc0IDMxLjk5OSA1LjI1IDMxLjk5OSA2LjJ6TTMyIDQxLjc5OFYzMS42OUw4LjI0IDEzLjYxYy0uNzctLjU3LTEuNzgtLjUtMi41Ni4wNS0uNS4zNi0xLjg5IDEuNjUtMS44OSAxLjY1LTEuMDEuODEtMS4wNiAyLjMyLS4xMSAzLjE5IDAgMCAyMC4xNDUgMTguMzM4IDI2LjQ4NSAyNC4xMTZDMzAuODcxIDQzLjI2IDMyIDQyLjc1MyAzMiA0MS43OTh6Ii8+PC9zdmc+)](https://insiders.vscode.dev/redirect/mcp/install?name=mongodb&inputs=%5B%7B%22id%22%3A%22connection_string%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22MongoDB%20connection%20string%22%7D%5D&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22mongodb-mcp-server%22%2C%22--readOnly%22%5D%2C%22env%22%3A%7B%22MDB_MCP_CONNECTION_STRING%22%3A%22%24%7Binput%3Aconnection_string%7D%22%7D%7D)
2-
[![Install in Cursor](https://img.shields.io/badge/Cursor-Install_Server-1e1e1e?logo=data:image/svg%2bxml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgc3R5bGU9ImZsZXg6bm9uZTtsaW5lLWhlaWdodDoxIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxZW0iCiAgICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHRpdGxlPkN1cnNvcjwvdGl0bGU+CiAgICA8cGF0aCBkPSJNMTEuOTI1IDI0bDEwLjQyNS02LTEwLjQyNS02TDEuNSAxOGwxMC40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3Vyc29ydW5kZWZpbmVkLWZpbGwtMSIKICAgICAgICAgICAgeDE9IjIyLjM1IiB4Mj0iMTEuOTI1IiB5MT0iNi4wMzciIHkyPSIxMi4xNSI+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iLjE4MiIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMzEiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIuNzE1IiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgaWQ9ImxvYmUtaWNvbnMtY3Vyc29ydW5kZWZpbmVkLWZpbGwtMiIKICAgICAgICAgICAgeDE9IjExLjkyNSIgeDI9IjEuNSIgeTE9IjAiIHkyPSIxOCI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjYiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIuNjY3IiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii4yMiI+PC9zdG9wPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+Cjwvc3ZnPgo=)](https://cursor.com/install-mcp?name=MongoDB&config=eyJjb21tYW5kIjoibnB4IC15IG1vbmdvZGItbWNwLXNlcnZlciAtLXJlYWRPbmx5In0%3D)
2+
[![Install in Cursor](https://img.shields.io/badge/Cursor-Install_Server-1e1e1e?logo=data:image/svg%2bxml;base64,PHN2ZyBoZWlnaHQ9IjFlbSIgc3R5bGU9ImZsZXg6bm9uZTtsaW5lLWhlaWdodDoxIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxZW0iCiAgICB4bWxucz0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LjgiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgaWQ9ImxvYmUtaWNvbnMtY3Vyc29ydW5kZWZpbmVkLWZpbGwtMSIKICAgICAgICAgICAgeDE9IjIyLjM1IiB4Mj0iMTEuOTI1IiB5MT0iNi4wMzciIHkyPSIxMi4xNSI+CiAgICAgICAgICAgIDxzdG9wIG9mZnNldD0iLjE4MiIgc3RvcC1jb2xvcj0iI2ZmZiIgc3RvcC1vcGFjaXR5PSIuMzEiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIuNzE1IiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9IjAiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgICAgIDxsaW5lYXJHcmFkaWVudCBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgaWQ9ImxvYmUtaWNvbnMtY3Vyc29ydW5kZWZpbmVkLWZpbGwtMiIKICAgICAgICAgICAgeDE9IjExLjkyNSIgeDI9IjEuNSIgeTE9IjAiIHkyPSIxOCI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iLjYiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIuNjY3IiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii4yMiI+PC9zdG9wPgogICAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+Cjwvc3ZnPgo=)](https://cursor.com/en-US/install-mcp?name=MongoDB&config=eyJjb21tYW5kIjoibnB4IC15IG1vbmdvZGItbWNwLXNlcnZlciAtLXJlYWRPbmx5In0%3D)
33

44
# MongoDB MCP Server
55

@@ -406,6 +406,8 @@ When using the `disk` logger, log files are stored in:
406406

407407
You can override the log directory with the `logPath` option.
408408

409+
> **🔒 Security Guideline:** The user account running the MCP server must have both read and write permissions to the `logPath` directory. Ensure this directory is properly secured with appropriate file system permissions to prevent unauthorized access to log files.
410+
409411
#### Disabled Tools
410412

411413
You can disable specific tools or categories of tools by using the `disabledTools` option. This option accepts an array of strings,
@@ -479,6 +481,8 @@ The `exportTimeoutMs` configuration controls the time after which the exported d
479481

480482
The `exportCleanupIntervalMs` configuration controls how frequently the cleanup process runs to remove expired export files. By default, cleanup runs every 2 minutes (120000ms).
481483

484+
> **🔒 Security Guideline:** The user account running the MCP server must have both read and write permissions to the `exportsPath` directory. Ensure this directory is properly secured with appropriate file system permissions to prevent unauthorized access to exported data files, which may contain sensitive MongoDB data. Consider the sensitivity of your data when choosing the export location and apply restrictive permissions accordingly.
485+
482486
#### Telemetry
483487

484488
The `telemetry` configuration option allows you to disable telemetry collection. When enabled, the MCP server will collect usage data and send it to MongoDB.

src/common/connectionErrorHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export type ConnectionErrorHandled = { errorHandled: true; result: CallToolResul
1414

1515
export const connectionErrorHandler: ConnectionErrorHandler = (error, { availableTools, connectionState }) => {
1616
const connectTools = availableTools
17-
.filter((t) => t.operationType === "connect")
17+
.filter((t) => t.operationType === "connect" && t.isEnabled())
1818
.sort((a, b) => a.category.localeCompare(b.category)); // Sort Atlas tools before MongoDB tools
1919

2020
// Find what Atlas connect tools are available and suggest when the LLM should to use each. If no Atlas tools are found, return a suggestion for the MongoDB connect tool.

src/common/logger.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const LogId = {
4040
toolExecute: mongoLogId(1_003_001),
4141
toolExecuteFailure: mongoLogId(1_003_002),
4242
toolDisabled: mongoLogId(1_003_003),
43+
toolMetadataChange: mongoLogId(1_003_004),
4344

4445
mongodbConnectFailure: mongoLogId(1_004_001),
4546
mongodbDisconnectFailure: mongoLogId(1_004_002),

src/tools/mongodb/connect/connect.ts

Lines changed: 19 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -2,114 +2,48 @@ import { z } from "zod";
22
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
33
import { MongoDBToolBase } from "../mongodbTool.js";
44
import type { ToolArgs, OperationType, ToolConstructorParams } from "../../tool.js";
5-
import assert from "assert";
65
import type { Server } from "../../../server.js";
7-
import { LogId } from "../../../common/logger.js";
8-
9-
const disconnectedSchema = z
10-
.object({
11-
connectionString: z.string().describe("MongoDB connection string (in the mongodb:// or mongodb+srv:// format)"),
12-
})
13-
.describe("Options for connecting to MongoDB.");
14-
15-
const connectedSchema = z
16-
.object({
17-
connectionString: z
18-
.string()
19-
.optional()
20-
.describe("MongoDB connection string to switch to (in the mongodb:// or mongodb+srv:// format)"),
21-
})
22-
.describe(
23-
"Options for switching the current MongoDB connection. If a connection string is not provided, the connection string from the config will be used."
24-
);
25-
26-
const connectedName = "switch-connection" as const;
27-
const disconnectedName = "connect" as const;
28-
29-
const connectedDescription =
30-
"Switch to a different MongoDB connection. If the user has configured a connection string or has previously called the connect tool, a connection is already established and there's no need to call this tool unless the user has explicitly requested to switch to a new instance.";
31-
const disconnectedDescription =
32-
"Connect to a MongoDB instance. The config resource captures if the server is already connected to a MongoDB cluster. If the user has configured a connection string or has previously called the connect tool, a connection is already established and there's no need to call this tool unless the user has explicitly requested to switch to a new MongoDB cluster.";
33-
346
export class ConnectTool extends MongoDBToolBase {
35-
public name: typeof connectedName | typeof disconnectedName = disconnectedName;
36-
protected description: typeof connectedDescription | typeof disconnectedDescription = disconnectedDescription;
7+
public override name = "connect";
8+
protected override description =
9+
"Connect to a MongoDB instance. The config resource captures if the server is already connected to a MongoDB cluster. If the user has configured a connection string or has previously called the connect tool, a connection is already established and there's no need to call this tool unless the user has explicitly requested to switch to a new MongoDB cluster.";
3710

3811
// Here the default is empty just to trigger registration, but we're going to override it with the correct
3912
// schema in the register method.
40-
protected argsShape = {
41-
connectionString: z.string().optional(),
13+
protected override argsShape = {
14+
connectionString: z.string().describe("MongoDB connection string (in the mongodb:// or mongodb+srv:// format)"),
4215
};
4316

44-
public operationType: OperationType = "connect";
17+
public override operationType: OperationType = "connect";
4518

4619
constructor({ session, config, telemetry, elicitation }: ToolConstructorParams) {
4720
super({ session, config, telemetry, elicitation });
4821
session.on("connect", () => {
49-
this.updateMetadata();
22+
this.disable();
5023
});
5124

5225
session.on("disconnect", () => {
53-
this.updateMetadata();
26+
this.enable();
5427
});
5528
}
5629

57-
protected async execute({ connectionString }: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
58-
switch (this.name) {
59-
case disconnectedName:
60-
assert(connectionString, "Connection string is required");
61-
break;
62-
case connectedName:
63-
connectionString ??= this.config.connectionString;
64-
assert(
65-
connectionString,
66-
"Cannot switch to a new connection because no connection string was provided and no default connection string is configured."
67-
);
68-
break;
30+
public override register(server: Server): boolean {
31+
const registrationSuccessful = super.register(server);
32+
/**
33+
* When connected to mongodb we want to swap connect with
34+
* switch-connection tool.
35+
*/
36+
if (registrationSuccessful && this.session.isConnectedToMongoDB) {
37+
this.disable();
6938
}
39+
return registrationSuccessful;
40+
}
7041

42+
protected override async execute({ connectionString }: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
7143
await this.session.connectToMongoDB({ connectionString });
72-
this.updateMetadata();
7344

7445
return {
7546
content: [{ type: "text", text: "Successfully connected to MongoDB." }],
7647
};
7748
}
78-
79-
public register(server: Server): boolean {
80-
if (super.register(server)) {
81-
this.updateMetadata();
82-
return true;
83-
}
84-
85-
return false;
86-
}
87-
88-
private updateMetadata(): void {
89-
let name: string;
90-
let description: string;
91-
let inputSchema: z.ZodObject<z.ZodRawShape>;
92-
93-
if (this.session.isConnectedToMongoDB) {
94-
name = connectedName;
95-
description = connectedDescription;
96-
inputSchema = connectedSchema;
97-
} else {
98-
name = disconnectedName;
99-
description = disconnectedDescription;
100-
inputSchema = disconnectedSchema;
101-
}
102-
103-
this.session.logger.info({
104-
id: LogId.updateToolMetadata,
105-
context: "tool",
106-
message: `Updating tool metadata to ${name}`,
107-
});
108-
109-
this.update?.({
110-
name,
111-
description,
112-
inputSchema,
113-
});
114-
}
11549
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import z from "zod";
2+
import { type CallToolResult } from "@modelcontextprotocol/sdk/types.js";
3+
4+
import { MongoDBToolBase } from "../mongodbTool.js";
5+
import { type ToolArgs, type OperationType, type ToolConstructorParams } from "../../tool.js";
6+
import type { Server } from "../../../server.js";
7+
8+
export class SwitchConnectionTool extends MongoDBToolBase {
9+
public override name = "switch-connection";
10+
protected override description =
11+
"Switch to a different MongoDB connection. If the user has configured a connection string or has previously called the connect tool, a connection is already established and there's no need to call this tool unless the user has explicitly requested to switch to a new instance.";
12+
13+
protected override argsShape = {
14+
connectionString: z
15+
.string()
16+
.optional()
17+
.describe(
18+
"MongoDB connection string to switch to (in the mongodb:// or mongodb+srv:// format). If a connection string is not provided, the connection string from the config will be used."
19+
),
20+
};
21+
22+
public override operationType: OperationType = "connect";
23+
24+
constructor({ session, config, telemetry, elicitation }: ToolConstructorParams) {
25+
super({ session, config, telemetry, elicitation });
26+
session.on("connect", () => {
27+
this.enable();
28+
});
29+
30+
session.on("disconnect", () => {
31+
this.disable();
32+
});
33+
}
34+
35+
public override register(server: Server): boolean {
36+
const registrationSuccessful = super.register(server);
37+
/**
38+
* When connected to mongodb we want to swap connect with
39+
* switch-connection tool.
40+
*/
41+
if (registrationSuccessful && !this.session.isConnectedToMongoDB) {
42+
this.disable();
43+
}
44+
return registrationSuccessful;
45+
}
46+
47+
protected override async execute({ connectionString }: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
48+
if (typeof connectionString !== "string") {
49+
await this.session.connectToConfiguredConnection();
50+
} else {
51+
await this.session.connectToMongoDB({ connectionString });
52+
}
53+
54+
return {
55+
content: [{ type: "text", text: "Successfully connected to MongoDB." }],
56+
};
57+
}
58+
}

src/tools/mongodb/tools.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ import { CreateCollectionTool } from "./create/createCollection.js";
2020
import { LogsTool } from "./metadata/logs.js";
2121
import { ExportTool } from "./read/export.js";
2222
import { DropIndexTool } from "./delete/dropIndex.js";
23+
import { SwitchConnectionTool } from "./connect/switchConnection.js";
2324

2425
export const MongoDbTools = [
2526
ConnectTool,
27+
SwitchConnectionTool,
2628
ListCollectionsTool,
2729
ListDatabasesTool,
2830
CollectionIndexesTool,

0 commit comments

Comments
 (0)