@yoonion/mimi-seed-mcp 0.27.0 → 0.28.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/README.md CHANGED
@@ -143,7 +143,7 @@ export ANTHROPIC_API_KEY=sk-ant-...
143
143
  ---
144
144
 
145
145
  <!-- generated:readme-tools-heading:start — edit scripts/docs-spec.mjs, then npm run plugin:sync -->
146
- ## 제공 도구 (150+ 개 · 26개 영역)
146
+ ## 제공 도구 (150+ 개 · 27개 영역)
147
147
  <!-- generated:readme-tools-heading:end -->
148
148
 
149
149
  <!-- generated:readme-tools-table:start — edit scripts/docs-spec.mjs, then npm run plugin:sync -->
@@ -159,6 +159,7 @@ export ANTHROPIC_API_KEY=sk-ant-...
159
159
  | GA4 (Google Analytics 4) | 8 | `ga4_create_property` / `ga4_create_data_stream` / `ga4_plan_bigquery_link` / `ga4_create_bigquery_link` / `ga4_run_report` |
160
160
  | Search Console | 6 | `gsc_inspect_url` / `gsc_search_analytics` / `gsc_submit_sitemap` |
161
161
  | 네이버 서치어드바이저 | 2 | `naver_check_page` / `naver_indexnow_submit` |
162
+ | App Store 공개 데이터 (경쟁 앱) | 5 | `market_search_apps` / `market_lookup_app` / `market_list_reviews` / `market_watch_app` / `market_save_baseline` |
162
163
  | Google Ads | 6 | `googleads_list_campaigns` / `googleads_get_uac_report` / `googleads_get_campaign_report` |
163
164
  | Facebook | 6 | `facebook_post_photo` / `facebook_post_multi_photo` / `facebook_list_pages` |
164
165
  | Google Cloud IAM | 5 | `iam_create_service_account` / `iam_create_key` / `iam_add_iam_policy_binding` |
@@ -90,6 +90,7 @@ Use the table to find tool names, then select only the active tools needed for t
90
90
  | AdMob | `select:admob_list_accounts,admob_list_apps,admob_create_app,admob_create_ad_unit,admob_list_ad_units,admob_get_today_earnings,admob_get_report` |
91
91
  | Google Ads (UAC) | `select:googleads_config_status,googleads_save_config,googleads_list_accessible_customers,googleads_list_campaigns,googleads_get_campaign_report,googleads_get_uac_report` |
92
92
  | Search indexing (Search Console / Naver) | `select:gsc_list_sites,gsc_list_sitemaps,gsc_get_sitemap,gsc_submit_sitemap,gsc_inspect_url,gsc_search_analytics,naver_check_page,naver_indexnow_submit` |
93
+ | Competitor apps (App Store public data) | `select:market_search_apps,market_lookup_app,market_list_reviews,market_watch_app,market_save_baseline` |
93
94
  | Social posting (Facebook / Instagram / Threads) | `select:facebook_current_config,facebook_save_config,facebook_list_pages,facebook_get_page,facebook_post_photo,facebook_post_multi_photo,instagram_save_config,instagram_get_account,instagram_post_image,instagram_post_carousel,threads_current_config,threads_save_config,threads_refresh_token,threads_get_account,threads_post,threads_post_video,threads_post_carousel` |
94
95
  | TikTok Business video publish | `select:tiktok_business_auth_status,tiktok_business_get_account,tiktok_business_get_video_settings,tiktok_business_plan_video_post,tiktok_business_publish_video,tiktok_business_get_publish_status,tiktok_business_list_publish_audits` |
95
96
  | Cross-post one announcement to several platforms | `select:mimi_seed_status,tiktok_business_plan_video_post,social_publish` |
