add-mcp 1.3.0 → 1.4.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.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Add MCP servers to your favorite coding agents with a single command.
4
4
 
5
- Supports **Claude Code**, **Codex**, **Cursor**, **OpenCode**, **VSCode** and [7 more](#supported-agents).
5
+ Supports **Claude Code**, **Codex**, **Cursor**, **OpenCode**, **VSCode** and [8 more](#supported-agents).
6
6
 
7
7
  ## Install an MCP Server
8
8
 
@@ -147,6 +147,7 @@ MCP servers can be installed to any of these agents:
147
147
  | Gemini CLI | `gemini-cli` | `.gemini/settings.json` | `~/.gemini/settings.json` |
148
148
  | Goose | `goose` | `.goose/config.yaml` | `~/.config/goose/config.yaml` |
149
149
  | GitHub Copilot CLI | `github-copilot-cli` | `.vscode/mcp.json` | `~/.copilot/mcp-config.json` |
150
+ | MCPorter | `mcporter` | `config/mcporter.json` | `~/.mcporter/mcporter.json` (or existing `~/.mcporter/mcporter.jsonc`) |
150
151
  | OpenCode | `opencode` | `opencode.json` | `~/.config/opencode/opencode.json` |
151
152
  | VS Code | `vscode` | `.vscode/mcp.json` | `~/Library/Application Support/Code/User/mcp.json` |
152
153
  | Zed | `zed` | `.zed/settings.json` | `~/Library/Application Support/Zed/settings.json` |
package/dist/index.js CHANGED
@@ -249,6 +249,20 @@ function transformGitHubCopilotCliConfig(_serverName, config, context) {
249
249
  }
250
250
  return localConfig;
251
251
  }
252
+ function resolveMcporterConfigPath(agent, options) {
253
+ if (options.local && agent.localConfigPath) {
254
+ return join2(options.cwd, agent.localConfigPath);
255
+ }
256
+ const globalJsonPath = agent.configPath;
257
+ const globalJsoncPath = join2(dirname2(globalJsonPath), "mcporter.jsonc");
258
+ if (existsSync(globalJsonPath)) {
259
+ return globalJsonPath;
260
+ }
261
+ if (existsSync(globalJsoncPath)) {
262
+ return globalJsoncPath;
263
+ }
264
+ return globalJsonPath;
265
+ }
252
266
  var agents = {
253
267
  cline: {
254
268
  name: "cline",
@@ -378,6 +392,20 @@ var agents = {
378
392
  },
379
393
  transformConfig: transformGitHubCopilotCliConfig
380
394
  },
395
+ mcporter: {
396
+ name: "mcporter",
397
+ displayName: "MCPorter",
398
+ configPath: join2(home, ".mcporter", "mcporter.json"),
399
+ localConfigPath: "config/mcporter.json",
400
+ projectDetectPaths: ["config/mcporter.json"],
401
+ configKey: "mcpServers",
402
+ format: "json",
403
+ supportedTransports: ["stdio", "http", "sse"],
404
+ detectGlobalInstall: async () => {
405
+ return existsSync(join2(home, ".mcporter"));
406
+ },
407
+ resolveConfigPath: resolveMcporterConfigPath
408
+ },
381
409
  opencode: {
382
410
  name: "opencode",
383
411
  displayName: "OpenCode",
@@ -938,8 +966,12 @@ function updateGitignoreWithPaths(paths, options = {}) {
938
966
  };
939
967
  }
940
968
  function getConfigPath(agent, options = {}) {
941
- if (options.local && agent.localConfigPath) {
942
- const cwd = options.cwd || process.cwd();
969
+ const local = Boolean(options.local);
970
+ const cwd = options.cwd || process.cwd();
971
+ if (agent.resolveConfigPath) {
972
+ return agent.resolveConfigPath(agent, { local, cwd });
973
+ }
974
+ if (local && agent.localConfigPath) {
943
975
  return join3(cwd, agent.localConfigPath);
944
976
  }
945
977
  return agent.configPath;
@@ -998,7 +1030,7 @@ function installServer(serverName, serverConfig, agentTypes, options = {}) {
998
1030
  // package.json
999
1031
  var package_default = {
1000
1032
  name: "add-mcp",
1001
- version: "1.3.0",
1033
+ version: "1.4.0",
1002
1034
  description: "Add MCP servers to your favorite coding agents with a single command.",
1003
1035
  author: "Andre Landgraf <andre@neon.tech>",
1004
1036
  license: "Apache-2.0",
@@ -1033,6 +1065,7 @@ var package_default = {
1033
1065
  "github-copilot-cli",
1034
1066
  "gemini-cli",
1035
1067
  "goose",
1068
+ "mcporter",
1036
1069
  "opencode",
1037
1070
  "vscode",
1038
1071
  "zed"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "add-mcp",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Add MCP servers to your favorite coding agents with a single command.",
5
5
  "author": "Andre Landgraf <andre@neon.tech>",
6
6
  "license": "Apache-2.0",
@@ -35,6 +35,7 @@
35
35
  "github-copilot-cli",
36
36
  "gemini-cli",
37
37
  "goose",
38
+ "mcporter",
38
39
  "opencode",
39
40
  "vscode",
40
41
  "zed"