@knip/mcp 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/blog/brief-history.md +1 -1
- package/docs/blog/for-editors-and-agents.md +124 -0
- package/docs/blog/knip-v3.mdx +1 -1
- package/docs/blog/knip-v4.mdx +1 -1
- package/docs/blog/knip-v5.mdx +1 -1
- package/docs/blog/release-notes-v2.md +1 -1
- package/docs/blog/slim-down-to-speed-up.md +1 -1
- package/docs/blog/state-of-knip.md +1 -1
- package/docs/blog/two-years.mdx +1 -1
- package/docs/docs/blog/for-editors-and-agents.md +50 -35
- package/docs/index.mdx +4 -0
- package/package.json +8 -6
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Knip for Editors & Agents
|
|
3
|
+
date: 2025-12-17
|
|
4
|
+
sidebar:
|
|
5
|
+
order: 1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
_Published: 2025-12-17_
|
|
9
|
+
|
|
10
|
+
Three years in, Knip has founds its place in [over 10.000 projects][1] and is
|
|
11
|
+
downloaded [over 18M times/month][2]. A long period of steady growth in usage
|
|
12
|
+
and stability allows Knip to become more accessible to more people. That's why
|
|
13
|
+
I'm excited and proud to introduce the brand new VS Code Extension **and** MCP
|
|
14
|
+
Server. For humans and coding agents alike, Knip will help keep your codebases
|
|
15
|
+
tidy.
|
|
16
|
+
|
|
17
|
+
Don't forget... Knip it before you ship it!
|
|
18
|
+
|
|
19
|
+
## VS Code Extension
|
|
20
|
+
|
|
21
|
+
This one is for you.
|
|
22
|
+
|
|
23
|
+
[The usual suspects][3] like red squiggles for unused exports are there. What
|
|
24
|
+
really moves the needle for DX with Knip's module graph is **navigation**. A
|
|
25
|
+
completely unique way to view & fly through codebases for developers who care.
|
|
26
|
+
Connect the dots during development and refactors, while keeping things in
|
|
27
|
+
check. We're starting out with [3 key features][4]:
|
|
28
|
+
|
|
29
|
+
1. **Hover over Export** for import & usage locations
|
|
30
|
+
2. **Imports Tree View** for direct links to implementations
|
|
31
|
+
3. **Exports Tree View** for direct links to import & usage locations
|
|
32
|
+
|
|
33
|
+
Find [Knip on the VS Code Marketplace][5].
|
|
34
|
+
|
|
35
|
+
## MCP Server
|
|
36
|
+
|
|
37
|
+
Configuring Knip has always been a major headache to many. No more. Tell your
|
|
38
|
+
coding agent to "configure knip" and it will RTFM so you don't have to. Using a
|
|
39
|
+
newer model like Opus 4.5 or GPT 5.2 results in an optimized `knip.json` file
|
|
40
|
+
and an uncluttered codebase.
|
|
41
|
+
|
|
42
|
+
The [MCP Server is available][6] separately and built into the VS Code
|
|
43
|
+
Extension.
|
|
44
|
+
|
|
45
|
+
## Language Server
|
|
46
|
+
|
|
47
|
+
The VS Code Extension and the MCP Server are powered by the new Language Server.
|
|
48
|
+
It's a custom server that builds the full module graph of your project, and
|
|
49
|
+
provides a session with a graph explorer to request all sorts of interesting
|
|
50
|
+
information. Queries like "where is an export imported" or "is this import part
|
|
51
|
+
of a circular dependency" are just scratching the surface here.
|
|
52
|
+
|
|
53
|
+
Extensions for other IDEs can be built on top. See
|
|
54
|
+
[language-server/README.md][7]
|
|
55
|
+
|
|
56
|
+
## Screenshots
|
|
57
|
+
|
|
58
|
+
- [Lint Findings][3]
|
|
59
|
+
- [Imports & Exports][4]
|
|
60
|
+
- [Contention][8]
|
|
61
|
+
- [Circular Dependencies][9]
|
|
62
|
+
- [Conflicts][10]
|
|
63
|
+
- [Branching][11]
|
|
64
|
+
- [VS Code Extension Settings][12]
|
|
65
|
+
|
|
66
|
+
### Lint Findings
|
|
67
|
+
|
|
68
|
+
![Lint Findings][13]
|
|
69
|
+
|
|
70
|
+
### Imports & Exports
|
|
71
|
+
|
|
72
|
+
![hover][14]
|
|
73
|
+
|
|
74
|
+
### Contention
|
|
75
|
+
|
|
76
|
+
The IDE extension shows extra issues in the tree views like circular
|
|
77
|
+
dependencies. We're starting out with some extra novelties like conflicting and
|
|
78
|
+
branched/diamond-shaped import chains.
|
|
79
|
+
|
|
80
|
+
#### Circular Dependencies
|
|
81
|
+
|
|
82
|
+
If an import is part of a circular dependency, Knip will display:
|
|
83
|
+
|
|
84
|
+
![Circular Dependencies][15]
|
|
85
|
+
|
|
86
|
+
#### Conflicts
|
|
87
|
+
|
|
88
|
+
TypeScript shows direct conflicts when importing or re-exporting the same named
|
|
89
|
+
export from different files. Except when the problem is more subtle and the
|
|
90
|
+
chain spans more than one file. Knip warns:
|
|
91
|
+
|
|
92
|
+
![Conflicts][16]
|
|
93
|
+
|
|
94
|
+
#### Branching
|
|
95
|
+
|
|
96
|
+
Branched or diamond-shaped imports chains indicate unnecessary re-exports and
|
|
97
|
+
complexity. They help to untangle large codebases and shrink or get rid of
|
|
98
|
+
barrel files. Knip warns:
|
|
99
|
+
|
|
100
|
+
![Branching][17]
|
|
101
|
+
|
|
102
|
+
### VS Code Extension Settings
|
|
103
|
+
|
|
104
|
+
![VS Code Extension Settings][18]
|
|
105
|
+
|
|
106
|
+
[1]: https://github.com/webpro-nl/knip/network/dependents
|
|
107
|
+
[2]: https://www.npmjs.com/package/knip
|
|
108
|
+
[3]: #lint-findings
|
|
109
|
+
[4]: #imports--exports
|
|
110
|
+
[5]: https://marketplace.visualstudio.com/items?itemName=webpro.vscode-knip
|
|
111
|
+
[6]: https://www.npmjs.com/package/@knip/mcp
|
|
112
|
+
[7]:
|
|
113
|
+
https://github.com/webpro-nl/knip/blob/main/packages/language-server/README.md
|
|
114
|
+
[8]: #contention
|
|
115
|
+
[9]: #circular-dependencies
|
|
116
|
+
[10]: #conflicts
|
|
117
|
+
[11]: #branching
|
|
118
|
+
[12]: #vs-code-extension-settings
|
|
119
|
+
[13]: /screenshots/editors-and-agents/diagnostics.webp
|
|
120
|
+
[14]: /screenshots/editors-and-agents/imports-exports.webp
|
|
121
|
+
[15]: /screenshots/editors-and-agents/circular-dependency.webp
|
|
122
|
+
[16]: /screenshots/editors-and-agents/conflict.webp
|
|
123
|
+
[17]: /screenshots/editors-and-agents/branch.webp
|
|
124
|
+
[18]: /screenshots/editors-and-agents/vscode-extension-settings.webp
|
package/docs/blog/knip-v3.mdx
CHANGED
package/docs/blog/knip-v4.mdx
CHANGED
package/docs/blog/knip-v5.mdx
CHANGED
package/docs/blog/two-years.mdx
CHANGED
|
@@ -1,26 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Knip for Editors & Agents
|
|
3
|
-
date: 2025-12-
|
|
3
|
+
date: 2025-12-17
|
|
4
4
|
sidebar:
|
|
5
5
|
order: 1
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
_Published: 2025-12-
|
|
8
|
+
_Published: 2025-12-17_
|
|
9
|
+
|
|
10
|
+
Three years in, Knip has founds its place in [over 10.000 projects][1] and is
|
|
11
|
+
downloaded [over 18M times/month][2]. A long period of steady growth in usage
|
|
12
|
+
and stability allows Knip to become more accessible to more people. That's why
|
|
13
|
+
I'm excited and proud to introduce the brand new VS Code Extension **and** MCP
|
|
14
|
+
Server. For humans and coding agents alike, Knip will help keep your codebases
|
|
15
|
+
tidy.
|
|
16
|
+
|
|
17
|
+
Don't forget... Knip it before you ship it!
|
|
9
18
|
|
|
10
19
|
## VS Code Extension
|
|
11
20
|
|
|
12
21
|
This one is for you.
|
|
13
22
|
|
|
14
|
-
[The usual suspects][
|
|
23
|
+
[The usual suspects][3] like red squiggles for unused exports are there. What
|
|
15
24
|
really moves the needle for DX with Knip's module graph is **navigation**. A
|
|
16
25
|
completely unique way to view & fly through codebases for developers who care.
|
|
17
26
|
Connect the dots during development and refactors, while keeping things in
|
|
18
|
-
check. We're starting out with [3 key features][
|
|
27
|
+
check. We're starting out with [3 key features][4]:
|
|
19
28
|
|
|
20
29
|
1. **Hover over Export** for import & usage locations
|
|
21
30
|
2. **Imports Tree View** for direct links to implementations
|
|
22
31
|
3. **Exports Tree View** for direct links to import & usage locations
|
|
23
32
|
|
|
33
|
+
Find [Knip on the VS Code Marketplace][5].
|
|
34
|
+
|
|
24
35
|
## MCP Server
|
|
25
36
|
|
|
26
37
|
Configuring Knip has always been a major headache to many. No more. Tell your
|
|
@@ -28,7 +39,7 @@ coding agent to "configure knip" and it will RTFM so you don't have to. Using a
|
|
|
28
39
|
newer model like Opus 4.5 or GPT 5.2 results in an optimized `knip.json` file
|
|
29
40
|
and an uncluttered codebase.
|
|
30
41
|
|
|
31
|
-
The [MCP Server is available][
|
|
42
|
+
The [MCP Server is available][6] separately and built into the VS Code
|
|
32
43
|
Extension.
|
|
33
44
|
|
|
34
45
|
## Language Server
|
|
@@ -40,25 +51,25 @@ information. Queries like "where is an export imported" or "is this import part
|
|
|
40
51
|
of a circular dependency" are just scratching the surface here.
|
|
41
52
|
|
|
42
53
|
Extensions for other IDEs can be built on top. See
|
|
43
|
-
[language-server/README.md][
|
|
54
|
+
[language-server/README.md][7]
|
|
44
55
|
|
|
45
56
|
## Screenshots
|
|
46
57
|
|
|
47
|
-
- [Lint Findings][
|
|
48
|
-
- [Imports & Exports][
|
|
49
|
-
- [Contention][
|
|
50
|
-
- [Circular Dependencies][
|
|
51
|
-
- [Conflicts][
|
|
52
|
-
- [Branching][
|
|
53
|
-
- [VS Code Extension Settings][
|
|
58
|
+
- [Lint Findings][3]
|
|
59
|
+
- [Imports & Exports][4]
|
|
60
|
+
- [Contention][8]
|
|
61
|
+
- [Circular Dependencies][9]
|
|
62
|
+
- [Conflicts][10]
|
|
63
|
+
- [Branching][11]
|
|
64
|
+
- [VS Code Extension Settings][12]
|
|
54
65
|
|
|
55
66
|
### Lint Findings
|
|
56
67
|
|
|
57
|
-
![Lint Findings][
|
|
68
|
+
![Lint Findings][13]
|
|
58
69
|
|
|
59
70
|
### Imports & Exports
|
|
60
71
|
|
|
61
|
-
![hover][
|
|
72
|
+
![hover][14]
|
|
62
73
|
|
|
63
74
|
### Contention
|
|
64
75
|
|
|
@@ -70,7 +81,7 @@ branched/diamond-shaped import chains.
|
|
|
70
81
|
|
|
71
82
|
If an import is part of a circular dependency, Knip will display:
|
|
72
83
|
|
|
73
|
-
![Circular Dependencies][
|
|
84
|
+
![Circular Dependencies][15]
|
|
74
85
|
|
|
75
86
|
#### Conflicts
|
|
76
87
|
|
|
@@ -78,7 +89,7 @@ TypeScript shows direct conflicts when importing or re-exporting the same named
|
|
|
78
89
|
export from different files. Except when the problem is more subtle and the
|
|
79
90
|
chain spans more than one file. Knip warns:
|
|
80
91
|
|
|
81
|
-
![Conflicts][
|
|
92
|
+
![Conflicts][16]
|
|
82
93
|
|
|
83
94
|
#### Branching
|
|
84
95
|
|
|
@@ -86,24 +97,28 @@ Branched or diamond-shaped imports chains indicate unnecessary re-exports and
|
|
|
86
97
|
complexity. They help to untangle large codebases and shrink or get rid of
|
|
87
98
|
barrel files. Knip warns:
|
|
88
99
|
|
|
89
|
-
![Branching][
|
|
100
|
+
![Branching][17]
|
|
90
101
|
|
|
91
102
|
### VS Code Extension Settings
|
|
92
103
|
|
|
93
|
-
![VS Code Extension Settings][
|
|
94
|
-
|
|
95
|
-
[1]:
|
|
96
|
-
[2]:
|
|
97
|
-
[3]:
|
|
98
|
-
[4]:
|
|
99
|
-
[5]:
|
|
100
|
-
[6]:
|
|
101
|
-
[7]:
|
|
102
|
-
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
104
|
+
![VS Code Extension Settings][18]
|
|
105
|
+
|
|
106
|
+
[1]: https://github.com/webpro-nl/knip/network/dependents
|
|
107
|
+
[2]: https://www.npmjs.com/package/knip
|
|
108
|
+
[3]: #lint-findings
|
|
109
|
+
[4]: #imports--exports
|
|
110
|
+
[5]: https://marketplace.visualstudio.com/items?itemName=webpro.vscode-knip
|
|
111
|
+
[6]: https://www.npmjs.com/package/@knip/mcp
|
|
112
|
+
[7]:
|
|
113
|
+
https://github.com/webpro-nl/knip/blob/main/packages/language-server/README.md
|
|
114
|
+
[8]: #contention
|
|
115
|
+
[9]: #circular-dependencies
|
|
116
|
+
[10]: #conflicts
|
|
117
|
+
[11]: #branching
|
|
118
|
+
[12]: #vs-code-extension-settings
|
|
119
|
+
[13]: /screenshots/editors-and-agents/diagnostics.webp
|
|
120
|
+
[14]: /screenshots/editors-and-agents/imports-exports.webp
|
|
121
|
+
[15]: /screenshots/editors-and-agents/circular-dependency.webp
|
|
122
|
+
[16]: /screenshots/editors-and-agents/conflict.webp
|
|
123
|
+
[17]: /screenshots/editors-and-agents/branch.webp
|
|
124
|
+
[18]: /screenshots/editors-and-agents/vscode-extension-settings.webp
|
package/docs/index.mdx
CHANGED
|
@@ -12,6 +12,10 @@ hero:
|
|
|
12
12
|
link: ./overview/getting-started
|
|
13
13
|
icon: right-arrow
|
|
14
14
|
variant: primary
|
|
15
|
+
- text: 'NEW: Knip for Editors & Agents'
|
|
16
|
+
link: /blog/for-editors-and-agents
|
|
17
|
+
icon: rocket
|
|
18
|
+
variant: secondary
|
|
15
19
|
- text: View on GitHub
|
|
16
20
|
link: https://github.com/webpro-nl/knip
|
|
17
21
|
icon: external
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knip/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Knip MCP Server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
"src",
|
|
15
15
|
"docs"
|
|
16
16
|
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"prepack": "cp -r ../docs/src/content/docs ./docs"
|
|
19
|
+
},
|
|
17
20
|
"keywords": [
|
|
18
21
|
"knip",
|
|
19
22
|
"mcp",
|
|
@@ -28,11 +31,10 @@
|
|
|
28
31
|
"license": "ISC",
|
|
29
32
|
"dependencies": {
|
|
30
33
|
"@modelcontextprotocol/sdk": "^1.24.3",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
34
|
+
"knip": "^5.75.2",
|
|
35
|
+
"zod": "^4.1.11"
|
|
33
36
|
},
|
|
34
37
|
"engines": {
|
|
35
38
|
"node": ">=18.18.0"
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
+
}
|
|
40
|
+
}
|