Skip to content

Docs: ESLint MCP Server docs should explain how to get it working with TypeScript config requiring jiti #20290

Description

@lachlanhunt

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

  • I am willing to submit a pull request for this change.

Additional comments

No response

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusiondocumentationRelates to ESLint's documentation

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions