@withpica/mcp-server 2.5.2 → 2.5.4

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.
Files changed (154) hide show
  1. package/assets/fonts/GeistSans-Light.woff2 +0 -0
  2. package/assets/fonts/InstrumentSerif-Italic.woff2 +0 -0
  3. package/assets/fonts/InstrumentSerif-Regular.woff2 +0 -0
  4. package/dist/apps/briefing.d.ts +2 -0
  5. package/dist/apps/briefing.d.ts.map +1 -0
  6. package/dist/apps/briefing.js +308 -0
  7. package/dist/apps/briefing.js.map +1 -0
  8. package/dist/apps/generated/shared-bundle.d.ts +5 -0
  9. package/dist/apps/generated/shared-bundle.d.ts.map +1 -0
  10. package/dist/apps/generated/shared-bundle.js +7 -0
  11. package/dist/apps/generated/shared-bundle.js.map +1 -0
  12. package/dist/apps/shared.d.ts +4 -0
  13. package/dist/apps/shared.d.ts.map +1 -0
  14. package/dist/apps/shared.js +268 -0
  15. package/dist/apps/shared.js.map +1 -0
  16. package/dist/config.d.ts +3 -25
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/config.js +25 -12
  19. package/dist/config.js.map +1 -1
  20. package/dist/index.js +3 -3
  21. package/dist/index.js.map +1 -1
  22. package/dist/pica-sdk.d.ts +11 -0
  23. package/dist/pica-sdk.d.ts.map +1 -1
  24. package/dist/pica-sdk.js +16 -0
  25. package/dist/pica-sdk.js.map +1 -1
  26. package/dist/prompts/index.js +24 -24
  27. package/dist/prompts/index.js.map +1 -1
  28. package/dist/resources/index.d.ts +3 -1
  29. package/dist/resources/index.d.ts.map +1 -1
  30. package/dist/resources/index.js +101 -53
  31. package/dist/resources/index.js.map +1 -1
  32. package/dist/resources/llms-primer.d.ts +1 -1
  33. package/dist/resources/llms-primer.d.ts.map +1 -1
  34. package/dist/resources/llms-primer.js +4 -4
  35. package/dist/server-instructions.d.ts +9 -0
  36. package/dist/server-instructions.d.ts.map +1 -0
  37. package/dist/server-instructions.js +34 -0
  38. package/dist/server-instructions.js.map +1 -0
  39. package/dist/server.d.ts +4 -0
  40. package/dist/server.d.ts.map +1 -1
  41. package/dist/server.js +30 -8
  42. package/dist/server.js.map +1 -1
  43. package/dist/tools/agreement-types.d.ts +9 -19
  44. package/dist/tools/agreement-types.d.ts.map +1 -1
  45. package/dist/tools/agreement-types.js +201 -417
  46. package/dist/tools/agreement-types.js.map +1 -1
  47. package/dist/tools/agreements.d.ts +2 -3
  48. package/dist/tools/agreements.d.ts.map +1 -1
  49. package/dist/tools/agreements.js +71 -51
  50. package/dist/tools/agreements.js.map +1 -1
  51. package/dist/tools/app-tools.d.ts +18 -0
  52. package/dist/tools/app-tools.d.ts.map +1 -0
  53. package/dist/tools/app-tools.js +87 -0
  54. package/dist/tools/app-tools.js.map +1 -0
  55. package/dist/tools/assets.d.ts +1 -3
  56. package/dist/tools/assets.d.ts.map +1 -1
  57. package/dist/tools/assets.js +63 -45
  58. package/dist/tools/assets.js.map +1 -1
  59. package/dist/tools/audio-files.d.ts +2 -3
  60. package/dist/tools/audio-files.d.ts.map +1 -1
  61. package/dist/tools/audio-files.js +61 -33
  62. package/dist/tools/audio-files.js.map +1 -1
  63. package/dist/tools/auth.d.ts +20 -0
  64. package/dist/tools/auth.d.ts.map +1 -0
  65. package/dist/tools/auth.js +195 -0
  66. package/dist/tools/auth.js.map +1 -0
  67. package/dist/tools/collaborators.js +1 -1
  68. package/dist/tools/collaborators.js.map +1 -1
  69. package/dist/tools/credits.d.ts.map +1 -1
  70. package/dist/tools/credits.js +128 -18
  71. package/dist/tools/credits.js.map +1 -1
  72. package/dist/tools/dashboard.d.ts +1 -2
  73. package/dist/tools/dashboard.d.ts.map +1 -1
  74. package/dist/tools/dashboard.js +19 -27
  75. package/dist/tools/dashboard.js.map +1 -1
  76. package/dist/tools/duplicates.d.ts.map +1 -1
  77. package/dist/tools/duplicates.js +15 -0
  78. package/dist/tools/duplicates.js.map +1 -1
  79. package/dist/tools/enrichment.d.ts +0 -3
  80. package/dist/tools/enrichment.d.ts.map +1 -1
  81. package/dist/tools/enrichment.js +17 -120
  82. package/dist/tools/enrichment.js.map +1 -1
  83. package/dist/tools/import-documents.d.ts +3 -3
  84. package/dist/tools/import-documents.d.ts.map +1 -1
  85. package/dist/tools/import-documents.js +64 -50
  86. package/dist/tools/import-documents.js.map +1 -1
  87. package/dist/tools/import.d.ts +1 -0
  88. package/dist/tools/import.d.ts.map +1 -1
  89. package/dist/tools/import.js +63 -1
  90. package/dist/tools/import.js.map +1 -1
  91. package/dist/tools/index.d.ts +44 -3
  92. package/dist/tools/index.d.ts.map +1 -1
  93. package/dist/tools/index.js +410 -81
  94. package/dist/tools/index.js.map +1 -1
  95. package/dist/tools/metadata.d.ts +15 -0
  96. package/dist/tools/metadata.d.ts.map +1 -0
  97. package/dist/tools/metadata.js +1057 -0
  98. package/dist/tools/metadata.js.map +1 -0
  99. package/dist/tools/people.d.ts +4 -12
  100. package/dist/tools/people.d.ts.map +1 -1
  101. package/dist/tools/people.js +148 -109
  102. package/dist/tools/people.js.map +1 -1
  103. package/dist/tools/publishers.d.ts +16 -0
  104. package/dist/tools/publishers.d.ts.map +1 -0
  105. package/dist/tools/publishers.js +69 -0
  106. package/dist/tools/publishers.js.map +1 -0
  107. package/dist/tools/recordings.d.ts +8 -8
  108. package/dist/tools/recordings.d.ts.map +1 -1
  109. package/dist/tools/recordings.js +121 -48
  110. package/dist/tools/recordings.js.map +1 -1
  111. package/dist/tools/recovery-hints.d.ts +14 -0
  112. package/dist/tools/recovery-hints.d.ts.map +1 -0
  113. package/dist/tools/recovery-hints.js +277 -0
  114. package/dist/tools/recovery-hints.js.map +1 -0
  115. package/dist/tools/royalties.js +1 -1
  116. package/dist/tools/royalties.js.map +1 -1
  117. package/dist/tools/search.js +2 -2
  118. package/dist/tools/search.js.map +1 -1
  119. package/dist/tools/send.d.ts +1 -2
  120. package/dist/tools/send.d.ts.map +1 -1
  121. package/dist/tools/send.js +19 -27
  122. package/dist/tools/send.js.map +1 -1
  123. package/dist/tools/split-sheets.d.ts.map +1 -1
  124. package/dist/tools/split-sheets.js +12 -0
  125. package/dist/tools/split-sheets.js.map +1 -1
  126. package/dist/tools/works.d.ts +4 -12
  127. package/dist/tools/works.d.ts.map +1 -1
  128. package/dist/tools/works.js +201 -116
  129. package/dist/tools/works.js.map +1 -1
  130. package/dist/utils/audit.d.ts +28 -0
  131. package/dist/utils/audit.d.ts.map +1 -0
  132. package/dist/utils/audit.js +28 -0
  133. package/dist/utils/audit.js.map +1 -0
  134. package/dist/utils/confirmation.d.ts +12 -0
  135. package/dist/utils/confirmation.d.ts.map +1 -0
  136. package/dist/utils/confirmation.js +78 -0
  137. package/dist/utils/confirmation.js.map +1 -0
  138. package/dist/utils/credentials.d.ts +11 -0
  139. package/dist/utils/credentials.d.ts.map +1 -0
  140. package/dist/utils/credentials.js +47 -0
  141. package/dist/utils/credentials.js.map +1 -0
  142. package/dist/utils/enrichment-format.d.ts +31 -0
  143. package/dist/utils/enrichment-format.d.ts.map +1 -0
  144. package/dist/utils/enrichment-format.js +69 -0
  145. package/dist/utils/enrichment-format.js.map +1 -0
  146. package/dist/utils/errors.d.ts.map +1 -1
  147. package/dist/utils/errors.js +29 -5
  148. package/dist/utils/errors.js.map +1 -1
  149. package/dist/utils/formatting.d.ts +1 -0
  150. package/dist/utils/formatting.d.ts.map +1 -1
  151. package/dist/utils/formatting.js +30 -2
  152. package/dist/utils/formatting.js.map +1 -1
  153. package/package.json +3 -1
  154. package/scripts/bundle-apps.ts +61 -0
