Docs page(s)
https://eslint.org/docs/latest/use/mcp
What documentation issue do you want to solve?
The docs should provide some guidance on getting the MCP server working with eslint.config.ts files. Since ESlint requires jiti to work with TypeScript config files, running @eslint/mcp@latest alone through npx doesn't find that dependency.
What do you think is the correct solution?
I got it working by adding -p jiti to the npx command and explicitly invoking -c mcp at the end because when you use -p, it doesn't automatically infer the command to run.
These configs work for
VSCode (./.vscode/mcp.json)
{
"servers": {
"ESLint" {
"type": "stdio",
"command": "npx",
"args": [
"-p",
"@eslint/mcp@latest",
"-p",
"jiti",
"-c",
"mcp"
],
}
}
}
Cursor (./.cursor/mcp.json) or Claude Code (./.mcp.json)
{
"mcpServers": {
"ESLint": {
"type": "stdio",
"command": "npx",
"args": [
"-p",
"@eslint/mcp@latest",
"-p",
"jiti",
"-c",
"mcp"
],
"env": {}
}
}
}
Participation
Additional comments
No response
Docs page(s)
https://eslint.org/docs/latest/use/mcp
What documentation issue do you want to solve?
The docs should provide some guidance on getting the MCP server working with eslint.config.ts files. Since ESlint requires
jitito work with TypeScript config files, running @eslint/mcp@latest alone through npx doesn't find that dependency.What do you think is the correct solution?
I got it working by adding
-p jitito the npx command and explicitly invoking-c mcpat the end because when you use-p, it doesn't automatically infer the command to run.These configs work for
VSCode (
./.vscode/mcp.json){ "servers": { "ESLint" { "type": "stdio", "command": "npx", "args": [ "-p", "@eslint/mcp@latest", "-p", "jiti", "-c", "mcp" ], } } }Cursor (
./.cursor/mcp.json) or Claude Code (./.mcp.json){ "mcpServers": { "ESLint": { "type": "stdio", "command": "npx", "args": [ "-p", "@eslint/mcp@latest", "-p", "jiti", "-c", "mcp" ], "env": {} } } }Participation
Additional comments
No response