@warmio/mcp 7.0.1 → 8.0.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/dist/install.js CHANGED
@@ -4,6 +4,7 @@ import { dirname, join, resolve } from 'path';
4
4
  import { homedir, platform } from 'os';
5
5
  import { verifyWarmApiKey, WarmApiError } from './server.js';
6
6
  import { getWarmApiKeyPath, readConfigFile } from './config-paths.js';
7
+ import { WARM_MCP_CLIENTS, WARM_MCP_PACKAGE_SPEC, WARM_MCP_PROJECT_CONFIGS, } from './manifest.js';
7
8
  const HOME = homedir();
8
9
  const CWD = process.cwd();
9
10
  function isRecord(value) {
@@ -18,47 +19,43 @@ function getClaudeDesktopPath() {
18
19
  }
19
20
  return join(HOME, '.config', 'claude', 'claude_desktop_config.json');
20
21
  }
21
- const GLOBAL_CLIENTS = [
22
- {
23
- name: 'Claude Code',
24
- configPath: join(HOME, '.claude.json'),
25
- format: 'json',
26
- alwaysInclude: true,
27
- },
28
- { name: 'Claude Desktop', configPath: getClaudeDesktopPath(), format: 'json' },
29
- { name: 'Cursor', configPath: join(HOME, '.cursor', 'mcp.json'), format: 'json' },
30
- {
31
- name: 'Windsurf',
32
- configPath: join(HOME, '.codeium', 'windsurf', 'mcp_config.json'),
33
- format: 'json',
34
- },
35
- {
36
- name: 'OpenCode',
37
- configPath: join(HOME, '.config', 'opencode', 'opencode.json'),
38
- format: 'json',
39
- },
40
- { name: 'Codex CLI', configPath: join(HOME, '.codex', 'config.toml'), format: 'toml' },
41
- {
42
- name: 'Antigravity',
43
- configPath: join(HOME, '.gemini', 'antigravity', 'mcp_config.json'),
44
- format: 'json',
45
- },
46
- { name: 'Gemini CLI', configPath: join(HOME, '.gemini', 'settings.json'), format: 'json' },
47
- ];
48
- const PROJECT_CONFIGS = ['.mcp.json', '.cursor/mcp.json', '.vscode/mcp.json'];
49
- const MCP_PACKAGE_SPEC = '@warmio/mcp@latest';
22
+ function getClientConfigPath(clientId) {
23
+ switch (clientId) {
24
+ case 'claude-code':
25
+ return join(HOME, '.claude.json');
26
+ case 'claude-desktop':
27
+ return getClaudeDesktopPath();
28
+ case 'cursor':
29
+ return join(HOME, '.cursor', 'mcp.json');
30
+ case 'windsurf':
31
+ return join(HOME, '.codeium', 'windsurf', 'mcp_config.json');
32
+ case 'opencode':
33
+ return join(HOME, '.config', 'opencode', 'opencode.json');
34
+ case 'codex-cli':
35
+ return join(HOME, '.codex', 'config.toml');
36
+ case 'antigravity':
37
+ return join(HOME, '.gemini', 'antigravity', 'mcp_config.json');
38
+ case 'gemini-cli':
39
+ return join(HOME, '.gemini', 'settings.json');
40
+ }
41
+ }
42
+ const GLOBAL_CLIENTS = WARM_MCP_CLIENTS.map((client) => ({
43
+ ...client,
44
+ configPath: getClientConfigPath(client.id),
45
+ alwaysInclude: client.id === 'claude-code',
46
+ }));
50
47
  function getServerName(mode) {
51
48
  return mode === 'automation' ? 'warm-automation' : 'warm';
52
49
  }
53
50
  function getMcpConfig(mode) {
54
- const args = ['-y', MCP_PACKAGE_SPEC, 'mcp', '--mode', mode];
51
+ const args = ['-y', WARM_MCP_PACKAGE_SPEC, 'mcp', '--mode', mode];
55
52
  return platform() === 'win32'
56
53
  ? { command: 'cmd', args: ['/c', 'npx', ...args] }
57
54
  : { command: 'npx', args };
58
55
  }