@@ -33,6 +33,9 @@ export const MANIFEST_TEXT_EN = {
33
33
  'URL 검사·검색 성과 분석·사이트맵 제출': 'URL inspection, search performance analysis, sitemap submission',
34
34
  '없음 (IndexNow 키 파일)': 'None (IndexNow key file)',
35
35
  'Yeti 크롤러 관점 색인 점검·IndexNow URL 제출': 'Indexability checks from the Yeti crawler, IndexNow URL submission',
36
+ 'App Store 공개 데이터 (경쟁 앱)': 'App Store public data (competitor apps)',
37
+ '없음 (공개 데이터)': 'None (public data)',
38
+ '경쟁 앱 검색·공개 정보·리뷰·변화 감지 (iOS)': 'Competitor app search, public listing, reviews, change detection (iOS)',
36
39
  '서비스 계정 생성·키 발급·IAM 정책 바인딩': 'Create service accounts, issue keys, bind IAM policies',
37
40
  'Instagram 토큰 (mimi-seed auth instagram)': 'Instagram token (mimi-seed auth instagram)',
38
41
  '사진·캐러셀·릴스 포스팅': 'Post photos, carousels, Reels',
@@ -14,6 +14,7 @@ import ga4 from './ga4.js';
14
14
  import googleads from './googleads.js';
15
15
  import gsc from './gsc.js';
16
16
  import naver from './naver.js';
17
+ import market from './market.js';
17
18
  import iam from './iam.js';
18
19
  import instagram from './instagram.js';
19
20
  import jenkins from './jenkins.js';
@@ -47,6 +48,7 @@ export const TOOL_TEXT_EN_SOURCES = {
47
48
  googleads,
48
49
  gsc,
49
50
  naver,
51
+ market,
50
52
  iam,
51
53
  instagram,
52
54
  jenkins,
@@ -0,0 +1,15 @@
1
+ /** market 도구 · 파라미터 설명의 영어 — 키는 한국어 원문 (lib/tool-text.ts). 원문을 고치면 키도 고친다. */
2
+ declare const _default: {
3
+ '\uC2A4\uD1A0\uC5B4 \uAD6D\uAC00 \uCF54\uB4DC, \uB450 \uAE00\uC790 (\uC608: us, kr, jp \u2014 \uB300\uC18C\uBB38\uC790 \uBB34\uAD00). \uAE30\uBCF8 us': string;
4
+ 'App Store \uC22B\uC790 \uC571 ID \u2014 apps.apple.com/\u2026/id<\uC22B\uC790> \uC758 \uC22B\uC790': string;
5
+ '\uD0A4\uC6CC\uB4DC\uB85C App Store \uACF5\uAC1C \uAC80\uC0C9 \u2014 \uACBD\uC7C1 \uC571 \uD6C4\uBCF4\uC758 \uC571 ID\u00B7\uBC88\uB4E4 ID\u00B7\uD3C9\uC810\u00B7\uD3C9\uC810 \uC218\u00B7\uAC00\uACA9\u00B7\uC7A5\uB974\uB97C \uCC3E\uB294\uB2E4 (iTunes Search API). \uC778\uC99D \uBD88\uD544\uC694, iOS \uACF5\uAC1C \uB370\uC774\uD130\uB9CC. \uB2E4\uC6B4\uB85C\uB4DC\u00B7\uB9E4\uCD9C\uC740 \uACF5\uAC1C \uB370\uC774\uD130\uAC00 \uC544\uB2C8\uB77C \uBCFC \uC218 \uC5C6\uB2E4.': string;
6
+ '\uAC80\uC0C9\uC5B4 (\uC571 \uC774\uB984, \uCE74\uD14C\uACE0\uB9AC \uD0A4\uC6CC\uB4DC \uB4F1)': string;
7
+ '\uACB0\uACFC \uC218 (1\u201350, \uAE30\uBCF8 10)': string;
8
+ '\uB0A8\uC758 \uC571\uC744 \uD3EC\uD568\uD574 App Store \uC571 1\uAC1C\uC758 \uACF5\uAC1C \uC815\uBCF4 \uC870\uD68C \u2014 \uD604\uC7AC \uBC84\uC804\u00B7\uBC84\uC804 \uCD9C\uC2DC\uC77C\u00B7\uB9B4\uB9AC\uC2A4 \uB178\uD2B8\u00B7\uAC00\uACA9\u00B7\uD3C9\uADE0 \uD3C9\uC810\u00B7\uD3C9\uC810 \uC218(\uC804\uCCB4/\uD604\uC7AC \uBC84\uC804)\u00B7\uC7A5\uB974\u00B7\uC5F0\uB839 \uB4F1\uAE09\u00B7\uC6A9\uB7C9\u00B7\uCD5C\uC18C iOS\u00B7\uC2A4\uD06C\uB9B0\uC0F7 \uC218\u00B7\uC124\uBA85. appId \uB610\uB294 bundleId \uC911 \uD558\uB098. \uC778\uC99D \uBD88\uD544\uC694, iOS \uACF5\uAC1C \uB370\uC774\uD130\uB9CC. \uB0B4 \uC571\uC758 \uBA54\uD0C0\uB370\uC774\uD130 \uD3B8\uC9D1\uC740 appstore_* \uB3C4\uAD6C\uB97C \uC4F4\uB2E4.': string;
9
+ '\uBC88\uB4E4 ID (\uC608: com.example.app) \u2014 appId \uB300\uC2E0': string;
10
+ '\uB0A8\uC758 \uC571\uC744 \uD3EC\uD568\uD574 App Store \uC571\uC758 \uCD5C\uADFC \uACF5\uAC1C \uB9AC\uBDF0 (\uACE0\uAC1D \uB9AC\uBDF0 RSS) \u2014 \uCD5C\uC2E0\uC21C, \uD398\uC774\uC9C0\uB2F9 \uCD5C\uB300 50\uAC1C, \uCD5C\uB300 10\uD398\uC774\uC9C0(\uCD5C\uADFC 500\uAC1C)\uAE4C\uC9C0. \uAD6D\uAC00\uBCC4\uB85C \uB530\uB85C \uBAA8\uC778\uB2E4. lastPage \uB85C \uB0A8\uC740 \uD398\uC774\uC9C0\uB97C \uC548\uB2E4. \uC778\uC99D \uBD88\uD544\uC694, iOS \uACF5\uAC1C \uB370\uC774\uD130\uB9CC. \uB0B4 \uC571 \uB9AC\uBDF0\uC5D0 \uB2F5\uAE00\uC744 \uB2EC\uB824\uBA74 appstore_list_reviews / appstore_reply_review \uB97C \uC4F4\uB2E4.': string;
11
+ '\uD398\uC774\uC9C0 (1\u201310, \uAE30\uBCF8 1)': string;
12
+ '\uACBD\uC7C1 \uC571\uC758 \uBCC0\uD654 \uAC10\uC9C0 (\uC77D\uAE30 \uC804\uC6A9) \u2014 \uC9C0\uAE08\uC758 \uACF5\uAC1C \uC815\uBCF4\uB97C \uB85C\uCEEC \uAE30\uC900\uC810(~/.mimi-seed/market-watch/)\uACFC \uBE44\uAD50\uD574 \uBC14\uB010 \uD544\uB4DC(\uBC84\uC804\u00B7\uB9B4\uB9AC\uC2A4 \uB178\uD2B8\u00B7\uAC00\uACA9\u00B7\uD3C9\uC810\u00B7\uD3C9\uC810 \uC218\u00B7\uC124\uBA85\u00B7\uC2A4\uD06C\uB9B0\uC0F7 \uC218 \uB4F1)\uC640 \uAE30\uC900\uC810 \uC774\uD6C4 \uC0C8 \uB9AC\uBDF0\uB97C \uB3CC\uB824\uC900\uB2E4. \uAE30\uC900\uC810\uC740 \uAC74\uB4DC\uB9AC\uC9C0 \uC54A\uB294\uB2E4 \u2014 \uACB0\uACFC\uB97C \uD655\uC778\uD55C \uB4A4 market_save_baseline \uC73C\uB85C \uC800\uC7A5\uD55C\uB2E4. \uAE30\uC900\uC810\uC774 \uC5C6\uC73C\uBA74 \uBCC0\uD654\uAC00 \uBE44\uC5B4 \uC788\uB2E4. \uC778\uC99D \uBD88\uD544\uC694, iOS \uACF5\uAC1C \uB370\uC774\uD130\uB9CC.': string;
13
+ '\uACBD\uC7C1 \uC571\uC758 \uC9C0\uAE08 \uACF5\uAC1C \uC815\uBCF4\uC640 \uCD5C\uC2E0 \uB9AC\uBDF0 \uC704\uCE58\uB97C \uB85C\uCEEC \uAE30\uC900\uC810(~/.mimi-seed/market-watch/<country>-<appId>.json)\uC73C\uB85C \uC800\uC7A5\uD55C\uB2E4 \u2014 \uB2E4\uC74C market_watch_app \uC740 \uC5EC\uAE30\uC11C\uBD80\uD130 \uBE44\uAD50\uD55C\uB2E4. \uC800\uC7A5 \uC9C1\uC804\uC758 \uBCC0\uD654\uC640 \uC0C8 \uB9AC\uBDF0\uB3C4 \uD568\uAED8 \uB3CC\uB824\uC8FC\uB2C8 \uADF8\uAC83\uAE4C\uC9C0 \uD655\uC778\uD55C\uB2E4. \uB85C\uCEEC \uD30C\uC77C\uB9CC \uC4F0\uACE0 \uC2A4\uD1A0\uC5B4\uC5D0\uB294 \uC544\uBB34\uAC83\uB3C4 \uBCF4\uB0B4\uC9C0 \uC54A\uB294\uB2E4. \uC778\uC99D \uBD88\uD544\uC694, iOS \uACF5\uAC1C \uB370\uC774\uD130\uB9CC.': string;
14
+ };
15
+ export default _default;
@@ -0,0 +1,14 @@
1
+ /** market 도구 · 파라미터 설명의 영어 — 키는 한국어 원문 (lib/tool-text.ts). 원문을 고치면 키도 고친다. */
2
+ export default {
3
+ '스토어 국가 코드, 두 글자 (예: us, kr, jp — 대소문자 무관). 기본 us': 'Store country code, two letters (e.g. us, kr, jp — case-insensitive). Default us',
4
+ 'App Store 숫자 앱 ID — apps.apple.com/…/id<숫자> 의 숫자': 'Numeric App Store app ID — the digits in apps.apple.com/…/id<digits>',
5
+ '키워드로 App Store 공개 검색 — 경쟁 앱 후보의 앱 ID·번들 ID·평점·평점 수·가격·장르를 찾는다 (iTunes Search API). 인증 불필요, iOS 공개 데이터만. 다운로드·매출은 공개 데이터가 아니라 볼 수 없다.': 'Public App Store keyword search — finds candidate competitor apps with app ID, bundle ID, rating, rating count, price, and genre (iTunes Search API). No authentication required, iOS public data only. Downloads and revenue are not public and cannot be seen.',
6
+ '검색어 (앱 이름, 카테고리 키워드 등)': 'Search term (app name, category keyword, etc.)',
7
+ '결과 수 (1–50, 기본 10)': 'Number of results (1–50, default 10)',
8
+ '남의 앱을 포함해 App Store 앱 1개의 공개 정보 조회 — 현재 버전·버전 출시일·릴리스 노트·가격·평균 평점·평점 수(전체/현재 버전)·장르·연령 등급·용량·최소 iOS·스크린샷 수·설명. appId 또는 bundleId 중 하나. 인증 불필요, iOS 공개 데이터만. 내 앱의 메타데이터 편집은 appstore_* 도구를 쓴다.': "Look up the public information of one App Store app, including other developers' apps — current version, version release date, release notes, price, average rating, rating count (all / current version), genre, age rating, size, minimum iOS, screenshot count, description. Pass appId or bundleId. No authentication required, iOS public data only. To edit your own app's metadata, use the appstore_* tools.",
9
+ '번들 ID (예: com.example.app) — appId 대신': 'Bundle ID (e.g. com.example.app) — instead of appId',
10
+ '남의 앱을 포함해 App Store 앱의 최근 공개 리뷰 (고객 리뷰 RSS) — 최신순, 페이지당 최대 50개, 최대 10페이지(최근 500개)까지. 국가별로 따로 모인다. lastPage 로 남은 페이지를 안다. 인증 불필요, iOS 공개 데이터만. 내 앱 리뷰에 답글을 달려면 appstore_list_reviews / appstore_reply_review 를 쓴다.': "Recent public reviews of an App Store app, including other developers' apps (customer reviews RSS) — newest first, up to 50 per page, up to 10 pages (the latest 500). Reviews are collected per country. lastPage tells how many pages remain. No authentication required, iOS public data only. To reply to reviews of your own app, use appstore_list_reviews / appstore_reply_review.",
11
+ '페이지 (1–10, 기본 1)': 'Page (1–10, default 1)',
12
+ '경쟁 앱의 변화 감지 (읽기 전용) — 지금의 공개 정보를 로컬 기준점(~/.mimi-seed/market-watch/)과 비교해 바뀐 필드(버전·릴리스 노트·가격·평점·평점 수·설명·스크린샷 수 등)와 기준점 이후 새 리뷰를 돌려준다. 기준점은 건드리지 않는다 — 결과를 확인한 뒤 market_save_baseline 으로 저장한다. 기준점이 없으면 변화가 비어 있다. 인증 불필요, iOS 공개 데이터만.': 'Detect changes in a competitor app (read-only) — compares its current public information with a local baseline (~/.mimi-seed/market-watch/) and returns the fields that changed (version, release notes, price, rating, rating count, description, screenshot count, etc.) and the reviews posted since the baseline. It never touches the baseline — after reading the result, save it with market_save_baseline. With no baseline, changes are empty. No authentication required, iOS public data only.',
13
+ '경쟁 앱의 지금 공개 정보와 최신 리뷰 위치를 로컬 기준점(~/.mimi-seed/market-watch/<country>-<appId>.json)으로 저장한다 — 다음 market_watch_app 은 여기서부터 비교한다. 저장 직전의 변화와 새 리뷰도 함께 돌려주니 그것까지 확인한다. 로컬 파일만 쓰고 스토어에는 아무것도 보내지 않는다. 인증 불필요, iOS 공개 데이터만.': "Save a competitor app's current public information and newest review position as the local baseline (~/.mimi-seed/market-watch/<country>-<appId>.json) — the next market_watch_app compares from here. It also returns the changes and new reviews found just before saving, so read those too. Writes a local file only and sends nothing to the store. No authentication required, iOS public data only.",
14
+ };
@@ -2,7 +2,7 @@ export const TOOL_MENU_URI = 'mimi-seed://tools/menu';
2
2
  export const TOOL_SELECTION_URI = `${TOOL_MENU_URI}/{areas*}`;
3
3
  const menuOrder = [
4
4
  'ga4', 'bigquery', 'playstore', 'appstore', 'onestore', 'video', 'youtube', 'firebase', 'googleads',
5
- 'admob', 'drive', 'gsc', 'naver', 'instagram', 'threads', 'facebook', 'tiktok', 'crosspost',
5
+ 'admob', 'drive', 'gsc', 'naver', 'market', 'instagram', 'threads', 'facebook', 'tiktok', 'crosspost',
6
6
  'ci', 'jenkins', 'checks', 'android', 'iam', 'billing', 'ai', 'auth',
7
7
  ];
8
8
  const labels = {
@@ -13,6 +13,7 @@ const labels = {
13
13
  video: { ko: 'YouTube · 영상 제작', en: 'YouTube · Video production' },
14
14
  youtube: { ko: 'YouTube · 업로드·채널 운영', en: 'YouTube · Upload and channel management' },
15
15
  naver: { ko: '네이버 서치어드바이저', en: 'Naver Search Advisor' },
16
+ market: { ko: 'Mobile Store · 경쟁 앱 관찰 (App Store 공개 데이터)', en: 'Mobile Store · Competitor apps (App Store public data)' },
16
17
  crosspost: { ko: '소셜 통합 게시', en: 'Cross-post to several social platforms' },
17
18
  checks: { ko: '출시 상태·제출 전 점검', en: 'Release status and submission checks' },
18
19
  android: { ko: 'Android 서명', en: 'Android signing' },
@@ -0,0 +1,137 @@
1
+ /**
2
+ * 경쟁 앱 관찰 — App Store **공개** 데이터만 읽는다 (iTunes Search/Lookup API, 고객 리뷰 RSS).
3
+ *
4
+ * 자격증명이 없다. 남의 앱이라 App Store Connect API 는 못 쓰고, 다운로드·매출 같은 비공개 수치는
5
+ * 어디에서도 얻을 수 없다. Google Play 는 공개 API 가 없어 다루지 않는다 — 스토어 웹페이지 스크래핑은
6
+ * 약관상 애매하고 마크업이 바뀌면 조용히 틀린 값을 낸다.
7
+ *
8
+ * 변화 감지(watchApp)는 `~/.mimi-seed/market-watch/<country>-<appId>.json` 의 기준점과 비교한다.
9
+ * 기준점은 market_save_baseline(save: true)일 때만 바뀐다 — 확인만 한 호출이 기준점을 덮으면, 아무도 읽지 않은 실행이
10
+ * 그 사이의 변화를 지워 버린다.
11
+ */
12
+ export declare const ITUNES_BASE = "https://itunes.apple.com";
13
+ export declare const COUNTRY_RE: RegExp;
14
+ /** 도구 입력용 — 대소문자를 받고 register 가 소문자로 바꾼다. */
15
+ export declare const COUNTRY_INPUT_RE: RegExp;
16
+ export declare const APP_ID_RE: RegExp;
17
+ /** 리뷰 RSS 는 페이지당 50개, 최대 10페이지(최근 500개)까지만 준다. */
18
+ export declare const REVIEW_MAX_PAGE = 10;
19
+ export declare const REVIEW_PAGE_SIZE = 50;
20
+ export declare const SEARCH_MAX_LIMIT = 50;
21
+ export interface AppSnapshot {
22
+ appId: number;
23
+ bundleId: string;
24
+ name: string;
25
+ developer: string;
26
+ url: string;
27
+ version: string;
28
+ currentVersionReleaseDate: string | null;
29
+ releaseNotes: string;
30
+ firstReleaseDate: string | null;
31
+ price: number;
32
+ formattedPrice: string | null;
33
+ currency: string | null;
34
+ averageUserRating: number | null;
35
+ userRatingCount: number | null;
36
+ averageUserRatingForCurrentVersion: number | null;
37
+ userRatingCountForCurrentVersion: number | null;
38
+ primaryGenre: string | null;
39
+ contentRating: string | null;
40
+ fileSizeBytes: number | null;
41
+ minimumOsVersion: string | null;
42
+ screenshotCount: number;
43
+ description: string;
44
+ }
45
+ export interface MarketReview {
46
+ id: string;
47
+ author: string;
48
+ rating: number;
49
+ version: string | null;
50
+ title: string;
51
+ content: string;
52
+ updated: string | null;
53
+ voteSum: number;
54
+ voteCount: number;
55
+ }
56
+ type Raw = Record<string, unknown>;
57
+ export declare function toSnapshot(r: Raw): AppSnapshot;
58
+ export interface SearchHit {
59
+ appId: number;
60
+ bundleId: string;
61
+ name: string;
62
+ developer: string;
63
+ version: string;
64
+ averageUserRating: number | null;
65
+ userRatingCount: number | null;
66
+ price: number;
67
+ primaryGenre: string | null;
68
+ url: string;
69
+ }
70
+ export declare function searchApps(opts: {
71
+ term: string;
72
+ country: string;
73
+ limit: number;
74
+ }): Promise<SearchHit[]>;
75
+ export declare function lookupApp(opts: {
76
+ appId?: string;
77
+ bundleId?: string;
78
+ country: string;
79
+ }): Promise<AppSnapshot>;
80
+ export declare function parseReviewFeed(body: unknown): {
81
+ reviews: MarketReview[];
82
+ lastPage: number;
83
+ };
84
+ export declare function listReviews(opts: {
85
+ appId: string;
86
+ country: string;
87
+ page: number;
88
+ }): Promise<{
89
+ page: number;
90
+ lastPage: number;
91
+ reviews: MarketReview[];
92
+ }>;
93
+ export interface WatchBaseline {
94
+ savedAt: string;
95
+ country: string;
96
+ snapshot: Omit<AppSnapshot, 'description'> & {
97
+ descriptionSha256: string;
98
+ descriptionLength: number;
99
+ };
100
+ /** 기준점 저장 시점에 본 가장 최근 리뷰 id. 리뷰 id 는 시간순으로 커진다. */
101
+ latestReviewId: string | null;
102
+ }
103
+ export interface FieldChange {
104
+ field: string;
105
+ before: unknown;
106
+ after: unknown;
107
+ }
108
+ export declare function watchDir(home?: string): string;
109
+ export declare function baselinePath(country: string, appId: number, home?: string): string;
110
+ export declare function diffSnapshots(before: WatchBaseline['snapshot'], after: WatchBaseline['snapshot']): FieldChange[];
111
+ export interface WatchResult {
112
+ app: {
113
+ appId: number;
114
+ name: string;
115
+ country: string;
116
+ url: string;
117
+ };
118
+ baselineSavedAt: string | null;
119
+ changes: FieldChange[];
120
+ /** 기준점 이후 새로 달린 리뷰 — 이미 본 리뷰에 닿을 때까지 페이지를 넘겨 모은다. */
121
+ newReviews: MarketReview[];
122
+ /** 새 리뷰를 끝까지 모으지 못했다 — 피드가 주는 최근 500개가 전부 새 리뷰였거나, 2페이지 이후를 읽다 실패했다. */
123
+ newReviewsMayBeTruncated: boolean;
124
+ /** 2페이지 이후를 읽다 난 오류 (없으면 null). 이때 market_save_baseline 은 저장하지 않고 실패한다. */
125
+ reviewPageError: string | null;
126
+ current: AppSnapshot;
127
+ saved: boolean;
128
+ baselineFile: string;
129
+ }
130
+ export declare function watchApp(opts: {
131
+ appId?: string;
132
+ bundleId?: string;
133
+ country: string;
134
+ save: boolean;
135
+ home?: string;
136
+ }): Promise<WatchResult>;
137
+ export {};
@@ -0,0 +1,377 @@
1
+ import { createHash } from 'node:crypto';
2
+ import fs from 'node:fs';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import { writeJsonAtomic } from '#core/atomic-write.js';
6
+ import { catalog } from '#core/lang.js';
7
+ import { fetchWithTimeout } from '../lib/http.js';
8
+ import { encodePathSegment } from '../lib/url-path.js';
9
+ /**
10
+ * 경쟁 앱 관찰 — App Store **공개** 데이터만 읽는다 (iTunes Search/Lookup API, 고객 리뷰 RSS).
11
+ *
12
+ * 자격증명이 없다. 남의 앱이라 App Store Connect API 는 못 쓰고, 다운로드·매출 같은 비공개 수치는
13
+ * 어디에서도 얻을 수 없다. Google Play 는 공개 API 가 없어 다루지 않는다 — 스토어 웹페이지 스크래핑은
14
+ * 약관상 애매하고 마크업이 바뀌면 조용히 틀린 값을 낸다.
15
+ *
16
+ * 변화 감지(watchApp)는 `~/.mimi-seed/market-watch/<country>-<appId>.json` 의 기준점과 비교한다.
17
+ * 기준점은 market_save_baseline(save: true)일 때만 바뀐다 — 확인만 한 호출이 기준점을 덮으면, 아무도 읽지 않은 실행이
18
+ * 그 사이의 변화를 지워 버린다.
19
+ */
20
+ export const ITUNES_BASE = 'https://itunes.apple.com';
21
+ export const COUNTRY_RE = /^[a-z]{2}$/;
22
+ /** 도구 입력용 — 대소문자를 받고 register 가 소문자로 바꾼다. */
23
+ export const COUNTRY_INPUT_RE = /^[A-Za-z]{2}$/;
24
+ export const APP_ID_RE = /^[1-9][0-9]{0,14}$/;
25
+ /** 리뷰 RSS 는 페이지당 50개, 최대 10페이지(최근 500개)까지만 준다. */
26
+ export const REVIEW_MAX_PAGE = 10;
27
+ export const REVIEW_PAGE_SIZE = 50;
28
+ export const SEARCH_MAX_LIMIT = 50;
29
+ const M = catalog({
30
+ badCountry: (v) => `country 는 소문자 두 글자 국가 코드여야 합니다 (예: us, kr) — ${v}`,
31
+ badAppId: (v) => `appId 는 App Store 숫자 ID 여야 합니다 (apps.apple.com/…/id<숫자>) — ${v}`,
32
+ needId: 'appId 와 bundleId 중 하나만 주세요.',
33
+ notFound: (q, country) => `${country.toUpperCase()} 스토어에서 ${q} 앱을 찾지 못했습니다 — 그 나라에 출시되지 않았거나 ID 가 틀렸습니다.`,
34
+ httpFailed: (what, status) => `${what} 요청 실패 (HTTP ${status}).`,
35
+ badJson: (what) => `${what} 응답이 JSON 이 아닙니다 — Apple 이 형식을 바꿨을 수 있습니다.`,
36
+ badBaseline: (file) => `기준점 파일을 읽지 못했습니다(${file}) — 지우고 market_save_baseline 으로 다시 저장하세요.`,
37
+ reviewPageFailed: (page, reason) => `리뷰 ${page}페이지를 읽지 못했습니다 — 그보다 오래된 새 리뷰는 빠졌을 수 있습니다. (${reason})`,
38
+ saveRefused: (page, reason, file) => `리뷰 ${page}페이지를 읽지 못해 기준점을 저장하지 않았습니다 — 저장하면 그 페이지의 새 리뷰를 건너뛰게 됩니다. 잠시 뒤 다시 시도하세요. ` +
39
+ `계속 실패하면 ${file} 을 지우고 다시 저장하면 1페이지만 읽어 새로 시작합니다 (그때까지 쌓인 새 리뷰는 보고되지 않습니다). (${reason})`,
40
+ lookup: '앱 조회',
41
+ search: '앱 검색',
42
+ reviews: '리뷰 RSS',
43
+ }, {
44
+ badCountry: (v) => `country must be a lowercase two-letter country code (e.g. us, kr) — ${v}`,
45
+ badAppId: (v) => `appId must be the numeric App Store ID (apps.apple.com/…/id<digits>) — ${v}`,
46
+ needId: 'Pass exactly one of appId and bundleId.',
47
+ notFound: (q, country) => `App ${q} was not found in the ${country.toUpperCase()} store — it is not released there or the ID is wrong.`,
48
+ httpFailed: (what, status) => `${what} request failed (HTTP ${status}).`,
49
+ badJson: (what) => `${what} response is not JSON — Apple may have changed the format.`,
50
+ badBaseline: (file) => `Could not read the baseline file (${file}) — delete it and save again with market_save_baseline.`,
51
+ reviewPageFailed: (page, reason) => `Could not read review page ${page} — older new reviews may be missing. (${reason})`,
52
+ saveRefused: (page, reason, file) => `Could not read review page ${page}, so the baseline was not saved — saving would skip the new reviews on that page. Try again shortly. ` +
53
+ `If it keeps failing, delete ${file} and save again: that reads page 1 only and starts over (new reviews posted until then are not reported). (${reason})`,
54
+ lookup: 'App lookup',
55
+ search: 'App search',
56
+ reviews: 'Reviews RSS',
57
+ });
58
+ function assertCountry(country) {
59
+ if (!COUNTRY_RE.test(country))
60
+ throw new Error(M().badCountry(country));
61
+ }
62
+ function assertAppId(appId) {
63
+ if (!APP_ID_RE.test(appId))
64
+ throw new Error(M().badAppId(appId));
65
+ }
66
+ async function getJson(url, what) {
67
+ const res = await fetchWithTimeout(url, { headers: { accept: 'application/json' } });
68
+ if (!res.ok) {
69
+ await res.body?.cancel().catch(() => undefined);
70
+ throw new Error(M().httpFailed(what, res.status));
71
+ }
72
+ const text = await res.text();
73
+ try {
74
+ return JSON.parse(text);
75
+ }
76
+ catch (error) {
77
+ throw new Error(M().badJson(what), { cause: error });
78
+ }
79
+ }
80
+ const str = (v) => (typeof v === 'string' ? v : '');
81
+ const strOrNull = (v) => (typeof v === 'string' && v !== '' ? v : null);
82
+ const numOrNull = (v) => {
83
+ // Number('') 과 Number(' ') 은 0 이다 — 빈 값을 0 으로 기록하면 다음 비교가 가짜 변화를 낸다.
84
+ const n = typeof v === 'string' ? (v.trim() === '' ? null : Number(v)) : v;
85
+ return typeof n === 'number' && Number.isFinite(n) ? n : null;
86
+ };
87
+ export function toSnapshot(r) {
88
+ const shots = [r.screenshotUrls, r.ipadScreenshotUrls].reduce((n, list) => n + (Array.isArray(list) ? list.length : 0), 0);
89
+ return {
90
+ appId: numOrNull(r.trackId) ?? 0,
91
+ bundleId: str(r.bundleId),
92
+ name: str(r.trackName),
93
+ developer: str(r.artistName) || str(r.sellerName),
94
+ url: str(r.trackViewUrl),
95
+ version: str(r.version),
96
+ currentVersionReleaseDate: strOrNull(r.currentVersionReleaseDate),
97
+ releaseNotes: str(r.releaseNotes),
98
+ firstReleaseDate: strOrNull(r.releaseDate),
99
+ price: numOrNull(r.price) ?? 0,
100
+ formattedPrice: strOrNull(r.formattedPrice),
101
+ currency: strOrNull(r.currency),
102
+ averageUserRating: numOrNull(r.averageUserRating),
103
+ userRatingCount: numOrNull(r.userRatingCount),
104
+ averageUserRatingForCurrentVersion: numOrNull(r.averageUserRatingForCurrentVersion),
105
+ userRatingCountForCurrentVersion: numOrNull(r.userRatingCountForCurrentVersion),
106
+ primaryGenre: strOrNull(r.primaryGenreName),
107
+ contentRating: strOrNull(r.contentAdvisoryRating) ?? strOrNull(r.trackContentRating),
108
+ fileSizeBytes: numOrNull(r.fileSizeBytes),
109
+ minimumOsVersion: strOrNull(r.minimumOsVersion),
110
+ screenshotCount: shots,
111
+ description: str(r.description),
112
+ };
113
+ }
114
+ /** 앱(software) 행만 — entity=software 여도 개발자(artist) 행 등이 섞일 수 있다. */
115
+ function appRows(body) {
116
+ const list = body?.results;
117
+ if (!Array.isArray(list))
118
+ return [];
119
+ return list.filter((x) => typeof x === 'object' && x !== null &&
120
+ (x.wrapperType === 'software' || x.kind === 'software') &&
121
+ numOrNull(x.trackId) !== null);
122
+ }
123
+ export async function searchApps(opts) {
124
+ assertCountry(opts.country);
125
+ const url = new URL('/search', ITUNES_BASE);
126
+ url.searchParams.set('term', opts.term);
127
+ url.searchParams.set('country', opts.country);
128
+ url.searchParams.set('entity', 'software');
129
+ url.searchParams.set('limit', String(Math.min(Math.max(opts.limit, 1), SEARCH_MAX_LIMIT)));
130
+ const body = await getJson(url.toString(), M().search);
131
+ return appRows(body).map((r) => {
132
+ const s = toSnapshot(r);
133
+ return {
134
+ appId: s.appId,
135
+ bundleId: s.bundleId,
136
+ name: s.name,
137
+ developer: s.developer,
138
+ version: s.version,
139
+ averageUserRating: s.averageUserRating,
140
+ userRatingCount: s.userRatingCount,
141
+ price: s.price,
142
+ primaryGenre: s.primaryGenre,
143
+ url: s.url,
144
+ };
145
+ });
146
+ }
147
+ export async function lookupApp(opts) {
148
+ assertCountry(opts.country);
149
+ if ((opts.appId === undefined) === (opts.bundleId === undefined))
150
+ throw new Error(M().needId);
151
+ const url = new URL('/lookup', ITUNES_BASE);
152
+ if (opts.appId !== undefined) {
153
+ assertAppId(opts.appId);
154
+ url.searchParams.set('id', opts.appId);
155
+ }
156
+ else {
157
+ url.searchParams.set('bundleId', opts.bundleId);
158
+ }
159
+ url.searchParams.set('country', opts.country);
160
+ url.searchParams.set('entity', 'software');
161
+ const body = await getJson(url.toString(), M().lookup);
162
+ const app = appRows(body)[0];
163
+ if (!app)
164
+ throw new Error(M().notFound(opts.appId ?? opts.bundleId, opts.country));
165
+ return toSnapshot(app);
166
+ }
167
+ const label = (v) => str(v?.label);
168
+ export function parseReviewFeed(body) {
169
+ const { reviews, lastPage } = parseReviewFeedDetail(body);
170
+ return { reviews, lastPage };
171
+ }
172
+ /** lastPageKnown: lastPage 를 rel=last 링크에서 읽었는가. 링크가 없으면 lastPage 는 추정(1)일 뿐이다. */
173
+ function parseReviewFeedDetail(body) {
174
+ const feed = body?.feed ?? {};
175
+ const raw = feed.entry;
176
+ // 항목이 하나뿐이면 RSS→JSON 변환기가 배열 대신 객체 하나를 준다.
177
+ const entries = Array.isArray(raw) ? raw : raw && typeof raw === 'object' ? [raw] : [];
178
+ const reviews = entries
179
+ // 옛 형식은 첫 항목에 앱 자체 정보를 넣었다 — 1–5 정수 평점이 없는 항목은 리뷰가 아니다.
180
+ .filter((e) => /^[1-5]$/.test(label(e['im:rating'])))
181
+ .map((e) => ({
182
+ id: label(e.id),
183
+ author: label(e.author?.name),
184
+ rating: Number(label(e['im:rating'])),
185
+ version: label(e['im:version']) || null,
186
+ title: label(e.title),
187
+ content: label(e.content),
188
+ updated: label(e.updated) || null,
189
+ voteSum: Number(label(e['im:voteSum'])) || 0,
190
+ voteCount: Number(label(e['im:voteCount'])) || 0,
191
+ }));
192
+ let lastPage = reviews.length > 0 ? 1 : 0;
193
+ let lastPageKnown = false;
194
+ const links = Array.isArray(feed.link) ? feed.link : [];
195
+ for (const l of links) {
196
+ const attrs = (l.attributes ?? {});
197
+ if (attrs.rel !== 'last')
198
+ continue;
199
+ const m = /\/page=(\d+)\//.exec(str(attrs.href));
200
+ if (m) {
201
+ lastPage = Math.min(Number(m[1]), REVIEW_MAX_PAGE);
202
+ lastPageKnown = true;
203
+ }
204
+ }
205
+ return { reviews, lastPage, lastPageKnown };
206
+ }
207
+ export async function listReviews(opts) {
208
+ const page = Math.min(Math.max(Math.trunc(opts.page), 1), REVIEW_MAX_PAGE);
209
+ const { reviews, lastPage } = await fetchReviewPage(opts);
210
+ return { page, lastPage, reviews };
211
+ }
212
+ async function fetchReviewPage(opts) {
213
+ assertCountry(opts.country);
214
+ assertAppId(opts.appId);
215
+ const page = Math.min(Math.max(Math.trunc(opts.page), 1), REVIEW_MAX_PAGE);
216
+ const url = `${ITUNES_BASE}/${encodePathSegment(opts.country)}/rss/customerreviews` +
217
+ `/page=${page}/id=${encodePathSegment(opts.appId)}/sortby=mostrecent/json`;
218
+ return parseReviewFeedDetail(await getJson(url, M().reviews));
219
+ }
220
+ /** 비교하는 필드 — 순서가 곧 보고 순서다. 평균 평점은 소수점 둘째 자리에서 반올림해 잡음을 줄인다. */
221
+ const WATCHED_FIELDS = [
222
+ 'name',
223
+ 'developer',
224
+ 'version',
225
+ 'currentVersionReleaseDate',
226
+ 'releaseNotes',
227
+ 'price',
228
+ 'formattedPrice',
229
+ 'averageUserRating',
230
+ 'userRatingCount',
231
+ 'averageUserRatingForCurrentVersion',
232
+ 'userRatingCountForCurrentVersion',
233
+ 'primaryGenre',
234
+ 'contentRating',
235
+ 'minimumOsVersion',
236
+ 'fileSizeBytes',
237
+ 'screenshotCount',
238
+ 'descriptionSha256',
239
+ ];
240
+ export function watchDir(home = os.homedir()) {
241
+ return path.join(home, '.mimi-seed', 'market-watch');
242
+ }
243
+ export function baselinePath(country, appId, home) {
244
+ return path.join(watchDir(home), `${country}-${appId}.json`);
245
+ }
246
+ function toBaselineSnapshot(s) {
247
+ const { description, ...rest } = s;
248
+ return {
249
+ ...rest,
250
+ descriptionSha256: createHash('sha256').update(description).digest('hex'),
251
+ descriptionLength: description.length,
252
+ };
253
+ }
254
+ const round2 = (v) => (typeof v === 'number' ? Math.round(v * 100) / 100 : v);
255
+ export function diffSnapshots(before, after) {
256
+ const changes = [];
257
+ for (const field of WATCHED_FIELDS) {
258
+ const rating = field.startsWith('averageUserRating');
259
+ const a = rating ? round2(before[field]) : before[field];
260
+ const b = rating ? round2(after[field]) : after[field];
261
+ if (a === b)
262
+ continue;
263
+ if (field === 'descriptionSha256') {
264
+ // 전문은 저장하지 않는다 — 길이만 언어와 무관한 값으로 알린다.
265
+ changes.push({ field: 'description', before: { length: before.descriptionLength }, after: { length: after.descriptionLength } });
266
+ }
267
+ else {
268
+ changes.push({ field, before: a, after: b });
269
+ }
270
+ }
271
+ return changes;
272
+ }
273
+ /** id 가 숫자 문자열이라 길이가 다르면 사전순 비교가 틀린다 — BigInt 로 비교한다. */
274
+ function isNewer(id, than) {
275
+ if (than === null)
276
+ return true;
277
+ if (!/^\d+$/.test(id) || !/^\d+$/.test(than))
278
+ return id !== than;
279
+ return BigInt(id) > BigInt(than);
280
+ }
281
+ function readBaseline(file) {
282
+ let text;
283
+ try {
284
+ text = fs.readFileSync(file, 'utf8');
285
+ }
286
+ catch (error) {
287
+ // 기준점이 아직 없는 것이 정상 첫 실행이다 — "기준점 없음"으로 보고한다. 다른 읽기 오류는 그대로 던진다.
288
+ if (error.code === 'ENOENT')
289
+ return null;
290
+ throw error;
291
+ }
292
+ try {
293
+ const parsed = JSON.parse(text);
294
+ if (!parsed || typeof parsed !== 'object' || !parsed.snapshot)
295
+ throw new Error('shape');
296
+ return parsed;
297
+ }
298
+ catch (error) {
299
+ throw new Error(M().badBaseline(file), { cause: error });
300
+ }
301
+ }
302
+ export async function watchApp(opts) {
303
+ const current = await lookupApp(opts);
304
+ const file = baselinePath(opts.country, current.appId, opts.home);
305
+ const baseline = readBaseline(file);
306
+ const since = baseline?.latestReviewId ?? null;
307
+ // 새 리뷰가 한 페이지를 꽉 채우면 다음 페이지도 읽는다 — 1페이지만 보고 기준점을 옮기면
308
+ // 그 뒤 페이지의 리뷰는 영영 보고되지 않는다. 피드가 주는 끝(최대 10페이지)에서 멈춘다.
309
+ const newReviews = [];
310
+ // 페이지는 위치(offset)로 나뉜다 — 읽는 사이 새 리뷰가 달리면 한 칸씩 밀려 같은 리뷰가 다음 페이지에 또 온다.
311
+ // 거꾸로 읽는 사이 리뷰가 지워지면 한 칸씩 당겨져 다음 페이지 첫 리뷰 하나를 못 본다. 피드에 커서가 없고
312
+ // 빠진 리뷰는 응답 어디에도 흔적이 없어서 감지할 수 없다 — 이 피드로는 지킬 수 없는 한계다.
313
+ const collected = new Set();
314
+ /** 2페이지 이후 읽기 실패 — 비교 결과에는 중립 문구로, 저장은 이것으로 거부한다. */
315
+ let pageFailure = null;
316
+ let latestReviewId = since;
317
+ /** 새 리뷰를 끝까지 모으지 못했다 (피드 끝까지 전부 새 리뷰였거나, 다음 페이지를 읽지 못했다). */
318
+ let truncated = false;
319
+ for (let page = 1; page <= REVIEW_MAX_PAGE; page += 1) {
320
+ let r;
321
+ try {
322
+ r = await fetchReviewPage({ appId: String(current.appId), country: opts.country, page });
323
+ }
324
+ catch (error) {
325
+ // 1페이지가 안 되면 비교할 것이 없다. 그 뒤 페이지는 필드 변화까지 버리지 않고 "잘렸을 수 있음"으로 알린다.
326
+ if (page === 1)
327
+ throw error;
328
+ pageFailure = { page, reason: error instanceof Error ? error.message : String(error) };
329
+ truncated = true;
330
+ break;
331
+ }
332
+ for (const review of r.reviews) {
333
+ if (isNewer(review.id, latestReviewId))
334
+ latestReviewId = review.id;
335
+ }
336
+ if (baseline === null)
337
+ break; // 첫 기준점: 최신 id 만 있으면 된다
338
+ const fresh = r.reviews.filter((review) => isNewer(review.id, since));
339
+ for (const review of fresh) {
340
+ if (collected.has(review.id))
341
+ continue;
342
+ collected.add(review.id);
343
+ newReviews.push(review);
344
+ }
345
+ if (r.reviews.length === 0 || fresh.length < r.reviews.length)
346
+ break; // 이미 본 리뷰에 닿았다
347
+ if (page >= REVIEW_MAX_PAGE) {
348
+ // 피드가 주는 끝까지 전부 새 리뷰. 마지막 페이지가 덜 찼으면 피드가 스스로 끝난 것이라 놓친 리뷰가 없다.
349
+ truncated = r.reviews.length >= REVIEW_PAGE_SIZE;
350
+ break;
351
+ }
352
+ // last 링크가 없으면 lastPage 는 추정일 뿐이다 — 페이지가 꽉 찼으면 다음 페이지가 있다고 보고 계속 읽는다.
353
+ const feedEnded = r.lastPageKnown ? page >= r.lastPage : r.reviews.length < REVIEW_PAGE_SIZE;
354
+ if (feedEnded)
355
+ break;
356
+ }
357
+ const snap = toBaselineSnapshot(current);
358
+ const changes = baseline ? diffSnapshots(baseline.snapshot, snap) : [];
359
+ if (opts.save) {
360
+ // 읽지 못한 페이지가 있으면 저장하지 않는다 — 최신 id 로 기준점을 옮기면 그 페이지의 새 리뷰는 영영 보고되지 않는다.
361
+ if (pageFailure)
362
+ throw new Error(M().saveRefused(pageFailure.page, pageFailure.reason, file));
363
+ const next = { savedAt: new Date().toISOString(), country: opts.country, snapshot: snap, latestReviewId };
364
+ writeJsonAtomic(file, next);
365
+ }
366
+ return {
367
+ app: { appId: current.appId, name: current.name, country: opts.country, url: current.url },
368
+ baselineSavedAt: baseline?.savedAt ?? null,
369
+ changes,
370
+ newReviews,
371
+ newReviewsMayBeTruncated: truncated,
372
+ reviewPageError: pageFailure ? M().reviewPageFailed(pageFailure.page, pageFailure.reason) : null,
373
+ current,
374
+ saved: opts.save,
375
+ baselineFile: file,
376
+ };
377
+ }
@@ -0,0 +1,2 @@
1
+ import type { ToolRegistrar } from '../lib/tool-registrar.js';
2
+ export declare function registerMarketTools(server: ToolRegistrar): void;
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod';
2
+ import * as market from '../market/tools.js';
3
+ import { iosBundleId } from '../lib/package-name.js';
4
+ import { jsonResult } from '../lib/mcp-response.js';
5
+ // 공개 inputSchema 의 pattern 이 대소문자를 모두 받아야 한다 — 클라이언트가 스키마로 먼저 검사하면
6
+ // 소문자 pattern 은 toLowerCase 가 돌기 전에 'KR' 을 거절한다. 검사 뒤에 소문자로 바꾼다.
7
+ const country = z
8
+ .string()
9
+ .trim()
10
+ .regex(market.COUNTRY_INPUT_RE)
11
+ .toLowerCase()
12
+ .default('us')
13
+ .describe('스토어 국가 코드, 두 글자 (예: us, kr, jp — 대소문자 무관). 기본 us');
14
+ const appId = z.string().regex(market.APP_ID_RE).describe('App Store 숫자 앱 ID — apps.apple.com/…/id<숫자> 의 숫자');
15
+ export function registerMarketTools(server) {
16
+ server.tool('market_search_apps', '키워드로 App Store 공개 검색 — 경쟁 앱 후보의 앱 ID·번들 ID·평점·평점 수·가격·장르를 찾는다 (iTunes Search API). 인증 불필요, iOS 공개 데이터만. 다운로드·매출은 공개 데이터가 아니라 볼 수 없다.', {
17
+ term: z.string().min(1).max(200).describe('검색어 (앱 이름, 카테고리 키워드 등)'),
18
+ country,
19
+ limit: z.number().int().min(1).max(market.SEARCH_MAX_LIMIT).default(10).describe('결과 수 (1–50, 기본 10)'),
20
+ }, async ({ term, country: cc, limit }) => jsonResult(await market.searchApps({ term, country: cc, limit })));
21
+ server.tool('market_lookup_app', '남의 앱을 포함해 App Store 앱 1개의 공개 정보 조회 — 현재 버전·버전 출시일·릴리스 노트·가격·평균 평점·평점 수(전체/현재 버전)·장르·연령 등급·용량·최소 iOS·스크린샷 수·설명. appId 또는 bundleId 중 하나. 인증 불필요, iOS 공개 데이터만. 내 앱의 메타데이터 편집은 appstore_* 도구를 쓴다.', {
22
+ appId: appId.optional(),
23
+ bundleId: iosBundleId.optional().describe('번들 ID (예: com.example.app) — appId 대신'),
24
+ country,
25
+ }, async (args) => jsonResult(await market.lookupApp({ appId: args.appId, bundleId: args.bundleId, country: args.country })));
26
+ server.tool('market_list_reviews', '남의 앱을 포함해 App Store 앱의 최근 공개 리뷰 (고객 리뷰 RSS) — 최신순, 페이지당 최대 50개, 최대 10페이지(최근 500개)까지. 국가별로 따로 모인다. lastPage 로 남은 페이지를 안다. 인증 불필요, iOS 공개 데이터만. 내 앱 리뷰에 답글을 달려면 appstore_list_reviews / appstore_reply_review 를 쓴다.', {
27
+ appId,
28
+ country,
29
+ page: z.number().int().min(1).max(market.REVIEW_MAX_PAGE).default(1).describe('페이지 (1–10, 기본 1)'),
30
+ }, async (args) => jsonResult(await market.listReviews({ appId: args.appId, country: args.country, page: args.page })));
31
+ const watchParams = {
32
+ appId: appId.optional(),
33
+ bundleId: iosBundleId.optional().describe('번들 ID (예: com.example.app) — appId 대신'),
34
+ country,
35
+ };
36
+ const watch = async (args, save) => {
37
+ const r = await market.watchApp({ appId: args.appId, bundleId: args.bundleId, country: args.country, save });
38
+ // 설명 전문은 길다 — 변화는 changes 의 description 항목이 알려 준다.
39
+ const { description: _omit, ...current } = r.current;
40
+ return jsonResult({ ...r, current });
41
+ };
42
+ // 비교와 저장을 도구로 나눈다 — 한 도구에 save 플래그를 두면 비교만 하는 호출까지 쓰기 도구로 표시돼,
43
+ // 읽기 전용 도구를 자동 허용하는 클라이언트가 확인할 때마다 승인을 묻는다.
44
+ server.tool('market_watch_app', '경쟁 앱의 변화 감지 (읽기 전용) — 지금의 공개 정보를 로컬 기준점(~/.mimi-seed/market-watch/)과 비교해 바뀐 필드(버전·릴리스 노트·가격·평점·평점 수·설명·스크린샷 수 등)와 기준점 이후 새 리뷰를 돌려준다. 기준점은 건드리지 않는다 — 결과를 확인한 뒤 market_save_baseline 으로 저장한다. 기준점이 없으면 변화가 비어 있다. 인증 불필요, iOS 공개 데이터만.', watchParams, async (args) => watch(args, false));
45
+ server.tool('market_save_baseline', '경쟁 앱의 지금 공개 정보와 최신 리뷰 위치를 로컬 기준점(~/.mimi-seed/market-watch/<country>-<appId>.json)으로 저장한다 — 다음 market_watch_app 은 여기서부터 비교한다. 저장 직전의 변화와 새 리뷰도 함께 돌려주니 그것까지 확인한다. 로컬 파일만 쓰고 스토어에는 아무것도 보내지 않는다. 인증 불필요, iOS 공개 데이터만.', watchParams, async (args) => watch(args, true));
46
+ }
package/dist/server.js CHANGED
@@ -18,6 +18,7 @@ import { registerFacebookTools } from './registers/facebook.js';
18
18
  import { registerGoogleAdsTools } from './registers/googleads.js';
19
19
  import { registerGscTools } from './registers/gsc.js';
20
20
  import { registerNaverTools } from './registers/naver.js';
21
+ import { registerMarketTools } from './registers/market.js';
21
22
  import { registerGa4Tools } from './registers/ga4.js';
22
23
  import { registerJenkinsTools } from './registers/jenkins.js';
23
24
  import { registerAndroidTools } from './registers/android.js';
@@ -83,6 +84,7 @@ export function buildServer(version, options = {}) {
83
84
  registerGoogleAdsTools(registrar);
84
85
  registerGscTools(registrar);
85
86
  registerNaverTools(registrar);
87
+ registerMarketTools(registrar);
86
88
  registerGa4Tools(registrar);
87
89
  registerJenkinsTools(registrar);
88
90
  registerAndroidTools(registrar);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@yoonion/mimi-seed-mcp",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@yoonion/mimi-seed-mcp",
9
- "version": "0.27.0",
9
+ "version": "0.28.0",
10
10
  "license": "PolyForm-Noncommercial-1.0.0",
11
11
  "dependencies": {
12
12
  "@googleapis/admob": "^11.0.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoonion/mimi-seed-mcp",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "description": "Mimi Seed MCP server — Firebase + AdMob + Google Play + App Store management for Claude Code / Codex / Cursor / any MCP client.",
5
5
  "type": "module",
6
6
  "imports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$comment": "등록된 MCP 도구 + 도메인 메타데이터(label·credential·summary) + 도구 분류(write·destructive·local·idempotent → MCP annotations·confirm 가드) + toolset 그룹·폐기 별칭의 SSOT (src/lib/tool-registrar.ts 가 읽는다). src/__tests__/tool-manifest.test.ts 가 실제 서버 등록 목록과 diff 하고 메타데이터 정합성을 검사한다. 도구 추가/삭제/개명 시 이 파일을 함께 갱신할 것 — 산문 문서에는 정확한 개수를 쓰지 말고 이 파일을 가리킬 것. mimi-seed://tools/catalog 리소스가 이 파일을 그대로 서빙한다.",
3
- "total": 271,
3
+ "total": 276,
4
4
  "alwaysOn": [
5
5
  "auth",
6
6
  "checks"
@@ -25,7 +25,8 @@
25
25
  "appstore",
26
26
  "onestore",
27
27
  "android",
28
- "ai"
28
+ "ai",
29
+ "market"
29
30
  ],
30
31
  "google": [
31
32
  "firebase",
@@ -542,6 +543,27 @@
542
543
  "naver_indexnow_submit"
543
544
  ]
544
545
  },
546
+ "market": {
547
+ "label": "App Store 공개 데이터 (경쟁 앱)",
548
+ "credential": "없음 (공개 데이터)",
549
+ "summary": "경쟁 앱 검색·공개 정보·리뷰·변화 감지 (iOS)",
550
+ "tools": [
551
+ "market_search_apps",
552
+ "market_lookup_app",
553
+ "market_list_reviews",
554
+ "market_watch_app",
555
+ "market_save_baseline"
556
+ ],
557
+ "write": [
558
+ "market_save_baseline"
559
+ ],
560
+ "destructive": [],
561
+ "ownGate": [],
562
+ "local": [],
563
+ "idempotent": [
564
+ "market_save_baseline"
565
+ ]
566
+ },
545
567
  "iam": {
546
568
  "label": "Google Cloud IAM",
547
569
  "credential": "Google OAuth",