mr-magic-mcp-server 0.3.7 → 0.3.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mr-magic-mcp-server",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "Lyrics MCP server connecting LRCLIB, Genius, Musixmatch, and Melon",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -324,9 +324,9 @@ function testRomanization() {
324
324
  // 깻: ㄷ-representative of ㅅ batchim; 잎: ㅇ initial (silent) → liaison
325
325
  // Actually 깻 = ㄲ+ㅖ+ㅅ, 잎 = ㅇ+ㅣ+ㅍ
326
326
  // Liaison: 잎 initial ㅇ → ㅅ(깻) moves to 잎 onset: → 깨 + 씹? No:
327
- // 깻: batchim ㅅ; 잎: initial ㅇ → 깻 coda ㅅ moves to 잎 as initial 'ss'?
327
+ // 깻: batchim ㅅ; 잎: initial ㅇ → 깻 coda ㅅ moves to 잎 as initial 'ss'?
328
328
  // Standard Korean: 깻잎 → [깬닙] (nasalization of ㅅ→ㄴ before ㅣ? No.
329
- // Actually: 깻잎 → liaison: 깻(ㅅ) + 잎(ㅇ) → 깨싫...
329
+ // Actually: 깻잎 → liaison: 깻(ㅅ) + 잎(ㅇ) → 깨싫...
330
330
  // Correct pronunciation: 깻잎 [깬닙] — the ㅅ turns to ㄴ (because 잎's ㅍ batchim + ㄴ?)
331
331
  // Simpler: official = kkaennip. Our engine: 깻(ㅅ liaison to 잎ㅇ) → 깨 + 싶 → 깨십.
332
332
  // The 잎 ㅍ final stays = p. 깻잎 → Kkaesip via liaison. That's our engine's output.
package/src/tools/cli.js CHANGED
@@ -356,7 +356,10 @@ program
356
356
  },
357
357
  []
358
358
  )
359
- .option('--output <dir>', 'Directory to write exports (requires --export)', 'exports')
359
+ .option(
360
+ '--output <dir>',
361
+ 'Directory to write exports (requires --export; defaults to MR_MAGIC_EXPORT_DIR or ./exports)'
362
+ )
360
363
  .option('--no-romanize', 'Disable romanized lyrics', false)
361
364
  .action(async (options) => {
362
365
  const track = buildTrackFromOptions(options);
@@ -542,7 +545,10 @@ program
542
545
  },
543
546
  []
544
547
  )
545
- .option('--output <dir>', 'Directory for exports (requires --export)', 'exports')
548
+ .option(
549
+ '--output <dir>',
550
+ 'Directory for exports (requires --export; defaults to MR_MAGIC_EXPORT_DIR or ./exports)'
551
+ )
546
552
  .option('--no-romanize', 'Disable romanized lyrics', false)
547
553
  .action(async (options) => {
548
554
  const track = buildTrackFromOptions(options);
@@ -6,7 +6,6 @@ import {
6
6
  buildActionContext,
7
7
  buildPayloadFromResult,
8
8
  buildCatalogPayload,
9
- exportBestResult,
10
9
  formatRecord,
11
10
  catalogCache,
12
11
  catalogCacheKey
@@ -403,8 +402,9 @@ export async function handleMcpTool(name, args = {}) {
403
402
  const result = await runFind(track, options);
404
403
  const context = buildActionContext({ ...options, export: true });
405
404
  const payload = await buildPayloadFromResult(result, context);
406
- const exports = await exportBestResult(result, context);
407
- return { result: payload, exports };
405
+ // buildPayloadFromResult already calls exportBestResult internally when
406
+ // context.shouldExport is true — avoid exporting twice by reusing payload.exports.
407
+ return { result: payload, exports: payload.exports ?? null };
408
408
  }
409
409
 
410
410
  if (name === 'format_lyrics') {