@@ -113,9 +113,9 @@ export class PromptRegistry {
113
113
 
114
114
  Use the following tools to gather data:
115
115
  1. pica_catalog_stats - Get overall statistics
116
- 2. pica_works_list - Review works data
117
- 3. pica_people_list - Review people data
118
- 4. pica_recordings_list - Review recordings data
116
+ 2. pica_works_query - Review works data
117
+ 3. pica_people_query - Review people data
118
+ 4. pica_recordings_query - Review recordings data
119
119
 
120
120
  Analyze and report on:
121
121
  - Overall catalog size and composition
@@ -144,8 +144,8 @@ Please provide specific, actionable insights.`,
144
144
  text: `Please help me find potential duplicate works and people in my catalog.
145
145
 
146
146
  Use these tools:
147
- 1. pica_works_list - Get all works
148
- 2. pica_people_list - Get all people
147
+ 1. pica_works_query - Get all works
148
+ 2. pica_people_query - Get all people
149
149
 
150
150
  Look for:
151
151
  - Works with very similar or identical titles
@@ -177,8 +177,8 @@ Be thorough but conservative - only flag items that have a strong likelihood of
177
177
  text: `Please identify works and people that could benefit from metadata enrichment.
178
178
 
179
179
  Use these tools:
180
- 1. pica_works_list - Get all works
181
- 2. pica_people_list - Get all people
180
+ 1. pica_works_query - Get all works
181
+ 2. pica_people_query - Get all people
182
182
 
183
183
  Identify:
184
184
  - People without ISNI identifiers who might have one
@@ -211,9 +211,9 @@ Focus on people and works where enrichment would add the most value.`,
211
211
  text: `Please review unverified works and suggest which ones are ready for verification.
212
212
 
213
213
  Use these tools:
214
- 1. pica_works_list with verified: false - Get unverified works
214
+ 1. pica_works_query with verified: false - Get unverified works
215
215
  2. pica_recordings_by_work - Check if works have recordings
216
- 3. pica_people_list - Check for associated people/credits
216
+ 3. pica_people_query - Check for associated people/credits
217
217
 
218
218
  For each unverified work, assess:
219
219
  - Does it have complete metadata (title, type, duration)?
@@ -245,9 +245,9 @@ Provide specific recommendations for each category, including what's needed to m
245
245
  text: `Please assess the health of my music catalog using the PICA Score.
246
246
 
247
247
  Use these tools:
248
- 1. pica_score_get - Get the PICA Score with pillar breakdown
248
+ 1. pica_works_inspect({ sections: ["score"] }) - Get the PICA Score with pillar breakdown
249
249
  2. pica_catalog_stats - Get raw catalog statistics for additional context
250
- 3. pica_works_list - Sample works data to understand quality
250
+ 3. pica_works_query - Sample works data to understand quality
251
251
 
252
252
  Analyze:
253
253
  - The composite score and grade — is this catalog ready for commercial use?
@@ -278,9 +278,9 @@ Provide:
278
278
  text: `Please audit the credits across my music catalog to find gaps and issues.
279
279
 
280
280
  Use these tools:
281
- 1. pica_works_list - Get all works
281
+ 1. pica_works_query - Get all works
282
282
  2. pica_credits_list - Check credits for each work (sample at least 20 works, prioritizing recent ones)
283
- 3. pica_people_list - Cross-reference credited people
283
+ 3. pica_people_query - Cross-reference credited people
284
284
 
285
285
  Look for:
286
286
  - Works with no credits at all (no collaborators assigned)
@@ -327,7 +327,7 @@ After importing, guide me through closing the loop on each work:
327
327
  - Who wrote these songs? (pica_credits_update — add writers and set splits)
328
328
  - Are there publishing details registered? (pica_enrich_work_mlc — check MLC)
329
329
  - Do I have audio files to upload? (pica_audio_presigned_upload — for analysis)
330
- - What identifiers are missing? (pica_enrichment_status — check coverage)
330
+ - What identifiers are missing? (pica_works_inspect with sections: ["enrichment"] — check coverage)
331
331
 
332
332
  Don't push — let me stop whenever I want. But always let me know what the next valuable step would be.
333
333
 
@@ -346,8 +346,8 @@ Important: I can always log in at withpica.com to see, verify, and manage everyt
346
346
  */
347
347
  getCloseTheLoopPrompt(workId) {
348
348
  const workInstruction = workId
349
- ? `Check completeness for work ${workId} using pica_work_completeness.`
350
- : `Ask me which work I'd like to check, or use pica_completeness_low to find works that need the most attention.`;
349
+ ? `Check completeness for work ${workId} using pica_works_inspect({ id: "${workId || "..."}", sections: ["completeness"] }).`
350
+ : `Ask me which work I'd like to check, or use pica_works_query({ health_filter: "low_completeness" }) to find works that need the most attention.`;
351
351
  return {
352
352
  messages: [
353
353
  {
@@ -359,9 +359,9 @@ Important: I can always log in at withpica.com to see, verify, and manage everyt
359
359
  ${workInstruction}
360
360
 
361
361
  For the work, check every aspect of completeness:
362
- 1. pica_work_completeness — get the full gap analysis
362
+ 1. pica_works_inspect with sections: ["completeness"] — get the full gap analysis
363
363
  2. pica_credits_list — check if credits and splits are assigned
364
- 3. pica_enrichment_status — check what enrichment sources have been tried
364
+ 3. pica_works_inspect with sections: ["enrichment"] — check what enrichment sources have been tried
365
365
 
366
366
  For each gap found, offer a specific action:
367
367
  - Missing credits → "Want me to add writers? Who wrote this song?"
@@ -371,7 +371,7 @@ For each gap found, offer a specific action:
371
371
  - No audio → "Got a master recording to upload?"
372
372
  - Audio not analysed → "Want me to analyse the audio for BPM, key, and mood?"
373
373
  - No agreements → "Is there a publishing agreement for this work?"
374
- - Not registered → "Want me to check registration status?" (pica_registration_coverage)
374
+ - Not registered → "Want me to check registration status?" (pica_works_inspect with sections: ["registration"])
375
375
 
376
376
  Work through each gap one at a time. Let me skip any I'm not ready for. After each fix, check if the completeness score improved.
377
377
 
@@ -394,8 +394,8 @@ Keep it conversational — don't list all gaps at once. Start with the most impo
394
394
  text: `Help me check which of my works are registered and which still need registration.
395
395
 
396
396
  Steps:
397
- 1. pica_registration_coverageget an overview of registration status across PROs (PRS, MCPS, PPL, MLC)
398
- 2. For works that aren't registered, use pica_work_registration_status on a sample to understand what's blocking registration
397
+ 1. pica_works_querylist works, then use pica_works_inspect with sections: ["registration"] to check registration status across PROs (PRS, MCPS, PPL, MLC)
398
+ 2. For works that aren't registered, use pica_works_inspect with sections: ["registration", "completeness"] on a sample to understand what's blocking registration
399
399
  3. Identify common blockers:
400
400
  - Missing ISWC (needed for PRS/MCPS) → suggest pica_enrich_work_mlc
401
401
  - Missing ISRC (needed for PPL) → check if recordings have ISRCs
@@ -439,7 +439,7 @@ If the catalog is EMPTY (0 works):
439
439
  → Use the new-catalog-setup workflow. Welcome me, explain how to import music (Spotify link, spreadsheet, screenshot, or just describe songs), and get started.
440
440
 
441
441
  If the catalog has works but LOW completeness (PICA Score below 50 or many gaps):
442
- → Use pica_completeness_low to find the works that need the most attention.
442
+ → Use pica_works_query({ health_filter: "low_completeness" }) to find the works that need the most attention.
443
443
  → Pick the top 3 and offer to run close-the-loop on them one at a time.
444
444
  → Tell me: "Your catalog has [N] works but many have gaps. Want me to start closing the loop on the ones that need the most attention?"
445
445
 
@@ -453,7 +453,7 @@ If the catalog is HEALTHY (score above 70, few gaps):
453
453
  → Use assess-catalog-health for a maintenance check. Tell me: "Your catalog looks solid. Here's a quick health check and what could still improve."
454
454
 
455
455
  If none of the above clearly applies:
456
- → Use pica_catalog_stats and pica_score_get to give me a quick summary, then ask what I'd like to focus on.
456
+ → Use pica_catalog_stats and pica_works_inspect({ sections: ["score"] }) to give me a quick summary, then ask what I'd like to focus on.
457
457
 
458
458
  Step 3 — Explain your routing:
459
459
  Tell me WHY you chose the workflow you did, in one sentence. Example: "Your catalog has 42 works but 28 are missing credits, so let's close those gaps first."
@@ -481,7 +481,7 @@ Important: Don't run all workflows at once. Pick the single most valuable action
481
481
 
482
482
  Steps:
483
483
  1. pica_catalog_stats — get an overview of the catalog
484
- 2. pica_works_list — sample works to check what's missing for sync readiness
484
+ 2. pica_works_query — sample works to check what's missing for sync readiness
485
485
  3. For each work, check:
486
486
  - Has audio been uploaded? (supervisors need to hear it)
487
487
  - Has audio been analysed? (BPM, key, energy, mood — needed for search)
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA6B7D,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,WAAW;QACT,OAAO;YACL;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,+FAA+F;gBACjG,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,kEAAkE;gBACpE,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,2FAA2F;gBAC7F,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EACT,2EAA2E;gBAC7E,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,uBAAuB;gBAC7B,WAAW,EACT,6GAA6G;gBAC/G,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,eAAe;gBACrB,WAAW,EACT,+EAA+E;gBACjF,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,mBAAmB;gBACzB,WAAW,EACT,iIAAiI;gBACnI,SAAS,EAAE,E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;;;;;;;;;;;;;;;;;;;;;;;gIAiC8G;qBACrH;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;0GAuBwF;qBAC/F;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA6B7D,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,WAAW;QACT,OAAO;YACL;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,+FAA+F;gBACjG,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,kEAAkE;gBACpE,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,2FAA2F;gBAC7F,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EACT,2EAA2E;gBAC7E,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,uBAAuB;gBAC7B,WAAW,EACT,6GAA6G;gBAC/G,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,eAAe;gBACrB,WAAW,EACT,+EAA+E;gBACjF,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,mBAAmB;gBACzB,WAAW,EACT,iIAAiI;gBACnI,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,gBAAgB;gBACtB,WAAW,EACT,mEAAmE;gBACrE,SAAS,EAAE;oBACT;wBACE,IAAI,EAAE,SAAS;wBACf,WAAW,EAAE,uCAAuC;wBACpD,QAAQ,EAAE,IAAI;q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oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;0GAuBwF;qBAC/F;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -3,6 +3,7 @@
3
3
  * Manages read-only data resources that AI assistants can access
4
4
  */
5
5
  import { PicaClient } from "../pica-sdk.js";
6
+ import { ServerConfig } from "../config.js";
6
7
  export interface ResourceDefinition {
7
8
  uri: string;
8
9
  name: string;
@@ -19,7 +20,8 @@ export interface ResourceContent {
19
20
  export type ResourceResult = any;
20
21
  export declare class ResourceRegistry {
21
22
  private pica;
22
- constructor(pica: PicaClient);
23
+ private config?;
24
+ constructor(pica: PicaClient | null, config?: ServerConfig);
23
25
  /**
24
26
  * List all available resources
25
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQ5C,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ;AAED,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC;AAEjC,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B;;OAEG;IACH,aAAa,IAAI,kBAAkB,EAAE;IAgErC;;OAEG;IACG,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,C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OAEG;YACW,gBAAgB;IAc9B;;OAEG;YACW,mBAAmB;IAcjC;;OAEG;YACW,eAAe;CAa9B"}
@@ -3,76 +3,114 @@ import { ResourceError } from "../utils/errors.js";
3
3
  import { readFileSync } from "fs";
4
4
  import { join } from "path";
5
5
  import { WITHPICA_PRIMER } from "./llms-primer.js";
6
+ import { BRIEFING_HTML } from "../apps/briefing.js";
6
7
  export class ResourceRegistry {
7
8
  pica;
8
- constructor(pica) {
9
+ config;
10
+ constructor(pica, config) {
9
11
  this.pica = pica;
12
+ this.config = config;
10
13
  }
11
14
  /**
12
15
  * List all available resources
13
16
  */
14
17
  listResources() {
15
- return [
18
+ const resources = [
16
19
  {
17
- uri: "llms://primer",
18
- name: "PICA Domain Primer",
19
- description: "Plain-language description of PICA's domain model, entity relationships, and recommended agent workflows. Read this first.",
20
+ uri: "pica://welcome",
21
+ name: "Welcome to PICA",
22
+ description: "Getting started guide how to sign in and what you can do",
20
23
  mimeType: "text/markdown",
21
24
  },
22
- {
23
- uri: "works://list",
24
- name: "All Works",
25
- description: "Complete list of musical works in the catalog",
26
- mimeType: "application/json",
27
- },
28
- {
29
- uri: "people://list",
30
- name: "All People",
31
- description: "Complete list of people (artists, composers, etc.)",
32
- mimeType: "application/json",
33
- },
34
- {
35
- uri: "recordings://list",
36
- name: "All Recordings",
37
- description: "Complete list of recordings",
38
- mimeType: "application/json",
39
- },
40
- {
41
- uri: "catalog://stats",
42
- name: "Catalog Statistics",
43
- description: "Statistics and metrics about the catalog",
44
- mimeType: "application/json",
45
- },
46
- {
47
- uri: "catalog://health",
48
- name: "Catalog Health (PICA Score)",
49
- description: "PICA Score — composite legibility index (0-100) with grade, 4-pillar breakdown, and actionable suggestions",
50
- mimeType: "application/json",
51
- },
52
- {
53
- uri: "workspace://context",
54
- name: "Workspace Context",
55
- description: "Aggregated workspace orientation — org info, catalog stats, health score, and top priorities in one call",
56
- mimeType: "application/json",
57
- },
58
- {
59
- uri: "events://recent",
60
- name: "Recent Events",
61
- description: "Recent webhook delivery events — what happened in this workspace recently",
62
- mimeType: "application/json",
63
- },
64
- {
65
- uri: "api://openapi",
66
- name: "OpenAPI Specification",
67
- description: "OpenAPI 3.1 spec for the top 20 PICA API endpoints — works, people, recordings, agreements, credits, search, health",
68
- mimeType: "text/yaml",
69
- },
70
25
  ];
26
+ if (this.config?.lobbyMode || !this.pica) {
27
+ return resources;
28
+ }
29
+ resources.push({
30
+ uri: "llms://primer",
31
+ name: "PICA Domain Primer",
32
+ description: "Plain-language description of PICA's domain model, entity relationships, and recommended agent workflows. Read this first.",
33
+ mimeType: "text/markdown",
34
+ }, {
35
+ uri: "works://list",
36
+ name: "All Works",
37
+ description: "Complete list of musical works in the catalog",
38
+ mimeType: "application/json",
39
+ }, {
40
+ uri: "people://list",
41
+ name: "All People",
42
+ description: "Complete list of people (artists, composers, etc.)",
43
+ mimeType: "application/json",
44
+ }, {
45
+ uri: "recordings://list",
46
+ name: "All Recordings",
47
+ description: "Complete list of recordings",
48
+ mimeType: "application/json",
49
+ }, {
50
+ uri: "catalog://stats",
51
+ name: "Catalog Statistics",
52
+ description: "Statistics and metrics about the catalog",
53
+ mimeType: "application/json",
54
+ }, {
55
+ uri: "catalog://health",
56
+ name: "Catalog Health (PICA Score)",
57
+ description: "PICA Score — composite legibility index (0-100) with grade, 4-pillar breakdown, and actionable suggestions",
58
+ mimeType: "application/json",
59
+ }, {
60
+ uri: "workspace://context",
61
+ name: "Workspace Context",
62
+ description: "Aggregated workspace orientation — org info, catalog stats, health score, and top priorities in one call",
63
+ mimeType: "application/json",
64
+ }, {
65
+ uri: "events://recent",
66
+ name: "Recent Events",
67
+ description: "Recent webhook delivery events — what happened in this workspace recently",
68
+ mimeType: "application/json",
69
+ }, {
70
+ uri: "api://openapi",
71
+ name: "OpenAPI Specification",
72
+ description: "OpenAPI 3.1 spec for the top 20 PICA API endpoints — works, people, recordings, agreements, credits, search, health",
73
+ mimeType: "text/yaml",
74
+ }, {
75
+ uri: "ui://pica/briefing",
76
+ name: "Daily Briefing",
77
+ description: "Interactive daily briefing card — catalog health, attention items, activity",
78
+ mimeType: "text/html;profile=mcp-app",
79
+ });
80
+ return resources;
71
81
  }
72
82
  /**
73
83
  * Read a resource by URI
74
84
  */
75
85
  async readResource(uri) {
86
+ switch (uri) {
87
+ case "pica://welcome":
88
+ return {
89
+ contents: [
90
+ {
91
+ uri: "pica://welcome",
92
+ mimeType: "text/markdown",
93
+ text: "# welcome to PICA\n\n" +
94
+ "PICA manages your music catalog — works, recordings, credits, agreements, and more.\n\n" +
95
+ "## get started\n\n" +
96
+ 'Say **"sign me in"** and provide your email address. ' +
97
+ "You'll receive a magic link — click it, and all tools unlock automatically.\n\n" +
98
+ "No API key needed. No config files. Just talk.\n\n" +
99
+ "## what you can do after signing in\n\n" +
100
+ "- Add and manage works, recordings, and credits\n" +
101
+ "- Enrich metadata from Spotify, MusicBrainz, MLC, and more\n" +
102
+ "- Generate exports (CSV, NRO, CAR reports)\n" +
103
+ "- Track agreements and splits\n" +
104
+ "- Search your catalog and get health reports\n",
105
+ },
106
+ ],
107
+ };
108
+ default:
109
+ break;
110
+ }
111
+ if (!this.pica) {
112
+ throw new ResourceError(`Resource not available in lobby mode: ${uri}`);
113
+ }
76
114
  switch (uri) {
77
115
  case "llms://primer":
78
116
  return {
@@ -100,6 +138,16 @@ export class ResourceRegistry {
100
138
  return await this.getRecentEvents();
101
139
  case "api://openapi":
102
140
  return this.getOpenAPISpec();
141
+ case "ui://pica/briefing":
142
+ return {
143
+ contents: [
144
+ {
145
+ uri: "ui://pica/briefing",
146
+ mimeType: "text/html;profile=mcp-app",
147
+ text: BRIEFING_HTML,
148
+ },
149
+ ],
150
+ };
103
151
  default:
104
152
  throw new ResourceError(`Resource not found: ${uri}`);
105
153
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAS7D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAA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E,GAAG,EAAE,kBAAkB;oBACvB,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;iBACrC;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,mBAAmB;QAC/B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAK,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;QAExD,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,qBAAqB;oBAC1B,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;iBACvC;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,eAAe;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAK,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAE9D,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,iBAAiB;oBACtB,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBACtC;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
@@ -1,2 +1,2 @@
1
- export declare const WITHPICA_PRIMER = "# PICA \u2014 Music Catalog Management Platform\n\nPICA helps music creators and publishers manage their catalog metadata,\ntrack royalties, and prepare works for registration with collection societies.\n\n## Core Entities\n\n### Work\nA musical composition (song, piece, library track). The central entity.\n- Has: title, ISWC, work_type (song/library/demo), genre, mood, BPM, key\n- Relationships: has many credits (writers/composers), has many recordings,\n has many agreements, may have audio files, may have multimedia\n- Identifiers: ISWC (global), Tunecode (PRS), CAE/IPI (writer)\n\n### Person\nA human involved in music \u2014 writer, composer, performer, producer, publisher.\n- Has: name, email, IPI number, ISNI, MusicBrainz ID, PRO affiliation\n- Relationships: credited on many works, may have recordings, may have agreements\n- Can be enriched via: ISNI, MusicBrainz, Wikidata\n\n### Recording\nA specific audio capture of a work \u2014 the master/sound recording side.\n- Has: title, ISRC, duration, artist, label\n- Relationships: belongs to one work, has credits (performers/producers)\n- Distinct from the work: a work is the composition, a recording is the performance\n\n### Agreement\nA contract governing rights to works \u2014 publishing, sync, distribution.\n- Has: title, type, parties, dates, territory, terms\n- Relationships: covers many works\n- Types: publishing_admin, co_publishing, master_recording, sub_publishing,\n admin_only, distribution, library_music, production, artist_contract,\n termination, report, other\n\n### Import Document\nA canonical representation of an ingested file (royalty statement, CSV import).\n- Has: source (16 formats \u2014 PROs: PRS, ASCAP, BMI, SESAC, SOCAN, APRA, GEMA, SACEM; NROs: PPL, SoundExchange, GVL; Mechanical: MCPS; Distributors: DistroKid, TuneCore, CD Baby; Revenue: YouTube Content ID), period, line items, field mappings, warnings\n- Immutable snapshot of the import event \u2014 not a live view\n- Use pica_import_documents_list to find them, pica_import_documents_get to read\n\n## First Connection\n\nIf you're connecting to this workspace for the first time or don't know where to start,\ninvoke the **workspace-autopilot** prompt. It reads the workspace state and routes you\nto the most valuable workflow automatically.\n\n## Recommended Workflows\n\n1. **Catalog audit**: pica_catalog_stats \u2192 pica_works_health \u2192 pica_completeness_low\n2. **Enrichment**: pica_enrichment_candidates \u2192 pica_enrich_work/person \u2192 verify\n3. **Statement reconciliation**: pica_import_documents_list \u2192 pica_import_documents_diff\n4. **Duplicate cleanup**: pica_find_duplicates \u2192 review \u2192 pica_merge_duplicates\n5. **Registration readiness**: pica_registration_coverage \u2192 fix gaps \u2192 pica_export_song_registration\n\n## Key Concepts\n\n- **Organisation**: Multi-tenant \u2014 all data scoped to one org. Never cross org boundaries.\n- **PICA Score**: Composite catalog legibility index (0-100, grade A-F). Four pillars:\n identification, documentation, registration, completeness.\n- **Enrichment cascade**: When an identifier is added, external sources\n (MusicBrainz, ISNI, MLC) are queried automatically to fill gaps.\n- **Credits**: Work credits (writers/composers with splits) are distinct from\n recording credits (performers/producers). Different tables, different role enums.\n Work credit roles: writer, composer, arranger, lyricist, producer, performer.\n Recording credit roles: Writer, Composer, Producer, Performer (PascalCase).\n";
1
+ export declare const WITHPICA_PRIMER = "# PICA \u2014 Music Catalog Management Platform\n\nPICA helps music creators and publishers manage their catalog metadata,\ntrack royalties, and prepare works for registration with collection societies.\n\n## Core Entities\n\n### Work\nA musical composition (song, piece, library track). The central entity.\n- Has: title, ISWC, work_type (song/library/demo), genre, mood, BPM, key\n- Relationships: has many credits (writers/composers), has many recordings,\n has many agreements, may have audio files, may have multimedia\n- Identifiers: ISWC (global), Tunecode (PRS), CAE/IPI (writer)\n\n### Person\nA human involved in music \u2014 writer, composer, performer, producer, publisher.\n- Has: name, email, IPI number, ISNI, MusicBrainz ID, PRO affiliation\n- Relationships: credited on many works, may have recordings, may have agreements\n- Can be enriched via: ISNI, MusicBrainz, Wikidata\n\n### Recording\nA specific audio capture of a work \u2014 the master/sound recording side.\n- Has: title, ISRC, duration, artist, label\n- Relationships: belongs to one work, has credits (performers/producers)\n- Distinct from the work: a work is the composition, a recording is the performance\n\n### Agreement\nA contract governing rights to works \u2014 publishing, sync, distribution.\n- Has: title, type, parties, dates, territory, terms\n- Relationships: covers many works\n- Types: publishing_admin, co_publishing, master_recording, sub_publishing,\n admin_only, distribution, library_music, production, artist_contract,\n termination, report, other\n\n### Import Document\nA canonical representation of an ingested file (royalty statement, CSV import).\n- Has: source (16 formats \u2014 PROs: PRS, ASCAP, BMI, SESAC, SOCAN, APRA, GEMA, SACEM; NROs: PPL, SoundExchange, GVL; Mechanical: MCPS; Distributors: DistroKid, TuneCore, CD Baby; Revenue: YouTube Content ID), period, line items, field mappings, warnings\n- Immutable snapshot of the import event \u2014 not a live view\n- Use pica_import_documents_list to find them, pica_import_documents_get to read\n\n## First Connection\n\nIf you're connecting to this workspace for the first time or don't know where to start,\ninvoke the **workspace-autopilot** prompt. It reads the workspace state and routes you\nto the most valuable workflow automatically.\n\n## Recommended Workflows\n\n1. **Catalog audit**: pica_catalog_stats \u2192 pica_works_query({ health_filter: \"needs_attention\" }) \u2192 pica_works_inspect({ sections: [\"completeness\"] })\n2. **Enrichment**: pica_enrichment_candidates \u2192 pica_enrich_work_spotify/mlc/musicbrainz \u2192 pica_works_inspect (verify)\n3. **Statement reconciliation**: pica_import_documents_query \u2192 pica_import_documents_inspect({ sections: [\"diff\"] })\n4. **Duplicate cleanup**: pica_find_duplicates \u2192 review \u2192 pica_merge_duplicates\n5. **Registration readiness**: pica_works_inspect({ sections: [\"registration\"] }) \u2192 fix gaps \u2192 pica_export_song_registration\n\n## Key Concepts\n\n- **Organisation**: Multi-tenant \u2014 all data scoped to one org. Never cross org boundaries.\n- **PICA Score**: Composite catalog legibility index (0-100, grade A-F). Four pillars:\n identification, documentation, registration, completeness.\n- **Enrichment cascade**: When an identifier is added, external sources\n (MusicBrainz, ISNI, MLC) are queried automatically to fill gaps.\n- **Credits**: Work credits (writers/composers with splits) are distinct from\n recording credits (performers/producers). Different tables, different role enums.\n Work credit roles: writer, composer, arranger, lyricist, producer, performer.\n Recording credit roles: Writer, Composer, Producer, Performer (PascalCase).\n";
2
2
  //# sourceMappingURL=llms-primer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"llms-primer.d.ts","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,8+GAiE3B,CAAC"}
1
+ {"version":3,"file":"llms-primer.d.ts","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,kpHAiE3B,CAAC"}
@@ -47,11 +47,11 @@ to the most valuable workflow automatically.
47
47
 
48
48
  ## Recommended Workflows
49
49
 
50
- 1. **Catalog audit**: pica_catalog_stats → pica_works_healthpica_completeness_low
51
- 2. **Enrichment**: pica_enrichment_candidates → pica_enrich_work/person → verify
52
- 3. **Statement reconciliation**: pica_import_documents_listpica_import_documents_diff
50
+ 1. **Catalog audit**: pica_catalog_stats → pica_works_query({ health_filter: "needs_attention" }) pica_works_inspect({ sections: ["completeness"] })
51
+ 2. **Enrichment**: pica_enrichment_candidates → pica_enrich_work_spotify/mlc/musicbrainzpica_works_inspect (verify)
52
+ 3. **Statement reconciliation**: pica_import_documents_querypica_import_documents_inspect({ sections: ["diff"] })
53
53
  4. **Duplicate cleanup**: pica_find_duplicates → review → pica_merge_duplicates
54
- 5. **Registration readiness**: pica_registration_coverage → fix gaps → pica_export_song_registration
54
+ 5. **Registration readiness**: pica_works_inspect({ sections: ["registration"] }) → fix gaps → pica_export_song_registration
55
55
 
56
56
  ## Key Concepts
57
57
 
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Server-level instructions sent to agents on MCP handshake.
3
+ * Keep under 2000 chars — this is context budget, not documentation.
4
+ *
5
+ * Block playbook: "document the high level of your server"
6
+ * Lowin: "instructions are context — design them as context"
7
+ */
8
+ export declare const SERVER_INSTRUCTIONS = "PICA manages music catalog metadata \u2014 works, recordings, people, credits, agreements, and rights.\n\nStart here:\n- pica_dashboard_briefing \u2014 daily summary of what needs attention\n- pica_search_all \u2014 find any entity by name, ISWC, ISRC, or IPI\n- pica_works_query / pica_people_query \u2014 browse the catalog\n\nKey patterns:\n- Read tools are safe to call freely (annotated readOnlyHint=true)\n- Use _inspect tools with sections param for targeted data (e.g., pica_works_inspect with sections: [\"basic\", \"credits\"])\n- Write tools (create/update) confirm what changed after execution\n- Destructive tools (delete/merge) require a two-step confirmation with a token\n- Errors include a \"suggestion\" field with recovery instructions and a \"next_tool\" to try\n\nTool categories: catalog, enrichment, business, discovery, media, comms, settings.\nUse pica_dashboard_attention for items needing action.\nUse pica_works_inspect with sections: [\"health\", \"completeness\"] to check data quality.\nEnrichment tools (pica_enrich_work_*) pull from external sources \u2014 Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube.\nThe agent orchestrates enrichment \u2014 try sources based on available identifiers, follow recovery hints.\n\nAll query endpoints accept \"limit\" (default 50) and return paginated results.\nIDs are UUIDs. When unsure of an ID, use a _query tool first.\n\nWhen calling write tools: briefly tell the user what you're about to do before calling. After execution, confirm what changed.\nWhen calling destructive tools: describe exactly what will be deleted/merged and get explicit user confirmation before calling.";
9
+ //# sourceMappingURL=server-instructions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,2nDAwBgG,CAAC"}
@@ -0,0 +1,34 @@
1
+ // Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
2
+ /**
3
+ * Server-level instructions sent to agents on MCP handshake.
4
+ * Keep under 2000 chars — this is context budget, not documentation.
5
+ *
6
+ * Block playbook: "document the high level of your server"
7
+ * Lowin: "instructions are context — design them as context"
8
+ */
9
+ export const SERVER_INSTRUCTIONS = `PICA manages music catalog metadata — works, recordings, people, credits, agreements, and rights.
10
+
11
+ Start here:
12
+ - pica_dashboard_briefing — daily summary of what needs attention
13
+ - pica_search_all — find any entity by name, ISWC, ISRC, or IPI
14
+ - pica_works_query / pica_people_query — browse the catalog
15
+
16
+ Key patterns:
17
+ - Read tools are safe to call freely (annotated readOnlyHint=true)
18
+ - Use _inspect tools with sections param for targeted data (e.g., pica_works_inspect with sections: ["basic", "credits"])
19
+ - Write tools (create/update) confirm what changed after execution
20
+ - Destructive tools (delete/merge) require a two-step confirmation with a token
21
+ - Errors include a "suggestion" field with recovery instructions and a "next_tool" to try
22
+
23
+ Tool categories: catalog, enrichment, business, discovery, media, comms, settings.
24
+ Use pica_dashboard_attention for items needing action.
25
+ Use pica_works_inspect with sections: ["health", "completeness"] to check data quality.
26
+ Enrichment tools (pica_enrich_work_*) pull from external sources — Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube.
27
+ The agent orchestrates enrichment — try sources based on available identifiers, follow recovery hints.
28
+
29
+ All query endpoints accept "limit" (default 50) and return paginated results.
30
+ IDs are UUIDs. When unsure of an ID, use a _query tool first.
31
+
32
+ When calling write tools: briefly tell the user what you're about to do before calling. After execution, confirm what changed.
33
+ When calling destructive tools: describe exactly what will be deleted/merged and get explicit user confirmation before calling.`;
34
+ //# sourceMappingURL=server-instructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;gIAwB6F,CAAC"}
package/dist/server.d.ts CHANGED
@@ -8,6 +8,10 @@ export declare class PicaMcpServer {
8
8
  private config;
9
9
  private httpServer?;
10
10
  constructor(config: ServerConfig);
11
+ /**
12
+ * Reinitialize server with new credentials (called after successful auth)
13
+ */
14
+ reinitialize(apiKey: string): void;
11
15
  /**
12
16
  * Set up MCP protocol handlers on the main server instance (for stdio)
13
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAM3C,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,UAAU,CAAC,CAAkC;gBAEzC,MAAM,EAAE,YAAY;IAiChC;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB;;;;;;OAMG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAkBd,UAAU;YAKV,SAAS;IAwHvB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA6CxB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAS5B"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO3C,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAoB;IAChC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,UAAU,CAAC,CAAkC;gBAEzC,MAAM,EAAE,YAAY;IAsChC;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAgBlC;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB;;;;;;OAMG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAmBd,UAAU;YAKV,SAAS;IAwHvB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA6CxB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAS5B"}
package/dist/server.js CHANGED
@@ -13,6 +13,7 @@ import { ToolRegistry } from "./tools/index.js";
13
13
  import { ResourceRegistry } from "./resources/index.js";
14
14
  import { PromptRegistry } from "./prompts/index.js";
15
15
  import { logError } from "./utils/errors.js";
16
+ import { SERVER_INSTRUCTIONS } from "./server-instructions.js";
16
17
  export class PicaMcpServer {
17
18
  server;
18
19
  pica;
@@ -23,12 +24,17 @@ export class PicaMcpServer {
23
24
  httpServer;
24
25
  constructor(config) {
25
26
  this.config = config;
26
- // Initialize PICA SDK client
27
- this.pica = new PicaClient({
28
- apiKey: config.picaApiKey,
29
- baseUrl: config.picaApiUrl,
30
- debug: config.debug,
31
- });
27
+ // Initialize PICA SDK client (null in lobby mode)
28
+ if (config.picaApiKey) {
29
+ this.pica = new PicaClient({
30
+ apiKey: config.picaApiKey,
31
+ baseUrl: config.picaApiUrl,
32
+ debug: config.debug,
33
+ });
34
+ }
35
+ else {
36
+ this.pica = null;
37
+ }
32
38
  // Initialize MCP server
33
39
  this.server = new Server({
34
40
  name: config.serverName,
@@ -39,13 +45,28 @@ export class PicaMcpServer {
39
45
  resources: {},
40
46
  prompts: {},
41
47
  },
48
+ instructions: SERVER_INSTRUCTIONS,
42
49
  });
43
50
  // Initialize registries
44
- this.toolRegistry = new ToolRegistry(this.pica);
45
- this.resourceRegistry = new ResourceRegistry(this.pica);
51
+ this.toolRegistry = new ToolRegistry(this.pica, config, (apiKey) => this.reinitialize(apiKey));
52
+ this.resourceRegistry = new ResourceRegistry(this.pica, config);
46
53
  this.promptRegistry = new PromptRegistry();
47
54
  this.setupHandlers();
48
55
  }
56
+ /**
57
+ * Reinitialize server with new credentials (called after successful auth)
58
+ */
59
+ reinitialize(apiKey) {
60
+ this.pica = new PicaClient({
61
+ apiKey,
62
+ baseUrl: this.config.picaApiUrl,
63
+ debug: this.config.debug,
64
+ });
65
+ this.config = { ...this.config, picaApiKey: apiKey, lobbyMode: false };
66
+ this.toolRegistry = new ToolRegistry(this.pica, this.config, (key) => this.reinitialize(key));
67
+ this.resourceRegistry = new ResourceRegistry(this.pica, this.config);
68
+ console.error("[MCP Server] Reinitialized with new credentials");
69
+ }
49
70
  /**
50
71
  * Set up MCP protocol handlers on the main server instance (for stdio)
51
72
  */
@@ -70,6 +91,7 @@ export class PicaMcpServer {
70
91
  console.error("[MCP Server] PICA MCP Server started");
71
92
  console.error(`[MCP Server] Version: ${this.config.version}`);
72
93
  console.error(`[MCP Server] Transport: ${mode === "http" ? "HTTP" : "stdio"}`);
94
+ console.error(`[MCP Server] Mode: ${this.config.lobbyMode ? "lobby (sign in to connect)" : "authenticated"}`);
73
95
  console.error(`[MCP Server] API URL: ${this.config.picaApiUrl}`);
74
96
  console.error("[MCP Server] Ready to accept connections");
75
97
  }