Skip to content

Conversation

@gagik
Copy link
Collaborator

@gagik gagik commented Dec 3, 2025

This bumps the SDK to the latest versions which patches some security issues. This also simplifies our typing and structure of our arguments so we can have a more consistant and simpler to reason about API across tools.

Copilot AI review requested due to automatic review settings December 3, 2025 22:08
@gagik gagik requested a review from a team as a code owner December 3, 2025 22:08
Copy link
Contributor

Copilot AI left a 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 MCP SDK from version 1.22.0 to 1.24.2 to address security vulnerabilities, and refactors the tool argument structure to improve type consistency and simplify the API across all tools. The refactoring changes the tool callback signature from using spread/rest parameters to accepting structured objects with named properties.

Key changes:

  • Upgraded @modelcontextprotocol/sdk dependency from 1.22.0 to 1.24.2
  • Refactored tool execution signatures to use structured objects instead of spread parameters
  • Updated type definitions for ToolArgs, ToolExecutionContext, and removed ToolCallbackArgs

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Bumped MCP SDK dependency version
src/tools/tool.ts Core refactoring of tool argument types and execution context; changed callback registration pattern
src/tools/mongodb/mongodbTool.ts Updated telemetry metadata signature to match new argument structure
src/tools/mongodb/create/insertMany.ts Refactored conditional argument handling for embedding parameters
src/tools/atlasLocal/atlasLocalTool.ts Updated execute and executeWithAtlasLocalClient signatures to use structured arguments
src/tools/atlasLocal/delete/deleteDeployment.ts Changed parameter order to match new structured signature
src/tools/atlasLocal/create/createDeployment.ts Changed parameter order to match new structured signature
src/tools/atlasLocal/connect/connectDeployment.ts Updated method signatures and telemetry metadata handling
src/tools/atlas/atlasTool.ts Simplified telemetry metadata resolution to work with structured args
src/tools/atlas/read/getPerformanceAdvisorTool.ts Updated telemetry metadata signature and removed unused imports
src/tools/atlas/connect/connectCluster.ts Updated telemetry metadata signature and simplified argsShape
src/elicitation.ts Updated type import to use new ElicitRequestFormParams
tests/unit/toolBase.test.ts Updated test cases to use structured argument format instead of tuples
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

This bumps the SDK to the latest versions which patches some security issues. This also simplifies our typing and structure of our arguments so we can have a more consistant and simpler to reason about API across tools.
@coveralls
Copy link
Collaborator

coveralls commented Dec 3, 2025

Pull Request Test Coverage Report for Build 19925638108

Details

  • 49 of 66 (74.24%) changed or added relevant lines in 12 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.03%) to 80.575%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/tools/atlas/read/getPerformanceAdvisor.ts 0 2 0.0%
src/tools/mongodb/create/insertMany.ts 3 5 60.0%
src/tools/atlas/atlasTool.ts 0 3 0.0%
src/tools/atlas/connect/connectCluster.ts 1 4 25.0%
src/tools/atlasLocal/atlasLocalTool.ts 6 9 66.67%
src/tools/atlasLocal/connect/connectDeployment.ts 3 7 42.86%
Files with Coverage Reduction New Missed Lines %
src/tools/atlasLocal/atlasLocalTool.ts 1 51.82%
src/tools/atlasLocal/connect/connectDeployment.ts 1 86.49%
Totals Coverage Status
Change from base Build 19904428619: -0.03%
Covered Lines: 6736
Relevant Lines: 8278

💛 - Coveralls

callback
);
this.registeredTool = (
server.mcpServer.tool as (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.tool is deprecated - should we swap this out for registerTool?

Copy link
Collaborator Author

@gagik gagik Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I tried and then reverted, I thought there was something wrong with the SDK because I had incorrectly documented experiences from it before but it was actually our mock. Re-added

Now with actual fix for our mock... I thought there was something wrong
This reverts commit f881902.
@gagik gagik merged commit 18ff7cc into main Dec 4, 2025
17 checks passed
@gagik gagik deleted the gagik/bump-sdk branch December 4, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants