-
Notifications
You must be signed in to change notification settings - Fork 90
chore: update to latest mcp server #1192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the mongodb-mcp-server dependency to version ^1.3.0-pre.2 (from ^1.0.3-prerelease.1) and adapts the codebase to accommodate API changes in the newer version, including the use of UserConfigSchema for validation and ConnectionStateConnected class for state management.
Key Changes
- Replaced
defaultUserConfigimport withUserConfigSchemaand derives default config dynamically - Updated connection state management to use
ConnectionStateConnectedclass constructor - Changed telemetry property from
genuineMongoDB.dbTypetogenuineMongoDB.serverName
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated mongodb-mcp-server to ^1.3.0-pre.2 and mongodb-data-service to ^22.36.0 |
| src/mcp/mcpConfig.ts | Replaced defaultUserConfig import with schema-based approach using UserConfigSchema |
| src/mcp/mcpController.ts | Updated to use UserConfigSchema.parse() for validation and changed return type to Partial<UserConfig> |
| src/mcp/mcpConnectionManager.ts | Refactored to use ConnectionStateConnected constructor instead of object literal |
| src/telemetry/connectionTelemetry.ts | Updated telemetry property from dbType to serverName to match API changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/mcp/mcpConfig.ts
Outdated
|
|
||
| export function getMCPConfigFromVSCodeSettings( | ||
| packageJsonConfiguredProperties: Record<string, unknown> = contributes | ||
| ?.configuration?.properties ?? {}, | ||
| retrieveMCPConfiguration: () => vscode.WorkspaceConfiguration = (): vscode.WorkspaceConfiguration => | ||
| vscode.workspace.getConfiguration('mdb.mcp'), | ||
| ): Partial<UserConfig> { | ||
| const configurableProperties = new Set(Object.keys(UserConfigSchema.shape)); |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configurableProperties Set is recreated on every call to getMCPConfigFromVSCodeSettings(). Consider moving this to module scope (alongside defaultUserConfig on line 8) to avoid repeated object creation.
| export function getMCPConfigFromVSCodeSettings( | |
| packageJsonConfiguredProperties: Record<string, unknown> = contributes | |
| ?.configuration?.properties ?? {}, | |
| retrieveMCPConfiguration: () => vscode.WorkspaceConfiguration = (): vscode.WorkspaceConfiguration => | |
| vscode.workspace.getConfiguration('mdb.mcp'), | |
| ): Partial<UserConfig> { | |
| const configurableProperties = new Set(Object.keys(UserConfigSchema.shape)); | |
| const configurableProperties = new Set(Object.keys(UserConfigSchema.shape)); | |
| export function getMCPConfigFromVSCodeSettings( | |
| packageJsonConfiguredProperties: Record<string, unknown> = contributes | |
| ?.configuration?.properties ?? {}, | |
| retrieveMCPConfiguration: () => vscode.WorkspaceConfiguration = (): vscode.WorkspaceConfiguration => | |
| vscode.workspace.getConfiguration('mdb.mcp'), | |
| ): Partial<UserConfig> { | |
| // configurableProperties is now defined at module scope |
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes