mr-magic-mcp-server 0.3.7 → 0.3.8

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.8",
4
4
  "description": "Lyrics MCP server connecting LRCLIB, Genius, Musixmatch, and Melon",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/tools/cli.js CHANGED
@@ -356,7 +356,7 @@ program
356
356
  },
357
357
  []
358
358
  )
359
- .option('--output <dir>', 'Directory to write exports (requires --export)', 'exports')
359
+ .option('--output <dir>', 'Directory to write exports (requires --export; defaults to MR_MAGIC_EXPORT_DIR or ./exports)')
360
360
  .option('--no-romanize', 'Disable romanized lyrics', false)
361
361
  .action(async (options) => {
362
362
  const track = buildTrackFromOptions(options);
@@ -542,7 +542,7 @@ program
542
542
  },
543
543
  []
544
544
  )
545
- .option('--output <dir>', 'Directory for exports (requires --export)', 'exports')
545
+ .option('--output <dir>', 'Directory for exports (requires --export; defaults to MR_MAGIC_EXPORT_DIR or ./exports)')
546
546
  .option('--no-romanize', 'Disable romanized lyrics', false)
547
547
  .action(async (options) => {
548
548
  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') {