
Knip MCP Server: Setup for Claude Code, Cursor and Other Apps
Lets Claude, Cursor and other assistants run Knip on your JavaScript or TypeScript project and read back unused files, exports and dependencies.
This is the Knip project's own MCP server, published as the @knip/mcp package. It runs the same unused-code checks as the knip CLI, in your project folder, with no account or network calls. It is a good fit for an assistant doing a cleanup pass, since it also returns hints when Knip is not configured yet, so the assistant can suggest a starting configuration.
Good for
- Developers who want an assistant to clean up dead code and unused dependencies
- Teams setting up Knip for the first time and wanting configuration suggestions
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install knip MCP
Claude Code
- 1
Copy this prompt.
Add the knip MCP server to Claude Code. Run this command: claude mcp add knip -- npx -y @knip/mcp Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
Built from the package data we hold. Not yet tested by us.
Tools
Runs Knip on your project and lists unused code
Runs Knip against your JavaScript or TypeScript project and returns unused files, exports and dependencies, plus hints if Knip is not configured yet.
Try: “Run Knip on this project and show me what's unused.”
Files ·
knip-runLooks up a topic in the Knip documentation
Returns Knip's own documentation for a topic, such as a specific rule or configuration option.
Try: “What does the ignoreExportsUsedInFile option do?”
Read ·
knip-docs
Read from the source code
Permissions
low risk · 1 thing to watch
Low risk
It reads your project's files to find unused code and reports the results; it does not change or delete anything itself.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
It only reads your project
Knip itself does not delete files; it reports what is unused so you or the assistant can decide what to remove. github.com
Security advisories
No published security advisories as of Nov 1, 2026.
Technical details
| Turning on read-only | Both tools only read your project and the bundled docs; there is nothing to write or delete. |
|---|---|
| Sign-in and keys | No sign-in or API key. |
Questions
Is this official?
Yes. It is Knip's own MCP server package.
Does it need an API key?
No. It runs locally against your project files.
Does it delete the unused code it finds?
No. It only reports unused files, exports and dependencies. Removing them is up to you or a separate Knip CLI run with --fix.
Is it free?
Yes, open source with no limits documented.
Can I use it from VS Code?
Yes. The Knip VS Code extension bundles this MCP server, or you can add it directly as shown in the install box.
How do I add it to Claude Code?
Run claude mcp add knip -- npx -y @knip/mcp in your project. It needs Node.js; the Claude Code tab above shows the same command and the config-file form.
Information
updated Nov 2, 2026
- Publisher
- Official
- Package
@knip/mcp- Registry
- npm
- Transport
- stdio
- Auth
- None
- Version
- 0.0.37
- License
- ISC
- Last commit
- Oct 31, 2026
- Open issues
- 9
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 2Hide
- github.com · github.com
- github.com · github.com