mta-mcp 2.4.0 → 2.4.1

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 (2) hide show
  1. package/bin/mta.cjs +4 -2
  2. package/package.json +1 -1
package/bin/mta.cjs CHANGED
@@ -7,6 +7,7 @@
7
7
 
8
8
  const { existsSync } = require('fs');
9
9
  const { join } = require('path');
10
+ const { pathToFileURL } = require('url');
10
11
 
11
12
  // 检测 Node.js 版本
12
13
  const nodeVersion = process.versions.node;
@@ -30,8 +31,9 @@ if (!existsSync(esmPath)) {
30
31
  process.exit(1);
31
32
  }
32
33
 
33
- // 加载 ES Module
34
- import(esmPath).catch(err => {
34
+ // 加载 ES Module - 在 Windows 上必须转换为 file:// URL
35
+ const esmUrl = pathToFileURL(esmPath).href;
36
+ import(esmUrl).catch(err => {
35
37
  console.error('[MCP Error] 启动失败:', err.message);
36
38
  process.exit(1);
37
39
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mta-mcp",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "MTA - 智能项目分析与编码规范管理 MCP 服务器,为 GitHub Copilot 和 Claude 提供项目分析、规范匹配、模板管理功能",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",