@lorrylurui/code-intelligence-mcp 1.1.13 → 1.1.14

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.
@@ -17,7 +17,7 @@ for (const arg of process.argv) {
17
17
  // override: false,
18
18
  // });
19
19
  // MCP Server 本地 .env 路径(固定指向项目根目录)
20
- const MCP_SERVER_ROOT = path.resolve(__dirname, '..', '..'); // MCP Server 根目录
20
+ const MCP_SERVER_ROOT = path.resolve(__dirname, '..', '..', './dist'); // MCP Server 根目录
21
21
  const MCP_SERVER_ENV_PATH = path.resolve(MCP_SERVER_ROOT, '.env');
22
22
  dotenv.config({
23
23
  path: MCP_SERVER_ENV_PATH,
package/dist/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
- import { validateEnv } from './config/env.js';
3
+ import { loadProjectDotenv } from './config/env.js';
4
4
  import { createServer } from './server/createServer.js';
5
5
  async function main() {
6
- validateEnv();
6
+ // 加载第三方项目的 .env(通过 INDEX_ROOT 指定,或默认当前工作目录)
7
+ const projectRoot = process.env.INDEX_ROOT || process.cwd();
8
+ loadProjectDotenv(projectRoot);
7
9
  const server = createServer();
8
10
  const transport = new StdioServerTransport();
9
11
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lorrylurui/code-intelligence-mcp",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "private": false,
5
5
  "description": "MCP server 提供仓库内可复用代码块(ts/tsx/js/jsx/css/less)的索引和查询能力,支持基于代码上下文的智能推荐。",
6
6
  "type": "module",