Knip MCP Server

Lets a coding agent run Knip, read its docs and set up knip.json for a JavaScript or TypeScript project

Official · WebPro JavaScript Local · stdio Developer toolsKnowledge and memory

83 popularity score ★ 13k ↓ 11k/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 knip -- npx -y @knip/mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "knip": {
      "command": "npx",
      "args": [
        "-y",
        "@knip/mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "knip": {
      "command": "npx",
      "args": [
        "-y",
        "@knip/mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "knip": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@knip/mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.knip]
command = "npx"
args = ["-y", "@knip/mcp"]
Gemini CLITerminal
gemini mcp add --scope user knip npx -- -y @knip/mcp

What it does

The Knip MCP Server connects a coding agent to Knip, the tool that finds unused files, dependencies and exports in JavaScript and TypeScript projects. Its docs say that you tell your agent to "configure knip" and it uses the server's tools to create, analyse and optimise the project's knip.json configuration.

It offers two tools: knip-run, which runs Knip and returns configuration hints and issues, and knip-docs, which returns Knip documentation by topic. It also has a knip-configure prompt, a guided workflow for setting up Knip, and serves every page of the Knip documentation as MCP resources under knip://docs/{topic}.

It runs locally with npx @knip/mcp and needs no account or key. The same server is built into the Knip extension for VS Code and Open VSX. It is published as @knip/mcp from the Knip monorepo, by the same maker as Knip.

What it needs

RuntimeNode.js

Tools 2

knip-run
Run Knip, returns configuration hints and issues
knip-docs
Get Knip documentation by topic

Similar servers