59
56
  function detectProjectClients() {
60
57
  const found = [];
61
- for (const name of PROJECT_CONFIGS) {
58
+ for (const name of WARM_MCP_PROJECT_CONFIGS) {
62
59
  const configPath = resolve(CWD, name);
63
60
  if (existsSync(configPath)) {
64
61
  found.push({
@@ -311,8 +308,8 @@ function configureToml(client, mode, preserveSelectedKeyFile) {
311
308
  const serverName = getServerName(mode);
312
309
  const tomlCommand = platform() === 'win32' ? 'cmd' : 'npx';
313
310
  const tomlArgs = platform() === 'win32'
314
- ? `["/c", "npx", "-y", "${MCP_PACKAGE_SPEC}", "mcp", "--mode", "${mode}"]`
315
- : `["-y", "${MCP_PACKAGE_SPEC}", "mcp", "--mode", "${mode}"]`;
311
+ ? `["/c", "npx", "-y", "${WARM_MCP_PACKAGE_SPEC}", "mcp", "--mode", "${mode}"]`
312
+ : `["-y", "${WARM_MCP_PACKAGE_SPEC}", "mcp", "--mode", "${mode}"]`;
316
313
  const warmBlock = `[mcp_servers.${serverName}]${lineEnding}command = "${tomlCommand}"${lineEnding}args = ${tomlArgs}${lineEnding}`;
317
314
  const selectedKeyFile = mode === 'automation' ? 'WARM_AUTOMATION_API_KEY_FILE' : 'WARM_CONTEXT_API_KEY_FILE';
318
315
  const oppositeKeyFile = mode === 'automation' ? 'WARM_CONTEXT_API_KEY_FILE' : 'WARM_AUTOMATION_API_KEY_FILE';
@@ -0,0 +1,85 @@
1
+ export declare const WARM_MCP_PACKAGE_NAME: "@warmio/mcp";
2
+ export declare const WARM_MCP_PACKAGE_SPEC: "@warmio/mcp@latest";
3
+ export declare const WARM_MCP_INSTALL_COMMAND: "npx -y @warmio/mcp@latest";
4
+ export declare const WARM_MCP_CLIENTS: readonly [{
5
+ readonly id: "claude-code";
6
+ readonly name: "Claude Code";
7
+ readonly format: "json";
8
+ }, {
9
+ readonly id: "claude-desktop";
10
+ readonly name: "Claude Desktop";
11
+ readonly format: "json";
12
+ }, {
13
+ readonly id: "cursor";
14
+ readonly name: "Cursor";
15
+ readonly format: "json";
16
+ }, {
17
+ readonly id: "windsurf";
18
+ readonly name: "Windsurf";
19
+ readonly format: "json";
20
+ }, {
21
+ readonly id: "opencode";
22
+ readonly name: "OpenCode";
23
+ readonly format: "json";
24
+ }, {
25
+ readonly id: "codex-cli";
26
+ readonly name: "Codex CLI";
27
+ readonly format: "toml";
28
+ }, {
29
+ readonly id: "antigravity";
30
+ readonly name: "Antigravity";
31
+ readonly format: "json";
32
+ }, {
33
+ readonly id: "gemini-cli";
34
+ readonly name: "Gemini CLI";
35
+ readonly format: "json";
36
+ }];
37
+ export type WarmMcpClientId = (typeof WARM_MCP_CLIENTS)[number]['id'];
38
+ export declare const WARM_MCP_PROJECT_CONFIGS: readonly [".mcp.json", ".cursor/mcp.json", ".vscode/mcp.json"];
39
+ export declare const WARM_MCP_SERVER_COMMANDS: {
40
+ readonly automation: "npx -y @warmio/mcp@latest mcp --mode automation";
41
+ readonly context: "npx -y @warmio/mcp@latest mcp --mode context";
42
+ };
43
+ export declare const WARM_MCP_MANIFEST: {
44
+ readonly clients: readonly [{
45
+ readonly id: "claude-code";
46
+ readonly name: "Claude Code";
47
+ readonly format: "json";
48
+ }, {
49
+ readonly id: "claude-desktop";
50
+ readonly name: "Claude Desktop";
51
+ readonly format: "json";
52
+ }, {
53
+ readonly id: "cursor";
54
+ readonly name: "Cursor";
55
+ readonly format: "json";
56
+ }, {
57
+ readonly id: "windsurf";
58
+ readonly name: "Windsurf";
59
+ readonly format: "json";
60
+ }, {
61
+ readonly id: "opencode";
62
+ readonly name: "OpenCode";
63
+ readonly format: "json";
64
+ }, {
65
+ readonly id: "codex-cli";
66
+ readonly name: "Codex CLI";
67
+ readonly format: "toml";
68
+ }, {
69
+ readonly id: "antigravity";
70
+ readonly name: "Antigravity";
71
+ readonly format: "json";
72
+ }, {
73
+ readonly id: "gemini-cli";
74
+ readonly name: "Gemini CLI";
75
+ readonly format: "json";
76
+ }];
77
+ readonly installCommand: "npx -y @warmio/mcp@latest";
78
+ readonly packageName: "@warmio/mcp";
79
+ readonly packageSpec: "@warmio/mcp@latest";
80
+ readonly projectConfigs: readonly [".mcp.json", ".cursor/mcp.json", ".vscode/mcp.json"];
81
+ readonly serverCommands: {
82
+ readonly automation: "npx -y @warmio/mcp@latest mcp --mode automation";
83
+ readonly context: "npx -y @warmio/mcp@latest mcp --mode context";
84
+ };
85
+ };
@@ -0,0 +1,30 @@
1
+ export const WARM_MCP_PACKAGE_NAME = '@warmio/mcp';
2
+ export const WARM_MCP_PACKAGE_SPEC = `${WARM_MCP_PACKAGE_NAME}@latest`;
3
+ export const WARM_MCP_INSTALL_COMMAND = `npx -y ${WARM_MCP_PACKAGE_SPEC}`;
4
+ export const WARM_MCP_CLIENTS = [
5
+ { id: 'claude-code', name: 'Claude Code', format: 'json' },
6
+ { id: 'claude-desktop', name: 'Claude Desktop', format: 'json' },
7
+ { id: 'cursor', name: 'Cursor', format: 'json' },
8
+ { id: 'windsurf', name: 'Windsurf', format: 'json' },
9
+ { id: 'opencode', name: 'OpenCode', format: 'json' },
10
+ { id: 'codex-cli', name: 'Codex CLI', format: 'toml' },
11
+ { id: 'antigravity', name: 'Antigravity', format: 'json' },
12
+ { id: 'gemini-cli', name: 'Gemini CLI', format: 'json' },
13
+ ];
14
+ export const WARM_MCP_PROJECT_CONFIGS = [
15
+ '.mcp.json',
16
+ '.cursor/mcp.json',
17
+ '.vscode/mcp.json',
18
+ ];
19
+ export const WARM_MCP_SERVER_COMMANDS = {
20
+ automation: `${WARM_MCP_INSTALL_COMMAND} mcp --mode automation`,
21
+ context: `${WARM_MCP_INSTALL_COMMAND} mcp --mode context`,
22
+ };
23
+ export const WARM_MCP_MANIFEST = {
24
+ clients: WARM_MCP_CLIENTS,
25
+ installCommand: WARM_MCP_INSTALL_COMMAND,
26
+ packageName: WARM_MCP_PACKAGE_NAME,
27
+ packageSpec: WARM_MCP_PACKAGE_SPEC,
28
+ projectConfigs: WARM_MCP_PROJECT_CONFIGS,
29
+ serverCommands: WARM_MCP_SERVER_COMMANDS,
30
+ };