@yoonion/mimi-seed-mcp 0.3.38 → 0.3.39

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/dist/prompts.js CHANGED
@@ -25,7 +25,7 @@ export function registerPrompts(server) {
25
25
  },
26
26
  }],
27
27
  }));
28
- server.prompt('health', '인증 상태 + 앱 출시 준비도 빠른 요약', {}, async () => ({
28
+ server.prompt('health', '전체 연결 상태 스캔 + 앱 출시 준비도 요약', {}, async () => ({
29
29
  messages: [{
30
30
  role: 'user',
31
31
  content: {
@@ -34,10 +34,10 @@ export function registerPrompts(server) {
34
34
  '현재 Mimi Seed 연결 상태와 앱 출시 준비도를 요약해줘.',
35
35
  '',
36
36
  '확인 순서:',
37
- '1. mimi_seed_auth_status Google OAuth 토큰 상태 확인',
38
- '2. 인증 없으면 mimi_seed_auth_start 로그인 링크 발급',
39
- '3. firebase_list_projects 로 연결된 Firebase 프로젝트 확인 (인증 있을 )',
40
- '4. playstore_check_submission_risks / appstore_check_submission_risks 로 등록 앱 블로커 점검',
37
+ '1. mimi_seed_status 호출 9개 서비스 전체 연결 상태 스캔',
38
+ '2. 필수 항목(Google OAuth / Play SA / App Store)이 있으면 먼저 설정 안내',
39
+ '3. firebase_list_projects 로 연결된 Firebase 프로젝트 확인 (OAuth 연결 )',
40
+ '4. playstore_check_submission_risks / appstore_check_submission_risks 로 블로커 점검',
41
41
  '5. 다음 권장 액션 제안 (블로커 수정 / 릴리즈 노트 생성 / 출시 실행)',
42
42
  ].join('\n'),
43
43
  },
@@ -1,5 +1,13 @@
1
1
  import { getMcpOAuthClient } from '../auth/constants.js';
2
2
  import { startAuth, ensureFreshAccessToken, getTokensLastRefreshMs } from '../auth/google-auth.js';
3
+ import { listRegisteredServiceAccounts } from '../auth/playstore-auth.js';
4
+ import { getAppStoreCredentials } from '../appstore/auth.js';
5
+ import { loadJenkinsConfig } from '../jenkins/config.js';
6
+ import { loadCiConfig } from '../ci/config.js';
7
+ import { loadConfig as loadGoogleAdsConfig } from '../googleads/config.js';
8
+ import { loadFacebookConfig } from '../facebook/config.js';
9
+ import { loadInstagramConfig } from '../instagram/config.js';
10
+ import { getBigQueryServiceAccountKey } from '../auth/bigquery-auth.js';
3
11
  /**
4
12
  * tokens.json mtime → "Nd Hh ago" 형식 문자열 + 재인증 권고.
5
13
  * Google 정책: 7일 미사용 시 미인증 앱 refresh_token revoke 가능.
@@ -27,6 +35,112 @@ function formatLastRefreshHint(lastMs) {
27
35
  return { label };
28
36
  }
29
37
  export function registerAuthTools(server) {
38
+ // ── 전체 연결 상태 진단 ────────────────────────────────────────────────────
39
+ server.tool('mimi_seed_status', [
40
+ '⭐ 새 세션을 시작하거나 "뭐가 연결됐지?" 라는 질문엔 이 도구를 먼저 호출하세요.',
41
+ '9개 서비스(Google OAuth / Play SA / App Store / Jenkins / CI / Google Ads / Facebook / Instagram / BigQuery)',
42
+ '설정 상태를 한 번에 스캔해 ✅ / ❌ 트래픽 라이트 리포트와 번호 매긴 다음 단계를 반환합니다.',
43
+ '미설정 서비스마다 어떤 도구를 호출하면 되는지 구체적으로 알려줍니다.',
44
+ ].join(' '), {}, async () => {
45
+ const lines = ['🌱 Mimi Seed 연결 상태', ''];
46
+ // 1. Google OAuth
47
+ const oauthResult = await ensureFreshAccessToken();
48
+ if (oauthResult.status === 'fresh' || oauthResult.status === 'refreshed') {
49
+ const min = Math.round(oauthResult.msUntilExpiry / 60_000);
50
+ const hint = formatLastRefreshHint(getTokensLastRefreshMs());
51
+ lines.push(`✅ Google OAuth — 연결됨 (${min}분 남음, ${hint.label})`);
52
+ if (hint.recommendation)
53
+ lines.push(` ${hint.recommendation}`);
54
+ }
55
+ else {
56
+ lines.push('❌ Google OAuth — 미연결 → mimi_seed_auth_start');
57
+ }
58
+ // 2. Play Store SA
59
+ const saInfo = listRegisteredServiceAccounts();
60
+ const saCount = saInfo.perPackage.length + (saInfo.default ? 1 : 0);
61
+ if (saCount > 0) {
62
+ const pkgs = saInfo.perPackage.map((p) => p.packageName).join(', ');
63
+ const detail = pkgs || saInfo.default?.clientEmail || '(default)';
64
+ lines.push(`✅ Play Store SA — ${saCount}개 등록 (${detail})`);
65
+ }
66
+ else {
67
+ lines.push('❌ Play Store SA — 미설정 → playstore_register_service_account 또는 setup_playstore_connection');
68
+ }
69
+ // 3. App Store Connect
70
+ const asc = getAppStoreCredentials();
71
+ if (asc) {
72
+ lines.push(`✅ App Store Connect — 연결됨 (keyId: ${asc.keyId})`);
73
+ }
74
+ else {
75
+ lines.push('❌ App Store Connect — 미설정 → npx @yoonion/mimi-seed-mcp mimi-seed-appstore-auth');
76
+ }
77
+ // 4. Jenkins
78
+ const jenkins = loadJenkinsConfig();
79
+ if (jenkins) {
80
+ lines.push(`✅ Jenkins — 연결됨 (${jenkins.url})`);
81
+ }
82
+ else {
83
+ lines.push('❌ Jenkins — 미설정 → jenkins_status → jenkins_save_config (선택)');
84
+ }
85
+ // 5. CI (GitHub/GitLab)
86
+ const ci = loadCiConfig();
87
+ if (ci) {
88
+ lines.push(`✅ CI — ${ci.provider} (${ci.owner}/${ci.repo})`);
89
+ }
90
+ else {
91
+ lines.push('❌ CI — 미설정 → ci_save_config (선택)');
92
+ }
93
+ // 6. Google Ads
94
+ const gads = loadGoogleAdsConfig();
95
+ if (gads) {
96
+ lines.push(`⚠️ Google Ads — 설정됨 (customerId: ${gads.customerId})`);
97
+ }
98
+ else {
99
+ lines.push('❌ Google Ads — 미설정 → googleads_save_config (선택)');
100
+ }
101
+ // 7. Facebook
102
+ const fb = loadFacebookConfig();
103
+ if (fb) {
104
+ lines.push(`✅ Facebook — 연결됨 (pageId: ${fb.pageId})`);
105
+ }
106
+ else {
107
+ lines.push('❌ Facebook — 미설정 → facebook_save_config (선택)');
108
+ }
109
+ // 8. Instagram
110
+ const ig = loadInstagramConfig();
111
+ if (ig) {
112
+ lines.push(`✅ Instagram — 연결됨 (userId: ${ig.userId})`);
113
+ }
114
+ else {
115
+ lines.push('❌ Instagram — 미설정 → instagram_save_config (선택)');
116
+ }
117
+ // 9. BigQuery
118
+ const bq = getBigQueryServiceAccountKey();
119
+ if (bq) {
120
+ lines.push(`✅ BigQuery — 서비스 계정 연결됨 (${bq.client_email ?? ''})`);
121
+ }
122
+ else {
123
+ lines.push('❌ BigQuery — 미설정 → npx @yoonion/mimi-seed-mcp mimi-seed-bigquery-auth (선택)');
124
+ }
125
+ // 다음 단계 안내
126
+ const missing = [];
127
+ if (oauthResult.status !== 'fresh' && oauthResult.status !== 'refreshed') {
128
+ missing.push(' 1. mimi_seed_auth_start (Google 계정 로그인 — Firebase/AdMob/GSC 등 필수)');
129
+ }
130
+ if (saCount === 0) {
131
+ missing.push(' 2. setup_playstore_connection(packageName=..., projectId=...) (Play Store 배포 필수)');
132
+ }
133
+ if (!asc) {
134
+ missing.push(' 3. npx @yoonion/mimi-seed-mcp mimi-seed-appstore-auth (App Store 배포 필수)');
135
+ }
136
+ if (missing.length > 0) {
137
+ lines.push('', '── 다음 단계 (필수) ─────────────────────────────', ...missing);
138
+ }
139
+ else {
140
+ lines.push('', '✅ 필수 연결 모두 완료. 앱 출시 작업을 시작할 수 있습니다.');
141
+ }
142
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
143
+ });
30
144
  server.tool('mimi_seed_auth_start', [
31
145
  'Google OAuth 로그인 링크를 발급하고 백그라운드 콜백 서버를 시작.',
32
146
  '응답에 포함된 URL을 브라우저에서 열고 승인하면 localhost:9876으로 자동 콜백 → 토큰이 ~/.mimi-seed/tokens.json에 저장됨.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoonion/mimi-seed-mcp",
3
- "version": "0.3.38",
3
+ "version": "0.3.39",
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
  "bin": {