@isnow890/naver-search-mcp 1.0.4 → 1.0.6

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.
@@ -0,0 +1,11 @@
1
+ import { AxiosRequestConfig } from "axios";
2
+ import { NaverSearchConfig } from "../schemas/search.schemas.js";
3
+ export declare abstract class NaverApiCoreClient {
4
+ protected searchBaseUrl: string;
5
+ protected datalabBaseUrl: string;
6
+ protected config: NaverSearchConfig | null;
7
+ initialize(config: NaverSearchConfig): void;
8
+ protected getHeaders(contentType?: string): AxiosRequestConfig;
9
+ protected get<T>(url: string, params: any): Promise<T>;
10
+ protected post<T>(url: string, data: any): Promise<T>;
11
+ }
@@ -0,0 +1,70 @@
1
+ import { NaverApiCoreClient } from "./naver-api-core.client.js";
2
+ import { NaverSearchType, NaverSearchConfig, NaverLocalSearchParams, NaverDocumentSearchParams, SearchArgs } from "../schemas/search.schemas.js";
3
+ import { NaverDocumentSearchResponse, NaverLocalSearchResponse } from "../types/search.types.js";
4
+ import { DatalabSearchRequest, DatalabShoppingResponse, DatalabShoppingCategoryRequest, DatalabShoppingDeviceRequest, DatalabShoppingGenderRequest, DatalabShoppingAgeRequest, DatalabShoppingKeywordsRequest, DatalabShoppingKeywordRequest } from "../types/datalab.types.js";
5
+ /**
6
+ * NaverSearchClient - 네이버 API 서비스를 위한 싱글톤 클라이언트
7
+ * 검색, 데이터랩 API 요청 처리
8
+ */
9
+ export declare class NaverSearchClient extends NaverApiCoreClient {
10
+ private static instance;
11
+ private constructor();
12
+ /**
13
+ * 싱글톤 인스턴스 반환
14
+ */
15
+ static getInstance(): NaverSearchClient;
16
+ /**
17
+ * API 자격 증명으로 클라이언트 초기화
18
+ */
19
+ initialize(config: NaverSearchConfig): void;
20
+ /**
21
+ * 네이버 검색 API 호출 (type별로)
22
+ * @param type 검색 타입(카테고리)
23
+ * @param params 검색 파라미터
24
+ */
25
+ search(type: NaverSearchType, params: SearchArgs): Promise<any>;
26
+ /**
27
+ * 전문자료 검색 메서드
28
+ */
29
+ searchAcademic(params: NaverDocumentSearchParams): Promise<NaverDocumentSearchResponse>;
30
+ /**
31
+ * 지역 검색 메서드
32
+ */
33
+ searchLocal(params: NaverLocalSearchParams): Promise<NaverLocalSearchResponse>;
34
+ /**
35
+ * 검색어 트렌드 분석 메서드
36
+ */
37
+ searchTrend(params: DatalabSearchRequest): Promise<any>;
38
+ /**
39
+ * 쇼핑 카테고리 트렌드 분석 메서드
40
+ */
41
+ datalabShoppingCategory(params: DatalabShoppingCategoryRequest): Promise<DatalabShoppingResponse>;
42
+ /**
43
+ * 쇼핑 기기별 트렌드 분석 메서드
44
+ */
45
+ datalabShoppingByDevice(params: DatalabShoppingDeviceRequest): Promise<DatalabShoppingResponse>;
46
+ /**
47
+ * 쇼핑 성별 트렌드 분석 메서드
48
+ */
49
+ datalabShoppingByGender(params: DatalabShoppingGenderRequest): Promise<DatalabShoppingResponse>;
50
+ /**
51
+ * 쇼핑 연령별 트렌드 분석 메서드
52
+ */
53
+ datalabShoppingByAge(params: DatalabShoppingAgeRequest): Promise<DatalabShoppingResponse>;
54
+ /**
55
+ * 쇼핑 키워드 트렌드 분석 메서드
56
+ */
57
+ datalabShoppingKeywords(params: DatalabShoppingKeywordsRequest): Promise<DatalabShoppingResponse>;
58
+ /**
59
+ * 쇼핑 키워드 기기별 트렌드 분석 메서드
60
+ */
61
+ datalabShoppingKeywordByDevice(params: DatalabShoppingKeywordRequest): Promise<DatalabShoppingResponse>;
62
+ /**
63
+ * 쇼핑 키워드 성별 트렌드 분석 메서드
64
+ */
65
+ datalabShoppingKeywordByGender(params: DatalabShoppingKeywordRequest): Promise<DatalabShoppingResponse>;
66
+ /**
67
+ * 쇼핑 키워드 연령별 트렌드 분석 메서드
68
+ */
69
+ datalabShoppingKeywordByAge(params: DatalabShoppingKeywordRequest): Promise<DatalabShoppingResponse>;
70
+ }
@@ -0,0 +1,61 @@
1
+ import { DatalabSearch, DatalabShopping, DatalabShoppingDevice, DatalabShoppingGender, DatalabShoppingAge, DatalabShoppingKeywords, DatalabShoppingKeywordDevice, DatalabShoppingKeywordGender, DatalabShoppingKeywordAge } from "../schemas/datalab.schemas.js";
2
+ /**
3
+ * 데이터랩 도구 핸들러 맵
4
+ * 각 도구 이름을 키로, 실행할 핸들러 함수를 값으로 가짐
5
+ * index.ts에서 도구 실행 분기 없이 바로 사용
6
+ */
7
+ export declare const datalabToolHandlers: Record<string, (args: any) => Promise<any>>;
8
+ /**
9
+ * 검색어 트렌드 핸들러
10
+ * 네이버 데이터랩 검색어 트렌드 분석 API 호출
11
+ * @param params DatalabSearch
12
+ */
13
+ export declare function handleSearchTrend(params: DatalabSearch): Promise<any>;
14
+ /**
15
+ * 쇼핑 카테고리 트렌드 핸들러
16
+ * 네이버 데이터랩 쇼핑 카테고리별 트렌드 분석 API 호출
17
+ * @param params DatalabShopping
18
+ */
19
+ export declare function handleShoppingCategoryTrend(params: DatalabShopping): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
20
+ /**
21
+ * 쇼핑 기기별 트렌드 핸들러
22
+ * 네이버 데이터랩 쇼핑 기기별 트렌드 분석 API 호출
23
+ * @param params DatalabShoppingDevice
24
+ */
25
+ export declare function handleShoppingByDeviceTrend(params: DatalabShoppingDevice): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
26
+ /**
27
+ * 쇼핑 성별 트렌드 핸들러
28
+ * 네이버 데이터랩 쇼핑 성별 트렌드 분석 API 호출
29
+ * @param params DatalabShoppingGender
30
+ */
31
+ export declare function handleShoppingByGenderTrend(params: DatalabShoppingGender): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
32
+ /**
33
+ * 쇼핑 연령별 트렌드 핸들러
34
+ * 네이버 데이터랩 쇼핑 연령별 트렌드 분석 API 호출
35
+ * @param params DatalabShoppingAge
36
+ */
37
+ export declare function handleShoppingByAgeTrend(params: DatalabShoppingAge): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
38
+ /**
39
+ * 쇼핑 키워드 트렌드 핸들러 (복수 키워드 그룹 지원)
40
+ * 네이버 데이터랩 쇼핑 키워드 그룹 트렌드 분석 API 호출
41
+ * @param params DatalabShoppingKeywords
42
+ */
43
+ export declare function handleShoppingKeywordsTrend(params: DatalabShoppingKeywords): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
44
+ /**
45
+ * 쇼핑 키워드 기기별 트렌드 핸들러
46
+ * 네이버 데이터랩 쇼핑 키워드 기기별 트렌드 분석 API 호출
47
+ * @param params DatalabShoppingKeywordDevice
48
+ */
49
+ export declare function handleShoppingKeywordByDeviceTrend(params: DatalabShoppingKeywordDevice): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
50
+ /**
51
+ * 쇼핑 키워드 성별 트렌드 핸들러
52
+ * 네이버 데이터랩 쇼핑 키워드 성별 트렌드 분석 API 호출
53
+ * @param params DatalabShoppingKeywordGender
54
+ */
55
+ export declare function handleShoppingKeywordByGenderTrend(params: DatalabShoppingKeywordGender): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
56
+ /**
57
+ * 쇼핑 키워드 연령별 트렌드 핸들러
58
+ * 네이버 데이터랩 쇼핑 키워드 연령별 트렌드 분석 API 호출
59
+ * @param params DatalabShoppingKeywordAge
60
+ */
61
+ export declare function handleShoppingKeywordByAgeTrend(params: DatalabShoppingKeywordAge): Promise<import("../types/datalab.types.js").DatalabShoppingResponse>;
@@ -0,0 +1,44 @@
1
+ import { NaverLocalSearchParams } from "../schemas/search.schemas.js";
2
+ import { SearchArgs } from "../schemas/search.schemas.js";
3
+ export declare const searchToolHandlers: Record<string, (args: any) => Promise<any>>;
4
+ /**
5
+ * 전문자료 검색 핸들러
6
+ */
7
+ export declare function handleAcademicSearch(params: SearchArgs): Promise<import("../types/search.types.js").NaverDocumentSearchResponse>;
8
+ /**
9
+ * 도서 검색 핸들러
10
+ */
11
+ export declare function handleBookSearch(params: SearchArgs): Promise<any>;
12
+ /**
13
+ * 지식백과 검색 핸들러
14
+ */
15
+ export declare function handleEncycSearch(params: SearchArgs): Promise<any>;
16
+ /**
17
+ * 이미지 검색 핸들러
18
+ */
19
+ export declare function handleImageSearch(params: SearchArgs): Promise<any>;
20
+ /**
21
+ * 지식iN 검색 핸들러
22
+ */
23
+ export declare function handleKinSearch(params: SearchArgs): Promise<any>;
24
+ /**
25
+ * 지역 검색 핸들러
26
+ */
27
+ export declare function handleLocalSearch(params: NaverLocalSearchParams): Promise<import("../types/search.types.js").NaverLocalSearchResponse>;
28
+ /**
29
+ * 뉴스 검색 핸들러
30
+ */
31
+ export declare function handleNewsSearch(params: SearchArgs): Promise<any>;
32
+ /**
33
+ * 블로그 검색 핸들러
34
+ */
35
+ export declare function handleBlogSearch(params: SearchArgs): Promise<any>;
36
+ /**
37
+ * 쇼핑 검색 핸들러
38
+ */
39
+ export declare function handleShopSearch(params: SearchArgs): Promise<any>;
40
+ /**
41
+ * 카페글 검색 핸들러
42
+ */
43
+ export declare function handleCafeArticleSearch(params: SearchArgs): Promise<any>;
44
+ export declare function handleWebKrSearch(args: SearchArgs): Promise<any>;
@@ -0,0 +1 @@
1
+ export {};
package/dist/src/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import * as dotenv from "dotenv";
2
- import pkg from "../package.json" with { type: "json" };
3
2
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
4
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
4
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
@@ -25,7 +24,7 @@ client.initialize({
25
24
  // MCP 서버 인스턴스 생성
26
25
  const server = new Server({
27
26
  name: "naver-search",
28
- version: pkg.version,
27
+ version: "1.0.6",
29
28
  }, {
30
29
  capabilities: {
31
30
  tools: {},
@@ -0,0 +1,336 @@
1
+ import { z } from "zod";
2
+ export declare const DatalabBaseSchema: z.ZodObject<{
3
+ startDate: z.ZodString;
4
+ endDate: z.ZodString;
5
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ startDate: string;
8
+ endDate: string;
9
+ timeUnit: "date" | "week" | "month";
10
+ }, {
11
+ startDate: string;
12
+ endDate: string;
13
+ timeUnit: "date" | "week" | "month";
14
+ }>;
15
+ export declare const DatalabSearchSchema: z.ZodObject<z.objectUtil.extendShape<{
16
+ startDate: z.ZodString;
17
+ endDate: z.ZodString;
18
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
19
+ }, {
20
+ keywordGroups: z.ZodArray<z.ZodObject<{
21
+ groupName: z.ZodString;
22
+ keywords: z.ZodArray<z.ZodString, "many">;
23
+ }, "strip", z.ZodTypeAny, {
24
+ groupName: string;
25
+ keywords: string[];
26
+ }, {
27
+ groupName: string;
28
+ keywords: string[];
29
+ }>, "many">;
30
+ }>, "strip", z.ZodTypeAny, {
31
+ startDate: string;
32
+ endDate: string;
33
+ timeUnit: "date" | "week" | "month";
34
+ keywordGroups: {
35
+ groupName: string;
36
+ keywords: string[];
37
+ }[];
38
+ }, {
39
+ startDate: string;
40
+ endDate: string;
41
+ timeUnit: "date" | "week" | "month";
42
+ keywordGroups: {
43
+ groupName: string;
44
+ keywords: string[];
45
+ }[];
46
+ }>;
47
+ export declare const DatalabShoppingSchema: z.ZodObject<z.objectUtil.extendShape<{
48
+ startDate: z.ZodString;
49
+ endDate: z.ZodString;
50
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
51
+ }, {
52
+ category: z.ZodArray<z.ZodObject<{
53
+ name: z.ZodString;
54
+ param: z.ZodArray<z.ZodString, "many">;
55
+ }, "strip", z.ZodTypeAny, {
56
+ name: string;
57
+ param: string[];
58
+ }, {
59
+ name: string;
60
+ param: string[];
61
+ }>, "many">;
62
+ }>, "strip", z.ZodTypeAny, {
63
+ startDate: string;
64
+ endDate: string;
65
+ timeUnit: "date" | "week" | "month";
66
+ category: {
67
+ name: string;
68
+ param: string[];
69
+ }[];
70
+ }, {
71
+ startDate: string;
72
+ endDate: string;
73
+ timeUnit: "date" | "week" | "month";
74
+ category: {
75
+ name: string;
76
+ param: string[];
77
+ }[];
78
+ }>;
79
+ export declare const DatalabShoppingDeviceSchema: z.ZodObject<z.objectUtil.extendShape<{
80
+ startDate: z.ZodString;
81
+ endDate: z.ZodString;
82
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
83
+ }, {
84
+ category: z.ZodString;
85
+ device: z.ZodEnum<["pc", "mo"]>;
86
+ }>, "strip", z.ZodTypeAny, {
87
+ startDate: string;
88
+ endDate: string;
89
+ timeUnit: "date" | "week" | "month";
90
+ category: string;
91
+ device: "pc" | "mo";
92
+ }, {
93
+ startDate: string;
94
+ endDate: string;
95
+ timeUnit: "date" | "week" | "month";
96
+ category: string;
97
+ device: "pc" | "mo";
98
+ }>;
99
+ export declare const DatalabShoppingGenderSchema: z.ZodObject<z.objectUtil.extendShape<{
100
+ startDate: z.ZodString;
101
+ endDate: z.ZodString;
102
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
103
+ }, {
104
+ category: z.ZodString;
105
+ gender: z.ZodEnum<["f", "m"]>;
106
+ }>, "strip", z.ZodTypeAny, {
107
+ startDate: string;
108
+ endDate: string;
109
+ timeUnit: "date" | "week" | "month";
110
+ category: string;
111
+ gender: "f" | "m";
112
+ }, {
113
+ startDate: string;
114
+ endDate: string;
115
+ timeUnit: "date" | "week" | "month";
116
+ category: string;
117
+ gender: "f" | "m";
118
+ }>;
119
+ export declare const DatalabShoppingAgeSchema: z.ZodObject<z.objectUtil.extendShape<{
120
+ startDate: z.ZodString;
121
+ endDate: z.ZodString;
122
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
123
+ }, {
124
+ category: z.ZodString;
125
+ ages: z.ZodArray<z.ZodEnum<["10", "20", "30", "40", "50", "60"]>, "many">;
126
+ }>, "strip", z.ZodTypeAny, {
127
+ startDate: string;
128
+ endDate: string;
129
+ timeUnit: "date" | "week" | "month";
130
+ category: string;
131
+ ages: ("10" | "20" | "30" | "40" | "50" | "60")[];
132
+ }, {
133
+ startDate: string;
134
+ endDate: string;
135
+ timeUnit: "date" | "week" | "month";
136
+ category: string;
137
+ ages: ("10" | "20" | "30" | "40" | "50" | "60")[];
138
+ }>;
139
+ export declare const DatalabShoppingKeywordsSchema: z.ZodObject<z.objectUtil.extendShape<{
140
+ startDate: z.ZodString;
141
+ endDate: z.ZodString;
142
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
143
+ }, {
144
+ category: z.ZodString;
145
+ keyword: z.ZodArray<z.ZodObject<{
146
+ name: z.ZodString;
147
+ param: z.ZodArray<z.ZodString, "many">;
148
+ }, "strip", z.ZodTypeAny, {
149
+ name: string;
150
+ param: string[];
151
+ }, {
152
+ name: string;
153
+ param: string[];
154
+ }>, "many">;
155
+ }>, "strip", z.ZodTypeAny, {
156
+ startDate: string;
157
+ endDate: string;
158
+ timeUnit: "date" | "week" | "month";
159
+ category: string;
160
+ keyword: {
161
+ name: string;
162
+ param: string[];
163
+ }[];
164
+ }, {
165
+ startDate: string;
166
+ endDate: string;
167
+ timeUnit: "date" | "week" | "month";
168
+ category: string;
169
+ keyword: {
170
+ name: string;
171
+ param: string[];
172
+ }[];
173
+ }>;
174
+ export declare const DatalabShoppingKeywordDeviceSchema: z.ZodObject<z.objectUtil.extendShape<{
175
+ startDate: z.ZodString;
176
+ endDate: z.ZodString;
177
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
178
+ }, {
179
+ category: z.ZodString;
180
+ keyword: z.ZodString;
181
+ device: z.ZodEnum<["pc", "mo"]>;
182
+ }>, "strip", z.ZodTypeAny, {
183
+ startDate: string;
184
+ endDate: string;
185
+ timeUnit: "date" | "week" | "month";
186
+ category: string;
187
+ device: "pc" | "mo";
188
+ keyword: string;
189
+ }, {
190
+ startDate: string;
191
+ endDate: string;
192
+ timeUnit: "date" | "week" | "month";
193
+ category: string;
194
+ device: "pc" | "mo";
195
+ keyword: string;
196
+ }>;
197
+ export declare const DatalabShoppingKeywordGenderSchema: z.ZodObject<z.objectUtil.extendShape<{
198
+ startDate: z.ZodString;
199
+ endDate: z.ZodString;
200
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
201
+ }, {
202
+ category: z.ZodString;
203
+ keyword: z.ZodString;
204
+ gender: z.ZodEnum<["f", "m"]>;
205
+ }>, "strip", z.ZodTypeAny, {
206
+ startDate: string;
207
+ endDate: string;
208
+ timeUnit: "date" | "week" | "month";
209
+ category: string;
210
+ gender: "f" | "m";
211
+ keyword: string;
212
+ }, {
213
+ startDate: string;
214
+ endDate: string;
215
+ timeUnit: "date" | "week" | "month";
216
+ category: string;
217
+ gender: "f" | "m";
218
+ keyword: string;
219
+ }>;
220
+ export declare const DatalabShoppingKeywordAgeSchema: z.ZodObject<z.objectUtil.extendShape<{
221
+ startDate: z.ZodString;
222
+ endDate: z.ZodString;
223
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
224
+ }, {
225
+ category: z.ZodString;
226
+ keyword: z.ZodString;
227
+ ages: z.ZodArray<z.ZodEnum<["10", "20", "30", "40", "50", "60"]>, "many">;
228
+ }>, "strip", z.ZodTypeAny, {
229
+ startDate: string;
230
+ endDate: string;
231
+ timeUnit: "date" | "week" | "month";
232
+ category: string;
233
+ ages: ("10" | "20" | "30" | "40" | "50" | "60")[];
234
+ keyword: string;
235
+ }, {
236
+ startDate: string;
237
+ endDate: string;
238
+ timeUnit: "date" | "week" | "month";
239
+ category: string;
240
+ ages: ("10" | "20" | "30" | "40" | "50" | "60")[];
241
+ keyword: string;
242
+ }>;
243
+ export declare const DatalabShoppingCategoryDeviceSchema: z.ZodObject<z.objectUtil.extendShape<{
244
+ startDate: z.ZodString;
245
+ endDate: z.ZodString;
246
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
247
+ }, {
248
+ category: z.ZodArray<z.ZodObject<{
249
+ name: z.ZodString;
250
+ param: z.ZodArray<z.ZodString, "many">;
251
+ }, "strip", z.ZodTypeAny, {
252
+ name: string;
253
+ param: string[];
254
+ }, {
255
+ name: string;
256
+ param: string[];
257
+ }>, "many">;
258
+ device: z.ZodOptional<z.ZodEnum<["pc", "mo"]>>;
259
+ gender: z.ZodOptional<z.ZodEnum<["f", "m"]>>;
260
+ ages: z.ZodOptional<z.ZodArray<z.ZodEnum<["10", "20", "30", "40", "50", "60"]>, "many">>;
261
+ }>, "strip", z.ZodTypeAny, {
262
+ startDate: string;
263
+ endDate: string;
264
+ timeUnit: "date" | "week" | "month";
265
+ category: {
266
+ name: string;
267
+ param: string[];
268
+ }[];
269
+ device?: "pc" | "mo" | undefined;
270
+ gender?: "f" | "m" | undefined;
271
+ ages?: ("10" | "20" | "30" | "40" | "50" | "60")[] | undefined;
272
+ }, {
273
+ startDate: string;
274
+ endDate: string;
275
+ timeUnit: "date" | "week" | "month";
276
+ category: {
277
+ name: string;
278
+ param: string[];
279
+ }[];
280
+ device?: "pc" | "mo" | undefined;
281
+ gender?: "f" | "m" | undefined;
282
+ ages?: ("10" | "20" | "30" | "40" | "50" | "60")[] | undefined;
283
+ }>;
284
+ export declare const DatalabShoppingKeywordTrendSchema: z.ZodObject<z.objectUtil.extendShape<{
285
+ startDate: z.ZodString;
286
+ endDate: z.ZodString;
287
+ timeUnit: z.ZodEnum<["date", "week", "month"]>;
288
+ }, {
289
+ category: z.ZodString;
290
+ keyword: z.ZodArray<z.ZodObject<{
291
+ name: z.ZodString;
292
+ param: z.ZodArray<z.ZodString, "many">;
293
+ }, "strip", z.ZodTypeAny, {
294
+ name: string;
295
+ param: string[];
296
+ }, {
297
+ name: string;
298
+ param: string[];
299
+ }>, "many">;
300
+ device: z.ZodOptional<z.ZodEnum<["pc", "mo"]>>;
301
+ gender: z.ZodOptional<z.ZodEnum<["f", "m"]>>;
302
+ ages: z.ZodOptional<z.ZodArray<z.ZodEnum<["10", "20", "30", "40", "50", "60"]>, "many">>;
303
+ }>, "strip", z.ZodTypeAny, {
304
+ startDate: string;
305
+ endDate: string;
306
+ timeUnit: "date" | "week" | "month";
307
+ category: string;
308
+ keyword: {
309
+ name: string;
310
+ param: string[];
311
+ }[];
312
+ device?: "pc" | "mo" | undefined;
313
+ gender?: "f" | "m" | undefined;
314
+ ages?: ("10" | "20" | "30" | "40" | "50" | "60")[] | undefined;
315
+ }, {
316
+ startDate: string;
317
+ endDate: string;
318
+ timeUnit: "date" | "week" | "month";
319
+ category: string;
320
+ keyword: {
321
+ name: string;
322
+ param: string[];
323
+ }[];
324
+ device?: "pc" | "mo" | undefined;
325
+ gender?: "f" | "m" | undefined;
326
+ ages?: ("10" | "20" | "30" | "40" | "50" | "60")[] | undefined;
327
+ }>;
328
+ export type DatalabSearch = z.infer<typeof DatalabSearchSchema>;
329
+ export type DatalabShopping = z.infer<typeof DatalabShoppingSchema>;
330
+ export type DatalabShoppingDevice = z.infer<typeof DatalabShoppingDeviceSchema>;
331
+ export type DatalabShoppingGender = z.infer<typeof DatalabShoppingGenderSchema>;
332
+ export type DatalabShoppingAge = z.infer<typeof DatalabShoppingAgeSchema>;
333
+ export type DatalabShoppingKeywords = z.infer<typeof DatalabShoppingKeywordsSchema>;
334
+ export type DatalabShoppingKeywordDevice = z.infer<typeof DatalabShoppingKeywordDeviceSchema>;
335
+ export type DatalabShoppingKeywordGender = z.infer<typeof DatalabShoppingKeywordGenderSchema>;
336
+ export type DatalabShoppingKeywordAge = z.infer<typeof DatalabShoppingKeywordAgeSchema>;
@@ -0,0 +1,66 @@
1
+ import { z } from "zod";
2
+ export declare const NaverSearchTypeSchema: z.ZodEnum<["news", "encyc", "blog", "shop", "webkr", "image", "doc", "kin", "book", "cafearticle", "local"]>;
3
+ export declare const SearchArgsSchema: z.ZodObject<{
4
+ query: z.ZodString;
5
+ display: z.ZodOptional<z.ZodNumber>;
6
+ start: z.ZodOptional<z.ZodNumber>;
7
+ sort: z.ZodOptional<z.ZodEnum<["sim", "date"]>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ query: string;
10
+ display?: number | undefined;
11
+ start?: number | undefined;
12
+ sort?: "sim" | "date" | undefined;
13
+ }, {
14
+ query: string;
15
+ display?: number | undefined;
16
+ start?: number | undefined;
17
+ sort?: "sim" | "date" | undefined;
18
+ }>;
19
+ export declare const NaverSearchConfigSchema: z.ZodObject<{
20
+ clientId: z.ZodString;
21
+ clientSecret: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ clientId: string;
24
+ clientSecret: string;
25
+ }, {
26
+ clientId: string;
27
+ clientSecret: string;
28
+ }>;
29
+ export declare const NaverDocumentSearchParamsSchema: z.ZodObject<{
30
+ query: z.ZodString;
31
+ display: z.ZodOptional<z.ZodNumber>;
32
+ start: z.ZodOptional<z.ZodNumber>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ query: string;
35
+ display?: number | undefined;
36
+ start?: number | undefined;
37
+ }, {
38
+ query: string;
39
+ display?: number | undefined;
40
+ start?: number | undefined;
41
+ }>;
42
+ export declare const NaverLocalSearchParamsSchema: z.ZodObject<z.objectUtil.extendShape<{
43
+ query: z.ZodString;
44
+ display: z.ZodOptional<z.ZodNumber>;
45
+ start: z.ZodOptional<z.ZodNumber>;
46
+ sort: z.ZodOptional<z.ZodEnum<["sim", "date"]>>;
47
+ }, {
48
+ sort: z.ZodOptional<z.ZodEnum<["random", "comment"]>>;
49
+ display: z.ZodOptional<z.ZodNumber>;
50
+ start: z.ZodOptional<z.ZodNumber>;
51
+ }>, "strip", z.ZodTypeAny, {
52
+ query: string;
53
+ display?: number | undefined;
54
+ start?: number | undefined;
55
+ sort?: "random" | "comment" | undefined;
56
+ }, {
57
+ query: string;
58
+ display?: number | undefined;
59
+ start?: number | undefined;
60
+ sort?: "random" | "comment" | undefined;
61
+ }>;
62
+ export type NaverLocalSearchParams = z.infer<typeof NaverLocalSearchParamsSchema>;
63
+ export type SearchArgs = z.infer<typeof SearchArgsSchema>;
64
+ export type NaverSearchType = z.infer<typeof NaverSearchTypeSchema>;
65
+ export type NaverSearchConfig = z.infer<typeof NaverSearchConfigSchema>;
66
+ export type NaverDocumentSearchParams = z.infer<typeof NaverDocumentSearchParamsSchema>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 데이터랩 관련 도구 정의
3
+ */
4
+ export declare const datalabTools: {
5
+ name: string;
6
+ description: string;
7
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
8
+ $schema?: string | undefined;
9
+ definitions?: {
10
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
11
+ } | undefined;
12
+ };
13
+ }[];
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 검색 관련 도구 정의
3
+ */
4
+ export declare const searchTools: {
5
+ name: string;
6
+ description: string;
7
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
8
+ $schema?: string | undefined;
9
+ definitions?: {
10
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
11
+ } | undefined;
12
+ };
13
+ }[];
@@ -0,0 +1,78 @@
1
+ export type DatalabTimeUnit = "date" | "week" | "month";
2
+ export interface DatalabSearchRequest {
3
+ startDate: string;
4
+ endDate: string;
5
+ timeUnit: DatalabTimeUnit;
6
+ keywordGroups: Array<{
7
+ groupName: string;
8
+ keywords: string[];
9
+ }>;
10
+ }
11
+ export interface DatalabShoppingResponse {
12
+ startDate: string;
13
+ endDate: string;
14
+ timeUnit: string;
15
+ results: {
16
+ title: string;
17
+ category?: string[];
18
+ keyword?: string[];
19
+ data: {
20
+ period: string;
21
+ group?: string;
22
+ ratio: number;
23
+ }[];
24
+ }[];
25
+ }
26
+ export interface DatalabShoppingCategoryRequest {
27
+ startDate: string;
28
+ endDate: string;
29
+ timeUnit: DatalabTimeUnit;
30
+ category: Array<{
31
+ name: string;
32
+ param: string[];
33
+ }>;
34
+ device?: "pc" | "mo";
35
+ gender?: "f" | "m";
36
+ ages?: string[];
37
+ }
38
+ export interface DatalabShoppingDeviceRequest {
39
+ startDate: string;
40
+ endDate: string;
41
+ timeUnit: DatalabTimeUnit;
42
+ category: string;
43
+ device: "pc" | "mo";
44
+ }
45
+ export interface DatalabShoppingGenderRequest {
46
+ startDate: string;
47
+ endDate: string;
48
+ timeUnit: DatalabTimeUnit;
49
+ category: string;
50
+ gender: "f" | "m";
51
+ }
52
+ export interface DatalabShoppingAgeRequest {
53
+ startDate: string;
54
+ endDate: string;
55
+ timeUnit: DatalabTimeUnit;
56
+ category: string;
57
+ ages: string[];
58
+ }
59
+ export interface DatalabShoppingKeywordsRequest {
60
+ startDate: string;
61
+ endDate: string;
62
+ timeUnit: DatalabTimeUnit;
63
+ category: string;
64
+ keyword: Array<{
65
+ name: string;
66
+ param: string[];
67
+ }>;
68
+ }
69
+ export interface DatalabShoppingKeywordRequest {
70
+ startDate: string;
71
+ endDate: string;
72
+ timeUnit: DatalabTimeUnit;
73
+ category: string;
74
+ keyword: string;
75
+ device?: "pc" | "mo";
76
+ gender?: "f" | "m";
77
+ ages?: string[];
78
+ }
@@ -0,0 +1,44 @@
1
+ export interface NaverSearchResponse {
2
+ lastBuildDate: string;
3
+ total: number;
4
+ start: number;
5
+ display: number;
6
+ items: NaverSearchItem[];
7
+ isError?: boolean;
8
+ }
9
+ export interface NaverSearchItem {
10
+ title: string;
11
+ link: string;
12
+ description: string;
13
+ }
14
+ export interface NaverDocumentSearchResponse extends NaverSearchResponse {
15
+ items: NaverDocumentItem[];
16
+ }
17
+ export interface NaverDocumentItem extends NaverSearchItem {
18
+ title: string;
19
+ link: string;
20
+ description: string;
21
+ }
22
+ export interface NaverEncyclopediaSearchResponse extends NaverSearchResponse {
23
+ items: NaverEncyclopediaItem[];
24
+ }
25
+ export interface NaverEncyclopediaItem extends NaverSearchItem {
26
+ title: string;
27
+ link: string;
28
+ description: string;
29
+ thumbnail: string;
30
+ }
31
+ export interface NaverLocalSearchResponse extends NaverSearchResponse {
32
+ items: NaverLocalItem[];
33
+ }
34
+ export interface NaverLocalItem extends Omit<NaverSearchItem, "description"> {
35
+ title: string;
36
+ link: string;
37
+ category: string;
38
+ description: string;
39
+ telephone: string;
40
+ address: string;
41
+ roadAddress: string;
42
+ mapx: number;
43
+ mapy: number;
44
+ }
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@isnow890/naver-search-mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Naver Search MCP Server",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "main": "dist/src/index.js",
7
6
  "files": [
8
7
  "dist"
9
8
  ],
package/dist/package.json DELETED
@@ -1,39 +0,0 @@
1
- {
2
- "name": "@isnow890/naver-search-mcp",
3
- "version": "1.0.4",
4
- "description": "Naver Search MCP Server",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "files": [
8
- "dist"
9
- ],
10
- "scripts": {
11
- "prebuild": "shx rm -rf dist",
12
- "build": "tsc",
13
- "prepare": "npm run build",
14
- "watch": "tsc --watch",
15
- "start": "node dist/src/index.js"
16
- },
17
- "engines": {
18
- "node": ">=18"
19
- },
20
- "dependencies": {
21
- "@modelcontextprotocol/sdk": "0.5.0",
22
- "axios": "^1.6.7",
23
- "zod": "^3.22.4",
24
- "zod-to-json-schema": "^3.23.5",
25
- "sharp": "^0.33.2",
26
- "dotenv": "^16.4.5"
27
- },
28
- "devDependencies": {
29
- "@types/node": "^22",
30
- "shx": "^0.3.4",
31
- "typescript": "^5.3.3"
32
- },
33
- "author": "isnow890",
34
- "license": "MIT",
35
- "bin": {
36
- "naver-search-mcp": "dist/src/index.js"
37
- },
38
- "type": "module"
39
- }