Skip to content

Conversation

@lumirlumir
Copy link
Member

@lumirlumir lumirlumir commented Nov 27, 2025

Prerequisites checklist

What is the purpose of this pull request?

In this PR, I've made several updates, particularly for @eslint/mcp.

Unfortunately, some of the problems have recently arisen in the rewrite repository, so this PR includes a bit of changes especially for @eslint/mcp.

This PR includes the following fixes:

1. Upgrade @modelcontextprotocol/sdk to v1.23.0 and zod to v4

Two days ago, @modelcontextprotocol/[email protected] was released.

https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/1.23.0

Shortly after that release, our CI began failing with the TS2589: Type instantiation is excessively deep and possibly infinite error.

I tried to resolve it myself but couldn't find a suitable solution, so I opened an issue in @modelcontextprotocol/sdk: modelcontextprotocol/typescript-sdk#1180

The issue was traced to the newly introduced Zod v4 support in @modelcontextprotocol/[email protected].

This only affected the eslint/rewrite repository because the dev-dependency knip uses Zod v4 internally, while @eslint/mcp depends on Zod v3, causing a version conflict. The SDK team provided a clear explanation here: modelcontextprotocol/typescript-sdk#1180 (comment)

To avoid the conflict, I've bumped Zod to v4. Zod v4 offers v3 compatibility via zod/v3, so no code changes were necessary.

2. Replace deprecated mcpServer.tool usage with mcpServer.registerTool

Per the JSDoc comments in @modelcontextprotocol/sdk, mcpServer.tool is deprecated, so I've replaced it with the recommended mcpServer.registerTool.

image

3. The recently released [email protected] has caused formatting errors:

Yesterday, [email protected] was released and caused formatting errors, particularly in .ts files.

I've updated it accordingly, which introduced some additional code diffs.

What changes did you make? (Give an overview)

In this PR, I've fixed CI and use zod v4, and latest method in mcp

Related Issues

Ref: modelcontextprotocol/typescript-sdk#1180 (comment)

Is there anything you'd like reviewers to focus on?

The behavior of MCP has not changed, so I've marked the prefix as refactor, though I'm not sure about that.

@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Nov 27, 2025
@lumirlumir lumirlumir changed the title refactor: fix CI failure and use registerTool refactor: fix CI failure and use registerTool in MCP Nov 27, 2025
@lumirlumir
Copy link
Member Author

The CI failure appears to be a regression in @modelcontextprotocol/[email protected], which was released yesterday.

I've opened an issue about it in @modelcontextprotocol/sdk: modelcontextprotocol/typescript-sdk#1180

@lumirlumir lumirlumir changed the title refactor: fix CI failure and use registerTool in MCP refactor: replace deprecated tool with registerTool in @eslint/mcp Nov 27, 2025
@lumirlumir lumirlumir moved this from Needs Triage to Implementing in Triage Nov 27, 2025
@lumirlumir lumirlumir changed the title refactor: replace deprecated tool with registerTool in @eslint/mcp fix: use zod v4, v10_config_lookup_from_file and latest method in mcp Nov 28, 2025
@eslint-github-bot

This comment was marked as resolved.

@lumirlumir lumirlumir changed the title fix: use zod v4, v10_config_lookup_from_file and latest method in mcp fix: use zod v4, v10 flag and latest method in mcp Nov 28, 2025
@eslint-github-bot eslint-github-bot bot added the bug Something isn't working label Nov 28, 2025
@lumirlumir lumirlumir removed the chore label Nov 28, 2025
@lumirlumir lumirlumir changed the title fix: use zod v4, v10 flag and latest method in mcp refactor: fix CI and use zod v4, and latest method in mcp Nov 28, 2025
@lumirlumir lumirlumir removed the bug Something isn't working label Nov 28, 2025
@lumirlumir lumirlumir moved this from Implementing to Needs Triage in Triage Nov 28, 2025
Comment on lines +26 to +27
$schema: "http://json-schema.org/draft-07/schema#",
additionalProperties: false,
Copy link
Member Author

Choose a reason for hiding this comment

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

If I don't add these two lines, the tests fail, so I've added them.

However, I'm not sure whether this is considered a user-facing change.

@lumirlumir lumirlumir marked this pull request as ready for review November 28, 2025 07:10
@lumirlumir lumirlumir changed the title refactor: fix CI and use zod v4, and latest method in mcp refactor: fix CI, use zod v4, and latest method in mcp Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants