add-mcp 1.2.2 → 1.3.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 (3) hide show
  1. package/README.md +17 -15
  2. package/dist/index.js +67 -2
  3. package/package.json +2 -1
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 [5 more](#supported-agents).
5
+ Supports **Claude Code**, **Codex**, **Cursor**, **OpenCode**, **VSCode** and [7 more](#supported-agents).
6
6
 
7
7
  ## Install an MCP Server
8
8
 
@@ -136,20 +136,22 @@ Header support is available for remote installs across all supported agents.
136
136
 
137
137
  MCP servers can be installed to any of these agents:
138
138
 
139
- | Agent | `--agent` | Project Path | Global Path |
140
- | ------------------ | -------------------- | ----------------------- | ----------------------------------------------------------------- |
141
- | Claude Code | `claude-code` | `.mcp.json` | `~/.claude.json` |
142
- | Claude Desktop | `claude-desktop` | - | `~/Library/Application Support/Claude/claude_desktop_config.json` |
143
- | Codex | `codex` | `.codex/config.toml` | `~/.codex/config.toml` |
144
- | Cursor | `cursor` | `.cursor/mcp.json` | `~/.cursor/mcp.json` |
145
- | Gemini CLI | `gemini-cli` | `.gemini/settings.json` | `~/.gemini/settings.json` |
146
- | Goose | `goose` | `.goose/config.yaml` | `~/.config/goose/config.yaml` |
147
- | GitHub Copilot CLI | `github-copilot-cli` | `.vscode/mcp.json` | `~/.copilot/mcp-config.json` |
148
- | OpenCode | `opencode` | `opencode.json` | `~/.config/opencode/opencode.json` |
149
- | VS Code | `vscode` | `.vscode/mcp.json` | `~/Library/Application Support/Code/User/mcp.json` |
150
- | Zed | `zed` | `.zed/settings.json` | `~/Library/Application Support/Zed/settings.json` |
151
-
152
- **Aliases:** `gemini` `gemini-cli`, `github-copilot` `vscode`
139
+ | Agent | `--agent` | Project Path | Global Path |
140
+ | ---------------------- | -------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------------- |
141
+ | Cline VSCode Extension | `cline` | - | `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` |
142
+ | Cline CLI | `cline-cli` | - | `~/.cline/data/settings/cline_mcp_settings.json` |
143
+ | Claude Code | `claude-code` | `.mcp.json` | `~/.claude.json` |
144
+ | Claude Desktop | `claude-desktop` | - | `~/Library/Application Support/Claude/claude_desktop_config.json` |
145
+ | Codex | `codex` | `.codex/config.toml` | `~/.codex/config.toml` |
146
+ | Cursor | `cursor` | `.cursor/mcp.json` | `~/.cursor/mcp.json` |
147
+ | Gemini CLI | `gemini-cli` | `.gemini/settings.json` | `~/.gemini/settings.json` |
148
+ | Goose | `goose` | `.goose/config.yaml` | `~/.config/goose/config.yaml` |
149
+ | GitHub Copilot CLI | `github-copilot-cli` | `.vscode/mcp.json` | `~/.copilot/mcp-config.json` |
150
+ | OpenCode | `opencode` | `opencode.json` | `~/.config/opencode/opencode.json` |
151
+ | VS Code | `vscode` | `.vscode/mcp.json` | `~/Library/Application Support/Code/User/mcp.json` |
152
+ | Zed | `zed` | `.zed/settings.json` | `~/Library/Application Support/Zed/settings.json` |
153
+
154
+ **Aliases:** `cline-vscode` → `cline`, `gemini` → `gemini-cli`, `github-copilot` → `vscode`
153
155
 
154
156
  The CLI uses smart detection to find agents in your project directory and globally installed agents. See [Smart Detection](#smart-detection) for details.
155
157
 
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ import { homedir as homedir3 } from "os";
8
8
 
9
9
  // src/types.ts
10
10
  var agentAliases = {
11
+ "cline-vscode": "cline",
11
12
  gemini: "gemini-cli",
12
13
  "github-copilot": "vscode"
13
14
  };
@@ -98,6 +99,19 @@ function getPlatformPaths() {
98
99
  }
99
100
  }
100
101
  var { appSupport, vscodePath, gooseConfigPath } = getPlatformPaths();
102
+ var clineCliConfigPath = join2(
103
+ process.env.CLINE_DIR || join2(home, ".cline"),
104
+ "data",
105
+ "settings",
106
+ "cline_mcp_settings.json"
107
+ );
108
+ var clineExtensionConfigPath = join2(
109
+ vscodePath,
110
+ "globalStorage",
111
+ "saoudrizwan.claude-dev",
112
+ "settings",
113
+ "cline_mcp_settings.json"
114
+ );
101
115
  var copilotConfigPath = join2(
102
116
  process.env.XDG_CONFIG_HOME || join2(home, ".copilot"),
103
117
  "mcp-config.json"
@@ -187,6 +201,28 @@ function transformCursorConfig(_serverName, config) {
187
201
  }
188
202
  return config;
189
203
  }
204
+ function transformClineConfig(_serverName, config) {
205
+ if (config.url) {
206
+ const remoteConfig = {
207
+ url: config.url,
208
+ type: config.type === "sse" ? "sse" : "streamableHttp",
209
+ disabled: false
210
+ };
211
+ if (config.headers && Object.keys(config.headers).length > 0) {
212
+ remoteConfig.headers = config.headers;
213
+ }
214
+ return remoteConfig;
215
+ }
216
+ const localConfig = {
217
+ command: config.command,
218
+ args: config.args || [],
219
+ disabled: false
220
+ };
221
+ if (config.env && Object.keys(config.env).length > 0) {
222
+ localConfig.env = config.env;
223
+ }
224
+ return localConfig;
225
+ }
190
226
  function transformGitHubCopilotCliConfig(_serverName, config, context) {
191
227
  if (context?.local) {
192
228
  return config;
@@ -214,6 +250,34 @@ function transformGitHubCopilotCliConfig(_serverName, config, context) {
214
250
  return localConfig;
215
251
  }
216
252
  var agents = {
253
+ cline: {
254
+ name: "cline",
255
+ displayName: "Cline VSCode Extension",
256
+ configPath: clineExtensionConfigPath,
257
+ projectDetectPaths: [],
258
+ // Global only - no project support
259
+ configKey: "mcpServers",
260
+ format: "json",
261
+ supportedTransports: ["stdio", "http", "sse"],
262
+ detectGlobalInstall: async () => {
263
+ return existsSync(dirname2(clineExtensionConfigPath));
264
+ },
265
+ transformConfig: transformClineConfig
266
+ },
267
+ "cline-cli": {
268
+ name: "cline-cli",
269
+ displayName: "Cline CLI",
270
+ configPath: clineCliConfigPath,
271
+ projectDetectPaths: [],
272
+ // Global only - no project support
273
+ configKey: "mcpServers",
274
+ format: "json",
275
+ supportedTransports: ["stdio", "http", "sse"],
276
+ detectGlobalInstall: async () => {
277
+ return existsSync(dirname2(clineCliConfigPath));
278
+ },
279
+ transformConfig: transformClineConfig
280
+ },
217
281
  "claude-code": {
218
282
  name: "claude-code",
219
283
  displayName: "Claude Code",
@@ -934,7 +998,7 @@ function installServer(serverName, serverConfig, agentTypes, options = {}) {
934
998
  // package.json
935
999
  var package_default = {
936
1000
  name: "add-mcp",
937
- version: "1.2.2",
1001
+ version: "1.3.0",
938
1002
  description: "Add MCP servers to your favorite coding agents with a single command.",
939
1003
  author: "Andre Landgraf <andre@neon.tech>",
940
1004
  license: "Apache-2.0",
@@ -961,6 +1025,7 @@ var package_default = {
961
1025
  "mcp",
962
1026
  "model-context-protocol",
963
1027
  "ai-agents",
1028
+ "cline",
964
1029
  "claude-code",
965
1030
  "claude-desktop",
966
1031
  "codex",
@@ -1068,7 +1133,7 @@ function parseHeaders(values) {
1068
1133
  return { headers, invalid };
1069
1134
  }
1070
1135
  program.name("add-mcp").description(
1071
- "Install MCP servers onto coding agents (Claude Code, Cursor, VS Code, OpenCode, Codex)"
1136
+ "Install MCP servers for coding agents (Claude Code, Cursor, VS Code, OpenCode, Codex, and more \u2014 run list-agents for the full list)"
1072
1137
  ).version(version).argument("[target]", "MCP server URL (remote) or package name (local stdio)").option(
1073
1138
  "-g, --global",
1074
1139
  "Install globally (user-level) instead of project-level"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "add-mcp",
3
- "version": "1.2.2",
3
+ "version": "1.3.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",
@@ -27,6 +27,7 @@
27
27
  "mcp",
28
28
  "model-context-protocol",
29
29
  "ai-agents",
30
+ "cline",
30
31
  "claude-code",
31
32
  "claude-desktop",
32
33
  "codex",