@nitpicker/mcp-server 0.5.0
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/LICENSE +191 -0
- package/README.md +49 -0
- package/bin/nitpicker-mcp.js +4 -0
- package/lib/mcp-server.d.ts +35 -0
- package/lib/mcp-server.js +244 -0
- package/lib/tool-definitions.d.ts +7 -0
- package/lib/tool-definitions.js +314 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2025 D-ZERO Co., Ltd.
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @nitpicker/mcp-server
|
|
2
|
+
|
|
3
|
+
`.nitpicker` アーカイブファイルを AI アシスタントから操作するための MCP サーバー。
|
|
4
|
+
|
|
5
|
+
## 概要
|
|
6
|
+
|
|
7
|
+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) を介して、`.nitpicker` アーカイブの内容を AI アシスタント(Claude Desktop 等)から直接クエリできるサーバーです。stdio トランスポートで動作し、14 のツールを提供します。
|
|
8
|
+
|
|
9
|
+
内部では `@nitpicker/query` パッケージのクエリ関数を呼び出しています。
|
|
10
|
+
|
|
11
|
+
### 提供ツール
|
|
12
|
+
|
|
13
|
+
| ツール | 説明 |
|
|
14
|
+
| ------------------------ | ---------------------------------------------------- |
|
|
15
|
+
| `open_archive` | `.nitpicker` ファイルを読み込み、archiveId を返す |
|
|
16
|
+
| `close_archive` | アーカイブを閉じてリソースを解放 |
|
|
17
|
+
| `get_summary` | サイト全体の概要統計 |
|
|
18
|
+
| `list_pages` | ページ一覧(フィルタ・ソート・ページネーション対応) |
|
|
19
|
+
| `get_page_detail` | 特定ページの詳細情報 |
|
|
20
|
+
| `get_page_html` | HTML スナップショットの取得 |
|
|
21
|
+
| `list_links` | リンク分析(壊れたリンク、外部リンク、孤立ページ) |
|
|
22
|
+
| `list_resources` | サブリソース一覧(CSS、JS、画像、フォント) |
|
|
23
|
+
| `list_images` | 画像品質チェック(alt 欠落、サイズ欠落、過大画像) |
|
|
24
|
+
| `get_violations` | 分析プラグインの違反結果 |
|
|
25
|
+
| `find_duplicates` | メタデータ重複検出 |
|
|
26
|
+
| `find_mismatches` | メタデータ不一致検出 |
|
|
27
|
+
| `get_resource_referrers` | リソース参照元ページの検出 |
|
|
28
|
+
| `check_headers` | セキュリティヘッダー確認 |
|
|
29
|
+
|
|
30
|
+
## セットアップ
|
|
31
|
+
|
|
32
|
+
Claude Desktop の設定ファイルに以下を追加してください。
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"mcpServers": {
|
|
37
|
+
"nitpicker": {
|
|
38
|
+
"command": "npx",
|
|
39
|
+
"args": ["@nitpicker/mcp-server"]
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
このパッケージは [Nitpicker](../../README.md) モノレポの内部パッケージです。
|
|
46
|
+
|
|
47
|
+
## ライセンス
|
|
48
|
+
|
|
49
|
+
Apache-2.0
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates and configures the Nitpicker MCP server with all tools registered.
|
|
4
|
+
* Uses the low-level Server API to avoid deep type instantiation issues
|
|
5
|
+
* with McpServer + Zod schemas.
|
|
6
|
+
* @returns The configured Server instance.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createServer(): Server<{
|
|
9
|
+
method: string;
|
|
10
|
+
params?: {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
_meta?: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
progressToken?: string | number | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
} | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
method: string;
|
|
19
|
+
params?: {
|
|
20
|
+
[x: string]: unknown;
|
|
21
|
+
_meta?: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
} | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
_meta?: {
|
|
28
|
+
[x: string]: unknown;
|
|
29
|
+
} | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Starts the MCP server using stdio transport.
|
|
33
|
+
* This is the entry point for the `nitpicker-mcp` binary.
|
|
34
|
+
*/
|
|
35
|
+
export declare function startServer(): Promise<void>;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
+
import { ArchiveManager, checkHeaders, findDuplicates, findMismatches, getPageDetail, getPageHtml, getResourceReferrers, getSummary, getViolations, listImages, listLinks, listPages, listResources, } from '@nitpicker/query';
|
|
5
|
+
import { toolDefinitions } from './tool-definitions.js';
|
|
6
|
+
/**
|
|
7
|
+
* Validates that a required string argument is present and returns it.
|
|
8
|
+
* @param args - The arguments object.
|
|
9
|
+
* @param key - The argument key to validate.
|
|
10
|
+
* @returns The validated string value.
|
|
11
|
+
* @throws {Error} If the argument is missing or not a string.
|
|
12
|
+
*/
|
|
13
|
+
function requireString(args, key) {
|
|
14
|
+
const value = args[key];
|
|
15
|
+
if (typeof value !== 'string' || value === '') {
|
|
16
|
+
throw new Error(`Missing required argument: ${key}`);
|
|
17
|
+
}
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Extracts an optional number argument with validation.
|
|
22
|
+
* @param args - The arguments object.
|
|
23
|
+
* @param key - The argument key.
|
|
24
|
+
* @returns The number value, or undefined if not present.
|
|
25
|
+
* @throws {Error} If the value is present but not a valid number.
|
|
26
|
+
*/
|
|
27
|
+
function optionalNumber(args, key) {
|
|
28
|
+
const value = args[key];
|
|
29
|
+
if (value == null) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const num = Number(value);
|
|
33
|
+
if (Number.isNaN(num)) {
|
|
34
|
+
throw new TypeError(`Invalid number for argument: ${key}`);
|
|
35
|
+
}
|
|
36
|
+
return num;
|
|
37
|
+
}
|
|
38
|
+
/** Valid link analysis types. */
|
|
39
|
+
const VALID_LINK_TYPES = ['broken', 'external', 'orphaned'];
|
|
40
|
+
/** Valid mismatch types. */
|
|
41
|
+
const VALID_MISMATCH_TYPES = ['canonical', 'og:title', 'og:description'];
|
|
42
|
+
/** Valid duplicate check fields. */
|
|
43
|
+
const VALID_DUPLICATE_FIELDS = ['title', 'description'];
|
|
44
|
+
/**
|
|
45
|
+
* Validates that a string argument is one of the allowed values.
|
|
46
|
+
* @param value - The string value to validate.
|
|
47
|
+
* @param allowed - The list of allowed values.
|
|
48
|
+
* @param label - A label for the argument (used in error messages).
|
|
49
|
+
* @returns The validated value cast to the correct type.
|
|
50
|
+
* @throws {Error} If the value is not in the allowed list.
|
|
51
|
+
*/
|
|
52
|
+
function validateEnum(value, allowed, label) {
|
|
53
|
+
if (!allowed.includes(value)) {
|
|
54
|
+
throw new Error(`Invalid ${label}: "${value}". Must be one of: ${allowed.join(', ')}`);
|
|
55
|
+
}
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Returns a shallow copy of args with the specified keys removed.
|
|
60
|
+
* @param args - The arguments object.
|
|
61
|
+
* @param keys - The keys to exclude.
|
|
62
|
+
* @returns A new object without the specified keys.
|
|
63
|
+
*/
|
|
64
|
+
function omit(args, ...keys) {
|
|
65
|
+
const result = {};
|
|
66
|
+
for (const [key, value] of Object.entries(args)) {
|
|
67
|
+
if (!keys.includes(key)) {
|
|
68
|
+
result[key] = value;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return result;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Creates and configures the Nitpicker MCP server with all tools registered.
|
|
75
|
+
* Uses the low-level Server API to avoid deep type instantiation issues
|
|
76
|
+
* with McpServer + Zod schemas.
|
|
77
|
+
* @returns The configured Server instance.
|
|
78
|
+
*/
|
|
79
|
+
export function createServer() {
|
|
80
|
+
const manager = new ArchiveManager();
|
|
81
|
+
const server = new Server({ name: 'nitpicker', version: '0.4.4' }, { capabilities: { tools: {} } });
|
|
82
|
+
server.setRequestHandler(ListToolsRequestSchema, () => Promise.resolve({ tools: toolDefinitions }));
|
|
83
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
84
|
+
const { name } = request.params;
|
|
85
|
+
const args = request.params.arguments ?? {};
|
|
86
|
+
try {
|
|
87
|
+
switch (name) {
|
|
88
|
+
case 'open_archive': {
|
|
89
|
+
const filePath = requireString(args, 'filePath');
|
|
90
|
+
const { archiveId, accessor } = await manager.open(filePath);
|
|
91
|
+
const summary = await getSummary(accessor);
|
|
92
|
+
return jsonResult({
|
|
93
|
+
archiveId,
|
|
94
|
+
baseUrl: summary.baseUrl,
|
|
95
|
+
totalPages: summary.totalPages,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
case 'close_archive': {
|
|
99
|
+
const archiveId = requireString(args, 'archiveId');
|
|
100
|
+
await manager.close(archiveId);
|
|
101
|
+
return textResult('Archive closed successfully.');
|
|
102
|
+
}
|
|
103
|
+
case 'get_summary': {
|
|
104
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
105
|
+
return jsonResult(await getSummary(accessor));
|
|
106
|
+
}
|
|
107
|
+
case 'list_pages': {
|
|
108
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
109
|
+
return jsonResult(await listPages(accessor, omit(args, 'archiveId')));
|
|
110
|
+
}
|
|
111
|
+
case 'get_page_detail': {
|
|
112
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
113
|
+
const url = requireString(args, 'url');
|
|
114
|
+
const result = await getPageDetail(accessor, url);
|
|
115
|
+
if (!result) {
|
|
116
|
+
return textResult('Page not found.');
|
|
117
|
+
}
|
|
118
|
+
return jsonResult(result);
|
|
119
|
+
}
|
|
120
|
+
case 'get_page_html': {
|
|
121
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
122
|
+
const url = requireString(args, 'url');
|
|
123
|
+
const maxLength = optionalNumber(args, 'maxLength');
|
|
124
|
+
const result = await getPageHtml(accessor, url, maxLength);
|
|
125
|
+
if (!result) {
|
|
126
|
+
return textResult('HTML snapshot not found.');
|
|
127
|
+
}
|
|
128
|
+
const text = result.truncated
|
|
129
|
+
? `[Truncated to ${maxLength ?? 100_000} chars]\n${result.html}`
|
|
130
|
+
: result.html;
|
|
131
|
+
return textResult(text);
|
|
132
|
+
}
|
|
133
|
+
case 'list_links': {
|
|
134
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
135
|
+
const type = validateEnum(requireString(args, 'type'), VALID_LINK_TYPES, 'link type');
|
|
136
|
+
const linkOpts = omit(args, 'archiveId');
|
|
137
|
+
return jsonResult(await listLinks(accessor, {
|
|
138
|
+
...linkOpts,
|
|
139
|
+
type,
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
case 'list_resources': {
|
|
143
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
144
|
+
return jsonResult(await listResources(accessor, omit(args, 'archiveId')));
|
|
145
|
+
}
|
|
146
|
+
case 'list_images': {
|
|
147
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
148
|
+
return jsonResult(await listImages(accessor, omit(args, 'archiveId')));
|
|
149
|
+
}
|
|
150
|
+
case 'get_violations': {
|
|
151
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
152
|
+
return jsonResult(await getViolations(accessor, omit(args, 'archiveId')));
|
|
153
|
+
}
|
|
154
|
+
case 'find_duplicates': {
|
|
155
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
156
|
+
const field = args.field
|
|
157
|
+
? validateEnum(String(args.field), VALID_DUPLICATE_FIELDS, 'field')
|
|
158
|
+
: undefined;
|
|
159
|
+
return jsonResult(await findDuplicates(accessor, field, optionalNumber(args, 'limit')));
|
|
160
|
+
}
|
|
161
|
+
case 'find_mismatches': {
|
|
162
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
163
|
+
const type = validateEnum(requireString(args, 'type'), VALID_MISMATCH_TYPES, 'mismatch type');
|
|
164
|
+
return jsonResult(await findMismatches(accessor, type, optionalNumber(args, 'limit'), optionalNumber(args, 'offset')));
|
|
165
|
+
}
|
|
166
|
+
case 'get_resource_referrers': {
|
|
167
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
168
|
+
const resourceUrl = requireString(args, 'resourceUrl');
|
|
169
|
+
const result = await getResourceReferrers(accessor, resourceUrl);
|
|
170
|
+
if (!result) {
|
|
171
|
+
return textResult('Resource not found.');
|
|
172
|
+
}
|
|
173
|
+
return jsonResult(result);
|
|
174
|
+
}
|
|
175
|
+
case 'check_headers': {
|
|
176
|
+
const accessor = manager.get(requireString(args, 'archiveId'));
|
|
177
|
+
return jsonResult(await checkHeaders(accessor, omit(args, 'archiveId')));
|
|
178
|
+
}
|
|
179
|
+
default: {
|
|
180
|
+
return {
|
|
181
|
+
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
|
182
|
+
isError: true,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
catch (error) {
|
|
188
|
+
return errorResult(error);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
return server;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Starts the MCP server using stdio transport.
|
|
195
|
+
* This is the entry point for the `nitpicker-mcp` binary.
|
|
196
|
+
*/
|
|
197
|
+
export async function startServer() {
|
|
198
|
+
const server = createServer();
|
|
199
|
+
const transport = new StdioServerTransport();
|
|
200
|
+
await server.connect(transport);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Formats a successful result as JSON text content.
|
|
204
|
+
* @param data - The data to serialize.
|
|
205
|
+
* @returns MCP tool result with JSON text content.
|
|
206
|
+
*/
|
|
207
|
+
function jsonResult(data) {
|
|
208
|
+
return {
|
|
209
|
+
content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Formats a plain text result.
|
|
214
|
+
* @param text - The text content.
|
|
215
|
+
* @returns MCP tool result with text content.
|
|
216
|
+
*/
|
|
217
|
+
function textResult(text) {
|
|
218
|
+
return {
|
|
219
|
+
content: [{ type: 'text', text }],
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Sanitizes an error message by removing absolute file paths
|
|
224
|
+
* to avoid leaking internal directory structures.
|
|
225
|
+
* @param message - The raw error message.
|
|
226
|
+
* @returns The sanitized message.
|
|
227
|
+
*/
|
|
228
|
+
function sanitizeErrorMessage(message) {
|
|
229
|
+
return message.replaceAll(/(?:\/[^\s'",)]+){2,}/g, '<path>');
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Formats an error as an MCP tool error result.
|
|
233
|
+
* Error messages are sanitized to avoid leaking internal paths.
|
|
234
|
+
* @param error - The error to format.
|
|
235
|
+
* @returns MCP tool error result with the sanitized error message.
|
|
236
|
+
*/
|
|
237
|
+
function errorResult(error) {
|
|
238
|
+
const rawMessage = error instanceof Error ? error.message : String(error);
|
|
239
|
+
const message = sanitizeErrorMessage(rawMessage);
|
|
240
|
+
return {
|
|
241
|
+
content: [{ type: 'text', text: `Error: ${message}` }],
|
|
242
|
+
isError: true,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* All MCP tool definitions for the Nitpicker archive query server.
|
|
4
|
+
* Each tool includes a name, description with LLM guidance, and JSON Schema
|
|
5
|
+
* for its input parameters.
|
|
6
|
+
*/
|
|
7
|
+
export declare const toolDefinitions: Tool[];
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All MCP tool definitions for the Nitpicker archive query server.
|
|
3
|
+
* Each tool includes a name, description with LLM guidance, and JSON Schema
|
|
4
|
+
* for its input parameters.
|
|
5
|
+
*/
|
|
6
|
+
export const toolDefinitions = [
|
|
7
|
+
{
|
|
8
|
+
name: 'open_archive',
|
|
9
|
+
description: 'Load a .nitpicker archive file for querying. Returns an archiveId to use with other tools. Always call this first before using any other tools.',
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
filePath: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Absolute or relative path to the .nitpicker archive file',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
required: ['filePath'],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'close_archive',
|
|
23
|
+
description: 'Close a previously opened archive and release its resources.',
|
|
24
|
+
inputSchema: {
|
|
25
|
+
type: 'object',
|
|
26
|
+
properties: {
|
|
27
|
+
archiveId: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'The archive ID returned by open_archive',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
required: ['archiveId'],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'get_summary',
|
|
37
|
+
description: 'Get site-wide overview: total pages, internal/external counts, HTTP status distribution, and metadata fulfillment rates (title, description, OG tags). Use this first to understand the archive contents.',
|
|
38
|
+
inputSchema: {
|
|
39
|
+
type: 'object',
|
|
40
|
+
properties: {
|
|
41
|
+
archiveId: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'The archive ID returned by open_archive',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
required: ['archiveId'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'list_pages',
|
|
51
|
+
description: 'List pages with rich filtering: by status code (exact or range), missing metadata (title, description), noindex flag, URL patterns, directory paths. Supports sorting and pagination. Use for questions like "show me all 404 pages" or "pages without descriptions".',
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: 'object',
|
|
54
|
+
properties: {
|
|
55
|
+
archiveId: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: 'The archive ID returned by open_archive',
|
|
58
|
+
},
|
|
59
|
+
status: { type: 'number', description: 'Filter by exact HTTP status code' },
|
|
60
|
+
statusMin: {
|
|
61
|
+
type: 'number',
|
|
62
|
+
description: 'Filter by minimum status code (inclusive)',
|
|
63
|
+
},
|
|
64
|
+
statusMax: {
|
|
65
|
+
type: 'number',
|
|
66
|
+
description: 'Filter by maximum status code (inclusive)',
|
|
67
|
+
},
|
|
68
|
+
isExternal: {
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
description: 'Filter by external (true) or internal (false)',
|
|
71
|
+
},
|
|
72
|
+
missingTitle: { type: 'boolean', description: 'Filter to pages missing title' },
|
|
73
|
+
missingDescription: {
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
description: 'Filter to pages missing description',
|
|
76
|
+
},
|
|
77
|
+
noindex: { type: 'boolean', description: 'Filter to pages with noindex set' },
|
|
78
|
+
urlPattern: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
description: 'URL pattern to search (SQL LIKE: use % as wildcard)',
|
|
81
|
+
},
|
|
82
|
+
directory: { type: 'string', description: 'Directory path prefix to filter by' },
|
|
83
|
+
sortBy: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
enum: ['url', 'status', 'title'],
|
|
86
|
+
description: 'Field to sort by',
|
|
87
|
+
},
|
|
88
|
+
sortOrder: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
enum: ['asc', 'desc'],
|
|
91
|
+
description: 'Sort direction',
|
|
92
|
+
},
|
|
93
|
+
limit: { type: 'number', description: 'Max results to return (default: 100)' },
|
|
94
|
+
offset: { type: 'number', description: 'Number of results to skip (default: 0)' },
|
|
95
|
+
},
|
|
96
|
+
required: ['archiveId'],
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'get_page_detail',
|
|
101
|
+
description: 'Get full details for a specific page URL: all metadata (title, description, OG, Twitter), outbound links, inbound links, redirects, response headers. Use when drilling down into a specific page.',
|
|
102
|
+
inputSchema: {
|
|
103
|
+
type: 'object',
|
|
104
|
+
properties: {
|
|
105
|
+
archiveId: {
|
|
106
|
+
type: 'string',
|
|
107
|
+
description: 'The archive ID returned by open_archive',
|
|
108
|
+
},
|
|
109
|
+
url: { type: 'string', description: 'The exact URL of the page to retrieve' },
|
|
110
|
+
},
|
|
111
|
+
required: ['archiveId', 'url'],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'get_page_html',
|
|
116
|
+
description: 'Retrieve the saved HTML snapshot of a page. Returns the raw HTML content. Use maxLength to limit size for large pages. Useful for inspecting actual page structure and content.',
|
|
117
|
+
inputSchema: {
|
|
118
|
+
type: 'object',
|
|
119
|
+
properties: {
|
|
120
|
+
archiveId: {
|
|
121
|
+
type: 'string',
|
|
122
|
+
description: 'The archive ID returned by open_archive',
|
|
123
|
+
},
|
|
124
|
+
url: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
description: 'The exact URL of the page whose HTML to retrieve',
|
|
127
|
+
},
|
|
128
|
+
maxLength: {
|
|
129
|
+
type: 'number',
|
|
130
|
+
description: 'Max characters to return (default: 100000)',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
required: ['archiveId', 'url'],
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: 'list_links',
|
|
138
|
+
description: 'Analyze links: find broken links (4xx/5xx status), external links, or orphaned pages (no incoming links). Use for link health checks and site structure analysis.',
|
|
139
|
+
inputSchema: {
|
|
140
|
+
type: 'object',
|
|
141
|
+
properties: {
|
|
142
|
+
archiveId: {
|
|
143
|
+
type: 'string',
|
|
144
|
+
description: 'The archive ID returned by open_archive',
|
|
145
|
+
},
|
|
146
|
+
type: {
|
|
147
|
+
type: 'string',
|
|
148
|
+
enum: ['broken', 'external', 'orphaned'],
|
|
149
|
+
description: 'Type of link analysis: broken (4xx/5xx), external, or orphaned (no inbound links)',
|
|
150
|
+
},
|
|
151
|
+
limit: { type: 'number', description: 'Max results (default: 100)' },
|
|
152
|
+
offset: { type: 'number', description: 'Results to skip (default: 0)' },
|
|
153
|
+
},
|
|
154
|
+
required: ['archiveId', 'type'],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'list_resources',
|
|
159
|
+
description: 'List sub-resources (CSS, JS, images, fonts) with filtering by content type and origin. Shows compression and CDN status. Use for tech stack analysis, library detection (jQuery, React), and performance checks.',
|
|
160
|
+
inputSchema: {
|
|
161
|
+
type: 'object',
|
|
162
|
+
properties: {
|
|
163
|
+
archiveId: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: 'The archive ID returned by open_archive',
|
|
166
|
+
},
|
|
167
|
+
contentType: {
|
|
168
|
+
type: 'string',
|
|
169
|
+
description: 'Filter by content type prefix (e.g., "text/css", "application/javascript")',
|
|
170
|
+
},
|
|
171
|
+
isExternal: {
|
|
172
|
+
type: 'boolean',
|
|
173
|
+
description: 'Filter by external (true) or internal (false)',
|
|
174
|
+
},
|
|
175
|
+
limit: { type: 'number', description: 'Max results (default: 100)' },
|
|
176
|
+
offset: { type: 'number', description: 'Results to skip (default: 0)' },
|
|
177
|
+
},
|
|
178
|
+
required: ['archiveId'],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'list_images',
|
|
183
|
+
description: 'List images with quality checks: missing alt text, missing width/height dimensions, oversized images (exceeding threshold). Use for accessibility and performance auditing.',
|
|
184
|
+
inputSchema: {
|
|
185
|
+
type: 'object',
|
|
186
|
+
properties: {
|
|
187
|
+
archiveId: {
|
|
188
|
+
type: 'string',
|
|
189
|
+
description: 'The archive ID returned by open_archive',
|
|
190
|
+
},
|
|
191
|
+
missingAlt: {
|
|
192
|
+
type: 'boolean',
|
|
193
|
+
description: 'Filter to images missing alt attribute',
|
|
194
|
+
},
|
|
195
|
+
missingDimensions: {
|
|
196
|
+
type: 'boolean',
|
|
197
|
+
description: 'Filter to images missing width/height',
|
|
198
|
+
},
|
|
199
|
+
oversizedThreshold: {
|
|
200
|
+
type: 'number',
|
|
201
|
+
description: 'Filter to images with naturalWidth or naturalHeight exceeding this pixel count',
|
|
202
|
+
},
|
|
203
|
+
urlPattern: {
|
|
204
|
+
type: 'string',
|
|
205
|
+
description: 'Filter source URLs by pattern (SQL LIKE)',
|
|
206
|
+
},
|
|
207
|
+
limit: { type: 'number', description: 'Max results (default: 100)' },
|
|
208
|
+
offset: { type: 'number', description: 'Results to skip (default: 0)' },
|
|
209
|
+
},
|
|
210
|
+
required: ['archiveId'],
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'get_violations',
|
|
215
|
+
description: 'Get analysis violations from plugins (axe, markuplint, textlint, lighthouse). Filter by validator, severity, or rule. Use for accessibility and code quality reports.',
|
|
216
|
+
inputSchema: {
|
|
217
|
+
type: 'object',
|
|
218
|
+
properties: {
|
|
219
|
+
archiveId: {
|
|
220
|
+
type: 'string',
|
|
221
|
+
description: 'The archive ID returned by open_archive',
|
|
222
|
+
},
|
|
223
|
+
validator: {
|
|
224
|
+
type: 'string',
|
|
225
|
+
description: 'Filter by validator name (e.g., "axe", "markuplint", "textlint", "lighthouse")',
|
|
226
|
+
},
|
|
227
|
+
severity: { type: 'string', description: 'Filter by severity level' },
|
|
228
|
+
rule: { type: 'string', description: 'Filter by rule ID' },
|
|
229
|
+
limit: { type: 'number', description: 'Max results (default: 100)' },
|
|
230
|
+
offset: { type: 'number', description: 'Results to skip (default: 0)' },
|
|
231
|
+
},
|
|
232
|
+
required: ['archiveId'],
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: 'find_duplicates',
|
|
237
|
+
description: 'Find pages with identical title or description. Detects SEO issues where multiple pages share the same metadata. Use for deduplication audits.',
|
|
238
|
+
inputSchema: {
|
|
239
|
+
type: 'object',
|
|
240
|
+
properties: {
|
|
241
|
+
archiveId: {
|
|
242
|
+
type: 'string',
|
|
243
|
+
description: 'The archive ID returned by open_archive',
|
|
244
|
+
},
|
|
245
|
+
field: {
|
|
246
|
+
type: 'string',
|
|
247
|
+
enum: ['title', 'description'],
|
|
248
|
+
description: 'Metadata field to check for duplicates (default: "title")',
|
|
249
|
+
},
|
|
250
|
+
limit: { type: 'number', description: 'Max duplicate groups (default: 50)' },
|
|
251
|
+
},
|
|
252
|
+
required: ['archiveId'],
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: 'find_mismatches',
|
|
257
|
+
description: 'Find metadata mismatches: canonical URL ≠ page URL, og:title ≠ title, og:description ≠ description. Use for SEO consistency checks.',
|
|
258
|
+
inputSchema: {
|
|
259
|
+
type: 'object',
|
|
260
|
+
properties: {
|
|
261
|
+
archiveId: {
|
|
262
|
+
type: 'string',
|
|
263
|
+
description: 'The archive ID returned by open_archive',
|
|
264
|
+
},
|
|
265
|
+
type: {
|
|
266
|
+
type: 'string',
|
|
267
|
+
enum: ['canonical', 'og:title', 'og:description'],
|
|
268
|
+
description: 'Type of mismatch: canonical (canonical≠URL), og:title (og:title≠title), og:description (og:description≠description)',
|
|
269
|
+
},
|
|
270
|
+
limit: { type: 'number', description: 'Max results (default: 100)' },
|
|
271
|
+
offset: { type: 'number', description: 'Results to skip (default: 0)' },
|
|
272
|
+
},
|
|
273
|
+
required: ['archiveId', 'type'],
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: 'get_resource_referrers',
|
|
278
|
+
description: 'Find which pages reference a specific resource (CSS, JS, image). Useful for impact analysis when considering removal or updates of a resource.',
|
|
279
|
+
inputSchema: {
|
|
280
|
+
type: 'object',
|
|
281
|
+
properties: {
|
|
282
|
+
archiveId: {
|
|
283
|
+
type: 'string',
|
|
284
|
+
description: 'The archive ID returned by open_archive',
|
|
285
|
+
},
|
|
286
|
+
resourceUrl: {
|
|
287
|
+
type: 'string',
|
|
288
|
+
description: 'The exact URL of the resource to look up',
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
required: ['archiveId', 'resourceUrl'],
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: 'check_headers',
|
|
296
|
+
description: 'Check security HTTP headers (CSP, X-Frame-Options, X-Content-Type-Options, HSTS) for internal pages. Use missingOnly=true to find pages lacking security headers.',
|
|
297
|
+
inputSchema: {
|
|
298
|
+
type: 'object',
|
|
299
|
+
properties: {
|
|
300
|
+
archiveId: {
|
|
301
|
+
type: 'string',
|
|
302
|
+
description: 'The archive ID returned by open_archive',
|
|
303
|
+
},
|
|
304
|
+
missingOnly: {
|
|
305
|
+
type: 'boolean',
|
|
306
|
+
description: 'Only return pages missing at least one security header',
|
|
307
|
+
},
|
|
308
|
+
limit: { type: 'number', description: 'Max results (default: 100)' },
|
|
309
|
+
offset: { type: 'number', description: 'Results to skip (default: 0)' },
|
|
310
|
+
},
|
|
311
|
+
required: ['archiveId'],
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
];
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nitpicker/mcp-server",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "MCP server for querying .nitpicker archive files via AI assistants",
|
|
5
|
+
"author": "D-ZERO",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/d-zero-dev/nitpicker.git",
|
|
10
|
+
"directory": "packages/@nitpicker/mcp-server"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"bin",
|
|
17
|
+
"lib"
|
|
18
|
+
],
|
|
19
|
+
"type": "module",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"import": "./lib/mcp-server.js",
|
|
23
|
+
"types": "./lib/mcp-server.d.ts"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"nitpicker-mcp": "./bin/nitpicker-mcp.js"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsc",
|
|
31
|
+
"clean": "tsc --build --clean"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@modelcontextprotocol/sdk": "1.12.1",
|
|
35
|
+
"@nitpicker/query": "0.5.0"
|
|
36
|
+
},
|
|
37
|
+
"gitHead": "607d06bd596a0270d7088f32373d7367eb47ea94"
|
|
38
|
+
}
|