Skip to content

feat: Add separate MCP server package #201

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

feat: Add separate MCP server package #201

wants to merge 6 commits into from

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented May 6, 2025

Prerequisites checklist

What is the purpose of this pull request?

Adds a new @eslint/mcp package.

What changes did you make? (Give an overview)

  • Ported mcp-server.js from the eslint repo, along with tests.
  • Updated related files for the monorepo to reflect the new package

Related Issues

refs eslint/eslint#19682

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

This package has no JSR equivalent because it's a binary.

Also, because it's a binary, I'm not rolling up or converting to CommonJS. It stays ESM and the src directory is published.

These were simplifying decisions based on the uniqueness of this package. I think this is okay because there is no API exposed through the package.

@nzakas
Copy link
Member Author

nzakas commented May 6, 2025

The failure is a Mocha timeout. Seems intermittent.

@nzakas nzakas requested a review from Copilot May 6, 2025 18:51
Copy link

@Copilot 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 adds a new @eslint/mcp package that implements an MCP server for ESLint along with its CLI and accompanying tests and configuration updates.

  • Port the existing mcp-server.js into the new package with a corresponding CLI executable.
  • Add tests for both the MCP server and CLI, as well as update documentation, workflows, and issue templates to support the new package.

Reviewed Changes

Copilot reviewed 15 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/mcp/tests/mcp-server.test.js Added tests for MCP server tools functionality
packages/mcp/tests/mcp-cli.js Added CLI tests to verify startup behavior
packages/mcp/tests/fixtures/* Added fixture files for testing linting outcomes
packages/mcp/src/mcp-server.js Implemented the MCP server using ESLint integration
packages/mcp/src/mcp-cli.js Provided a CLI to initialize and run the MCP server
packages/mcp/README.md Updated documentation to include usage for the new package
Other configuration files (.github/workflows, etc.) Updated CI/workflows and issue templates to include the MCP package
Files not reviewed (4)
  • .release-please-manifest.json: Language not supported
  • packages/mcp/package.json: Language not supported
  • packages/mcp/tsconfig.json: Language not supported
  • release-please-config.json: Language not supported

@fasttime fasttime moved this from Needs Triage to Implementing in Triage May 7, 2025
if: ${{ inputs.package != 'migrate-config' }}
run: npx jsr publish
run: |
if [ -f "packages/${{ inputs.package }}/jsr.json" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if [ -f "packages/${{ inputs.package }}/jsr.json" ]; then
if [ -f "jsr.json" ]; then

As this runs in the directory of the package (working-directory: packages/${{ inputs.package }}).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Implementing
Development

Successfully merging this pull request may close these issues.

3 participants