@insforge/install 0.0.27 → 0.0.28

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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "enabledMcpjsonServers": [
3
+ "insforge"
4
+ ],
5
+ "enableAllProjectMcpServers": true
6
+ }
package/.mcp.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "mcpServers": {
3
+ "insforge": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@insforge/mcp@latest"
8
+ ],
9
+ "env": {
10
+ "API_KEY": "ik_fff113df777823a0518b8067e4f4f49bb11661904af26b9fda2ac80892b0558c",
11
+ "API_BASE_URL": "http://localhost:7130"
12
+ }
13
+ }
14
+ }
15
+ }
package/dist/index.js CHANGED
@@ -58,44 +58,20 @@ import {
58
58
  const mcpVersion = argv.dev ? "@insforge/mcp@dev" : "@insforge/mcp@latest";
59
59
  try {
60
60
  const config = readConfig(argv.client);
61
-
61
+
62
62
  // Handle different config structures for different clients
63
63
  if (argv.client === "claude-code") {
64
- // Use Claude CLI for Claude Code
65
- const homeDir = os.homedir();
66
- const isWindows = process.platform === 'win32';
67
- const claudePath = isWindows
68
- ? path.join(homeDir, 'AppData', 'Roaming', 'npm', 'claude')
69
- : path.join(homeDir, '.claude', 'local', 'claude');
70
-
71
- const envArgs = Object.entries(envVars)
72
- .filter(([key]) => key !== 'CLIENT_NAME')
73
- .map(([key, value]) => `-e ${key}=${value}`)
74
- .join(' ');
75
-
76
- try {
77
- // First try to remove existing insforge MCP if it exists
78
- try {
79
- execSync(`"${claudePath}" mcp remove ${name}`, {
80
- stdio: 'pipe',
81
- shell: true
82
- });
83
- logger.info("Removed existing insforge MCP installation.");
84
- } catch (removeError) {
85
- // It's okay if remove fails - the MCP might not exist
86
- logger.info("No existing insforge MCP found");
64
+ // Claude Code uses mcpServers at root level
65
+ if (!config.mcpServers) config.mcpServers = {};
66
+ config.mcpServers[name] = {
67
+ command: "npx",
68
+ args: ["-y", mcpVersion],
69
+ env: {
70
+ API_KEY: envVars.API_KEY,
71
+ API_BASE_URL: envVars.API_BASE_URL
87
72
  }
88
-
89
- // Now add the MCP server
90
- const command = `"${claudePath}" mcp add ${name} ${envArgs} -- npx -y ${mcpVersion}`;
91
- logger.info(`Adding insforge MCP server (${mcpVersion})...`);
92
- execSync(command, {
93
- stdio: 'inherit',
94
- shell: true
95
- });
96
- } catch (error) {
97
- throw new Error(`Failed to add MCP server via Claude CLI: ${error.message}`);
98
- }
73
+ };
74
+ writeConfig(config, argv.client);
99
75
  } else if (argv.client === "codex") {
100
76
  // Use Codex CLI for Codex
101
77
  const homeDir = os.homedir();
package/dist/utils.js CHANGED
@@ -28,10 +28,10 @@ var platformPaths = {
28
28
  var platform = process.platform;
29
29
  var { baseDir, vscodePath } = platformPaths[platform];
30
30
  var clientPaths = {
31
- // "claude-code": {
32
- // type: "file",
33
- // path: path.join(homeDir, ".claude", "claude_mcp_config.json")
34
- // },
31
+ "claude-code": {
32
+ type: "file",
33
+ path: path.join(process.cwd(), ".mcp.json")
34
+ },
35
35
  cursor: {
36
36
  type: "file",
37
37
  path: path.join(homeDir, ".cursor", "mcp.json"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insforge/install",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "CLI tool for installing Insforge MCP servers across different AI clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",