ESLint MCP Server

Runs ESLint on files in your project and hands the lint results back to a coding assistant

Official · ESLint JavaScript Local · stdio Developer tools

79 popularity score ★ 353 ↓ 43k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add eslint -- npx @eslint/mcp@latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "eslint": {
      "command": "npx",
      "args": [
        "@eslint/mcp@latest"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "eslint": {
      "command": "npx",
      "args": [
        "@eslint/mcp@latest"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "eslint": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "@eslint/mcp@latest"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.eslint]
command = "npx"
args = ["@eslint/mcp@latest"]
Gemini CLITerminal
gemini mcp add --scope user eslint npx -- @eslint/mcp@latest

Settings 2

ESLINT_FLAGS Optional: ESLint feature flags; the docs set unstable_native_nodejs_ts_config to load TypeScript config files natively on Node.js 22.13.0+.
NODE_OPTIONS Optional: Node options; the docs set --experimental-transform-types alongside ESLINT_FLAGS for TypeScript config files.

What it does

The ESLint MCP Server is published by the ESLint team as the npm package @eslint/mcp, from the packages/mcp folder of the eslint/rewrite repository. It runs on your machine over stdio and gives an editor assistant (Copilot agent mode in VS Code, Cursor, Windsurf and similar clients) a way to lint code with the project's own ESLint configuration instead of guessing at the rules.

In version 0.3.14 the source registers exactly one tool, lint-files (src/mcp-server.js). It takes a non-empty list of absolute file paths, runs ESLint's lintFiles on them with default options, and returns each file's result as JSON text. The server wraps those results in two instructions to the assistant: show the full list to the user first, and ask before fixing anything unless the user already asked for fixes. The tool itself never applies fixes or writes files; any fixing is done by the assistant's own editing tools.

The package ships its own copy of ESLint (it depends on eslint ^10.12.0 in package.json), so the rules come from your project's eslint.config file, not from an ESLint version you installed. The same server can also be started from the ESLint CLI with npx eslint --mcp.

What it needs

RuntimeNode.js 22+

Node.js ^20.19.0, ^22.13.0 or 24 and later (engines field in package.json), with npx. An MCP client that starts stdio servers, such as VS Code with the Copilot Chat extension, Cursor or Windsurf. A project with an ESLint flat config file. TypeScript config files (eslint.config.ts and similar) need either jiti plus a local install of @eslint/mcp, or Node.js 22.13.0 or later with ESLINT_FLAGS and NODE_OPTIONS set.

Limits

One tool only: it lints and reports, and does not fix, format, explain rules or list rule configuration. File paths must be absolute. With npx @eslint/mcp@latest the package is installed into a temporary folder, so a TypeScript config that needs jiti from your project's node_modules will not load; the docs say to install @eslint/mcp and jiti locally and run npx @eslint/mcp. ESLint runs with default options, so the config it finds depends on the directory the client starts the server in. Windsurf charges credits for every MCP tool call, whether it succeeds or fails.

Who it suits

Suits JavaScript and TypeScript developers who already use ESLint and want their assistant to check its edits against the project's real lint rules, in VS Code, Cursor or Windsurf. It runs locally, needs no account or key, and only reads files, so it is low on setup. It is not the pick if you want the server itself to auto-fix code, or if your project lints with a different tool; it also adds little where the assistant can already run npx eslint in a terminal.

Tools 1

lint-files
Lint a list of files given by absolute path with the project's ESLint config and return the results per file as JSON

Similar servers