@ppdocs/mcp 3.2.5 → 3.2.6

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.
@@ -453,7 +453,7 @@ export function startWebServer(webPort) {
453
453
  // 获取各平台 MCP 配置的路径和服务器名称
454
454
  const getMcpSpecs = (dir, projId) => ({
455
455
  cursor: { path: path.join(dir, '.cursor', 'mcp.json'), name: 'ppdocs-kg' },
456
- antigravity: { path: path.join(dir, '.gemini', 'settings.json'), name: 'ppdocs-kg' },
456
+ antigravity: { path: path.join(dir, '.gemini', 'settings.json'), name: `ppdocs-kg-${projId}` },
457
457
  vscode: { path: path.join(dir, '.vscode', 'cline_mcp_settings.json'), name: 'ppdocs-kg' },
458
458
  claude: { path: getClaudeGlobalPath(), name: `ppdocs-kg-${projId}` },
459
459
  lobechat: { path: '', name: 'ppdocs-kg' }, // 无本地文件,靠复制配置
@@ -579,16 +579,20 @@ function hasMcpInJson(filePath, serverName) {
579
579
  return false;
580
580
  }
581
581
  }
582
- /** 构建 MCP server 配置对象 (不传 PPDOCS_API_URL,依赖 cwd/.ppdocs 文件自动识别项目) */
583
- function buildMcpServerConfig(_apiUrl, isWindows) {
582
+ /** 构建 MCP server 配置对象 (通过 PPDOCS_API_URL 环境变量隔离项目) */
583
+ function buildMcpServerConfig(apiUrl, isWindows) {
584
584
  return isWindows ? {
585
585
  command: 'cmd',
586
586
  args: ['/c', 'npx', '-y', '@ppdocs/mcp@latest'],
587
+ env: {
588
+ PPDOCS_API_URL: apiUrl,
589
+ },
587
590
  } : {
588
591
  command: 'npx',
589
592
  args: ['-y', '@ppdocs/mcp@latest'],
590
593
  env: {
591
594
  PATH: `${process.env.PATH || '/usr/bin:/bin'}:/usr/local/bin:/opt/homebrew/bin`,
595
+ PPDOCS_API_URL: apiUrl,
592
596
  },
593
597
  };
594
598
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ppdocs/mcp",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "description": "ppdocs MCP Server - Knowledge Graph for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",