@ppdocs/mcp 3.8.0 → 3.9.0

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/dist/cli.js +4 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -3,6 +3,7 @@
3
3
  * 命令: init - 初始化项目配置 + 安装工作流模板 + 自动注册 MCP
4
4
  */
5
5
  import * as fs from 'fs';
6
+ import * as os from 'os';
6
7
  import * as path from 'path';
7
8
  import { fileURLToPath } from 'url';
8
9
  import { execSync } from 'child_process';
@@ -294,12 +295,12 @@ function autoRegisterMcp(cwd, apiUrl, user, skipGemini = false) {
294
295
  console.log(`⚠️ Codex MCP registration failed`);
295
296
  }
296
297
  }
297
- // Gemini CLI
298
+ // Gemini CLI (gemini mcp add 不支持 --env,直接写 settings.json)
298
299
  if (commandExists('gemini') && !skipGemini) {
299
300
  detected.push('Gemini');
300
301
  try {
301
- execSilent(`gemini mcp remove ${serverName}`);
302
- execSync(`gemini mcp add ${serverName} "npx -y @ppdocs/mcp@latest"`, { stdio: 'inherit' });
302
+ const geminiSettings = path.join(os.homedir(), '.gemini', 'settings.json');
303
+ createMcpConfigAt(geminiSettings, apiUrl, { user, projectRoot: cwd });
303
304
  }
304
305
  catch {
305
306
  console.log(`⚠️ Gemini MCP registration failed`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ppdocs/mcp",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "description": "ppdocs MCP Server - Knowledge Graph for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",