-
Notifications
You must be signed in to change notification settings - Fork 4
fix: resolve TypeScript type inference error with MCP SDK 1.24.0 #549
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
fix: resolve TypeScript type inference error with MCP SDK 1.24.0 #549
Conversation
Co-authored-by: JamieSinn <1538232+JamieSinn@users.noreply.github.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
devcycle-mcp-server | 1de22aa | Dec 03 2025, 05:43 PM |
| const result = await handler(args) | ||
| this.server.registerTool( | ||
| name, | ||
| toolConfig as any, |
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.
@jonathannorris this is the only material change here - any issue with this? It's resolving this error:
https://github.com/DevCycleHQ/cli/actions/runs/19902129668/job/57048640004?pr=548#step:7:6
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 fixes a TypeScript compilation error introduced by the MCP SDK 1.24.x upgrade by adding an explicit type assertion to prevent excessively deep type inference.
- Adds
as anytype assertion totoolConfigparameter inregisterToolWithErrorHandling()to work around TypeScript's type inference depth limit - Reformats the
registerTool()call for better readability - Bumps version from 6.1.3 to 6.1.4
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/mcp/server.ts | Adds type assertion to toolConfig parameter and reformats registerTool() call to resolve TypeScript compilation error |
| oclif.manifest.json | Updates version from 6.1.3 to 6.1.4 reflecting the patch fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
294d122
into
dependabot/npm_and_yarn/modelcontextprotocol/sdk-1.24.0
* chore(deps): bump @modelcontextprotocol/sdk from 1.20.2 to 1.24.0 Bumps [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) from 1.20.2 to 1.24.0. - [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases) - [Commits](modelcontextprotocol/typescript-sdk@1.20.2...1.24.0) --- updated-dependencies: - dependency-name: "@modelcontextprotocol/sdk" dependency-version: 1.24.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * fix: resolve TypeScript type inference error with MCP SDK 1.24.0 (#549) * Initial plan * fix: resolve TypeScript type inference error with MCP SDK 1.24.0 Co-authored-by: JamieSinn <1538232+JamieSinn@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JamieSinn <1538232+JamieSinn@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: JamieSinn <1538232+JamieSinn@users.noreply.github.com>
The upgrade to
@modelcontextprotocol/sdk1.24.0 introduced stricter type inference inregisterTool(), causing TypeScript to fail with "Type instantiation is excessively deep and possibly infinite" at build time.Changes
toolConfigparameter inregisterToolWithErrorHandling()to prevent overly complex type inferenceThis preserves runtime type safety through Zod schema validation while avoiding TypeScript's type inference limits.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.