@cg3/equip 0.2.0 → 0.2.2

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/lib/mcp.js +7 -4
  2. package/package.json +1 -1
package/lib/mcp.js CHANGED
@@ -189,8 +189,9 @@ function readMcpEntry(configPath, rootKey, serverName, configFormat = "json") {
189
189
  function buildHttpConfig(serverUrl, platform) {
190
190
  if (platform === "windsurf") return { serverUrl };
191
191
  if (platform === "vscode") return { type: "http", url: serverUrl };
192
+ if (platform === "cursor") return { type: "streamable-http", url: serverUrl };
192
193
  if (platform === "gemini-cli") return { httpUrl: serverUrl };
193
- // codex, claude-code, cursor, cline, roo-code all use { url }
194
+ // codex, claude-code, cline, roo-code all use { url }
194
195
  return { url: serverUrl };
195
196
  }
196
197
 
@@ -318,11 +319,13 @@ function installMcp(platform, serverName, mcpEntry, options = {}) {
318
319
  } catch { /* fall through */ }
319
320
  }
320
321
 
321
- // Codex: try CLI first (codex mcp add <name> <url>)
322
- if (platform.platform === "codex" && platform.hasCli && mcpEntry.url) {
322
+ // Codex: skip CLI for HTTP (codex mcp add treats URLs as stdio commands).
323
+ // Use CLI only for stdio transport where the command syntax is unambiguous.
324
+ if (platform.platform === "codex" && platform.hasCli && mcpEntry.command) {
323
325
  try {
326
+ const cliArgs = [serverName, "--", mcpEntry.command, ...(mcpEntry.args || [])].join(" ");
324
327
  if (!dryRun) {
325
- execSync(`codex mcp add ${serverName} ${mcpEntry.url}`, {
328
+ execSync(`codex mcp add ${cliArgs}`, {
326
329
  encoding: "utf-8", timeout: 15000, stdio: "pipe",
327
330
  });
328
331
  const check = readMcpEntry(platform.configPath, platform.rootKey, serverName, "toml");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cg3/equip",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Universal MCP + behavioral rules installer for AI coding agents",
5
5
  "main": "index.js",
6
6
  "bin": {