mcp-intervals 1.2.2 → 1.3.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.
@@ -16,6 +16,6 @@ interface McpServerConfig {
16
16
  export declare function detectClients(): McpClient[];
17
17
  export declare function readConfig(configPath: string): McpConfig;
18
18
  export declare function writeConfig(configPath: string, config: McpConfig): void;
19
- export declare function configureClient(configPath: string): void;
20
- export declare function hasExistingConfig(configPath: string): boolean;
19
+ export declare function configureClient(configPath: string, clientId?: string): void;
20
+ export declare function hasExistingConfig(configPath: string, clientId?: string): boolean;
21
21
  export {};
@@ -62,6 +62,70 @@ function getClientPaths() {
62
62
  path: path.join(process.env.APPDATA || "", "Codeium", "windsurf", "mcp_config.json"),
63
63
  });
64
64
  }
65
+ // VS Code (GitHub Copilot) - project level
66
+ clients.push({
67
+ id: "vscode-project",
68
+ name: "VS Code / Copilot (project)",
69
+ path: path.join(process.cwd(), ".vscode", "mcp.json"),
70
+ });
71
+ // Cline (VS Code extension)
72
+ if (platform === "darwin") {
73
+ clients.push({
74
+ id: "cline",
75
+ name: "Cline",
76
+ path: path.join(home, "Library", "Application Support", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
77
+ });
78
+ }
79
+ else if (platform === "linux") {
80
+ clients.push({
81
+ id: "cline",
82
+ name: "Cline",
83
+ path: path.join(home, ".config", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
84
+ });
85
+ }
86
+ else if (platform === "win32") {
87
+ clients.push({
88
+ id: "cline",
89
+ name: "Cline",
90
+ path: path.join(process.env.APPDATA || "", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
91
+ });
92
+ }
93
+ // Continue
94
+ clients.push({
95
+ id: "continue",
96
+ name: "Continue",
97
+ path: path.join(home, ".continue", "config.json"),
98
+ });
99
+ // Zed
100
+ if (platform === "darwin") {
101
+ clients.push({
102
+ id: "zed",
103
+ name: "Zed",
104
+ path: path.join(home, ".config", "zed", "settings.json"),
105
+ });
106
+ }
107
+ else if (platform === "linux") {
108
+ clients.push({
109
+ id: "zed",
110
+ name: "Zed",
111
+ path: path.join(home, ".config", "zed", "settings.json"),
112
+ });
113
+ }
114
+ // Google Antigravity
115
+ if (platform === "darwin" || platform === "linux") {
116
+ clients.push({
117
+ id: "antigravity",
118
+ name: "Google Antigravity",
119
+ path: path.join(home, ".gemini", "antigravity", "mcp_config.json"),
120
+ });
121
+ }
122
+ else if (platform === "win32") {
123
+ clients.push({
124
+ id: "antigravity",
125
+ name: "Google Antigravity",
126
+ path: path.join(home, ".gemini", "antigravity", "mcp_config.json"),
127
+ });
128
+ }
65
129
  return clients;
66
130
  }
67
131
  export function detectClients() {
@@ -111,8 +175,37 @@ export function writeConfig(configPath, config) {
111
175
  }
112
176
  fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
113
177
  }
114
- export function configureClient(configPath) {
178
+ export function configureClient(configPath, clientId) {
115
179
  const config = readConfig(configPath);
180
+ // Zed uses a different format (context_servers)
181
+ if (clientId === "zed") {
182
+ const zedConfig = config;
183
+ if (!zedConfig.context_servers) {
184
+ zedConfig.context_servers = {};
185
+ }
186
+ zedConfig.context_servers.intervals = {
187
+ command: {
188
+ path: "npx",
189
+ args: ["-y", "mcp-intervals@latest"],
190
+ },
191
+ };
192
+ writeConfig(configPath, zedConfig);
193
+ return;
194
+ }
195
+ // Continue uses mcpServers inside the config
196
+ if (clientId === "continue") {
197
+ const continueConfig = config;
198
+ if (!continueConfig.mcpServers) {
199
+ continueConfig.mcpServers = {};
200
+ }
201
+ continueConfig.mcpServers.intervals = {
202
+ command: "npx",
203
+ args: ["-y", "mcp-intervals@latest"],
204
+ };
205
+ writeConfig(configPath, continueConfig);
206
+ return;
207
+ }
208
+ // Standard format (Claude, Cursor, Windsurf, VS Code, Cline)
116
209
  if (!config.mcpServers) {
117
210
  config.mcpServers = {};
118
211
  }
@@ -124,9 +217,15 @@ export function configureClient(configPath) {
124
217
  };
125
218
  writeConfig(configPath, config);
126
219
  }
127
- export function hasExistingConfig(configPath) {
220
+ export function hasExistingConfig(configPath, clientId) {
128
221
  try {
129
222
  const config = readConfig(configPath);
223
+ // Zed uses context_servers
224
+ if (clientId === "zed") {
225
+ const zedConfig = config;
226
+ const contextServers = zedConfig.context_servers;
227
+ return contextServers?.intervals !== undefined;
228
+ }
130
229
  return config.mcpServers?.intervals !== undefined;
131
230
  }
132
231
  catch {
package/dist/cli/init.js CHANGED
@@ -158,16 +158,16 @@ async function main() {
158
158
  }
159
159
  // Step 5: Select clients
160
160
  const clientChoices = detectedClients.map((client) => {
161
- const hasExisting = hasExistingConfig(client.configPath);
161
+ const hasExisting = hasExistingConfig(client.configPath, client.id);
162
162
  return {
163
163
  value: client.id,
164
164
  label: client.name,
165
165
  hint: shortenPath(client.configPath) + (hasExisting ? " - will update" : ""),
166
166
  };
167
167
  });
168
- // Pre-select clients that don't have existing config
168
+ // Pre-select clients that already have intervals config (for easy update)
169
169
  const initialSelected = detectedClients
170
- .filter((c) => !hasExistingConfig(c.configPath))
170
+ .filter((c) => hasExistingConfig(c.configPath, c.id))
171
171
  .map((c) => c.id);
172
172
  console.log();
173
173
  const selectedIds = await searchMultiselect({
@@ -219,7 +219,7 @@ async function main() {
219
219
  const results = [];
220
220
  for (const client of selectedClients) {
221
221
  try {
222
- configureClient(client.configPath);
222
+ configureClient(client.configPath, client.id);
223
223
  results.push({ client: client.name, success: true });
224
224
  }
225
225
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-intervals",
3
- "version": "1.2.2",
3
+ "version": "1.3.2",
4
4
  "description": "MCP server for Intervals task management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",