@hubspot/cli 7.7.8-experimental.0 → 7.7.9-experimental.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/commands/mcp/setup.js +59 -51
- package/commands/mcp/start.js +17 -21
- package/commands/mcp.js +2 -1
- package/lang/en.d.ts +44 -0
- package/lang/en.js +44 -0
- package/mcp-server/tools/project/AddFeatureToProject.js +3 -1
- package/package.json +1 -1
package/commands/mcp/setup.js
CHANGED
|
@@ -3,7 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
7
6
|
const child_process_1 = require("child_process");
|
|
8
7
|
const util_1 = require("util");
|
|
9
8
|
const path_1 = __importDefault(require("path"));
|
|
@@ -12,19 +11,27 @@ const os_1 = __importDefault(require("os"));
|
|
|
12
11
|
const SpinniesManager_1 = __importDefault(require("../../lib/ui/SpinniesManager"));
|
|
13
12
|
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
14
13
|
const promptUtils_1 = require("../../lib/prompts/promptUtils");
|
|
15
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
16
14
|
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
15
|
+
const en_1 = require("../../lang/en");
|
|
16
|
+
const errorHandlers_1 = require("../../lib/errorHandlers");
|
|
17
|
+
const logger_1 = require("../../lib/ui/logger");
|
|
17
18
|
const command = ['setup', 'update'];
|
|
18
19
|
const describe = undefined; // Leave hidden for now
|
|
19
20
|
const execAsync = (0, util_1.promisify)(child_process_1.exec);
|
|
21
|
+
const claudeCode = 'claude-code';
|
|
22
|
+
const claudeDesktop = 'claude-desktop';
|
|
23
|
+
const cursor = 'cursor';
|
|
24
|
+
const mcpServerName = 'hubspot-cli-mcp';
|
|
20
25
|
const supportedTools = [
|
|
21
|
-
{ name:
|
|
22
|
-
{ name:
|
|
23
|
-
{ name:
|
|
26
|
+
{ name: en_1.commands.mcp.setup.claudeCode, value: claudeCode },
|
|
27
|
+
// { name: commands.mcp.setup.claudeDesktop, value: claudeDesktop },
|
|
28
|
+
{ name: en_1.commands.mcp.setup.cursor, value: cursor },
|
|
24
29
|
];
|
|
30
|
+
const hsCommand = 'hs';
|
|
31
|
+
const mcpCommandArgs = ['mcp', 'start'];
|
|
25
32
|
function setupBuilder(yargs) {
|
|
26
33
|
yargs.option('targets', {
|
|
27
|
-
describe:
|
|
34
|
+
describe: en_1.commands.mcp.setup.args.targets,
|
|
28
35
|
type: 'array',
|
|
29
36
|
choices: [...supportedTools.map(tool => tool.value)],
|
|
30
37
|
});
|
|
@@ -38,7 +45,7 @@ async function handler(argv) {
|
|
|
38
45
|
await import('@modelcontextprotocol/sdk/server/mcp.js');
|
|
39
46
|
}
|
|
40
47
|
catch (e) {
|
|
41
|
-
logger_1.
|
|
48
|
+
logger_1.uiLogger.error(en_1.commands.mcp.setup.errors.needsNode20);
|
|
42
49
|
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
43
50
|
}
|
|
44
51
|
await addMcpServerToConfig(argv.targets);
|
|
@@ -50,10 +57,12 @@ async function addMcpServerToConfig(targets) {
|
|
|
50
57
|
const { selectedTargets } = await (0, promptUtils_1.promptUser)({
|
|
51
58
|
name: 'selectedTargets',
|
|
52
59
|
type: 'checkbox',
|
|
53
|
-
message:
|
|
60
|
+
message: en_1.commands.mcp.setup.prompts.targets,
|
|
54
61
|
choices: supportedTools,
|
|
55
62
|
validate: (choices) => {
|
|
56
|
-
return choices.length === 0
|
|
63
|
+
return choices.length === 0
|
|
64
|
+
? en_1.commands.mcp.setup.prompts.targetsRequired
|
|
65
|
+
: true;
|
|
57
66
|
},
|
|
58
67
|
});
|
|
59
68
|
derivedTargets = selectedTargets;
|
|
@@ -62,22 +71,22 @@ async function addMcpServerToConfig(targets) {
|
|
|
62
71
|
derivedTargets = targets;
|
|
63
72
|
}
|
|
64
73
|
SpinniesManager_1.default.init();
|
|
65
|
-
if (derivedTargets.includes(
|
|
74
|
+
if (derivedTargets.includes(claudeDesktop)) {
|
|
66
75
|
await runSetupFunction(setupClaudeDesktop);
|
|
67
76
|
}
|
|
68
|
-
if (derivedTargets.includes(
|
|
77
|
+
if (derivedTargets.includes(claudeCode)) {
|
|
69
78
|
await runSetupFunction(setupClaudeCode);
|
|
70
79
|
}
|
|
71
|
-
if (derivedTargets.includes(
|
|
80
|
+
if (derivedTargets.includes(cursor)) {
|
|
72
81
|
await runSetupFunction(setupCursor);
|
|
73
82
|
}
|
|
74
|
-
logger_1.
|
|
83
|
+
logger_1.uiLogger.info(en_1.commands.mcp.setup.success(derivedTargets));
|
|
75
84
|
}
|
|
76
85
|
catch (error) {
|
|
77
86
|
SpinniesManager_1.default.fail('mcpSetup', {
|
|
78
|
-
text:
|
|
87
|
+
text: en_1.commands.mcp.setup.spinners.failedToConfigure,
|
|
79
88
|
});
|
|
80
|
-
|
|
89
|
+
(0, errorHandlers_1.logError)(error);
|
|
81
90
|
}
|
|
82
91
|
}
|
|
83
92
|
async function runSetupFunction(func) {
|
|
@@ -90,55 +99,56 @@ async function setupClaudeDesktop() {
|
|
|
90
99
|
try {
|
|
91
100
|
const configPath = getClaudeDesktopConfigPath();
|
|
92
101
|
SpinniesManager_1.default.add('claudeDesktop', {
|
|
93
|
-
text:
|
|
102
|
+
text: en_1.commands.mcp.setup.spinners.configuringClaudeDesktop,
|
|
94
103
|
});
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
104
|
let config = {};
|
|
97
105
|
// Read existing config if it exists
|
|
98
106
|
if (fs_1.default.existsSync(configPath)) {
|
|
99
107
|
try {
|
|
100
108
|
const configContent = fs_1.default.readFileSync(configPath, 'utf8');
|
|
101
109
|
config = JSON.parse(configContent);
|
|
102
|
-
logger_1.logger.debug(`Found existing Claude Desktop config at ${configPath}`);
|
|
103
110
|
}
|
|
104
111
|
catch (error) {
|
|
105
|
-
|
|
112
|
+
SpinniesManager_1.default.fail('claudeDesktop', {
|
|
113
|
+
text: en_1.commands.mcp.setup.spinners.failedToConfigureClaudeDesktop,
|
|
114
|
+
});
|
|
115
|
+
(0, errorHandlers_1.logError)(error);
|
|
116
|
+
return false;
|
|
106
117
|
}
|
|
107
118
|
}
|
|
108
119
|
else {
|
|
109
120
|
// Create config directory if it doesn't exist
|
|
110
121
|
const configDir = path_1.default.dirname(configPath);
|
|
111
122
|
fs_1.default.mkdirSync(configDir, { recursive: true });
|
|
112
|
-
logger_1.logger.debug(`Created Claude Desktop config directory at ${configDir}`);
|
|
113
123
|
}
|
|
114
124
|
// Initialize mcpServers if it doesn't exist
|
|
115
125
|
if (!config.mcpServers) {
|
|
116
126
|
config.mcpServers = {};
|
|
117
127
|
}
|
|
118
128
|
// Add or update HubSpot CLI MCP server
|
|
119
|
-
config.mcpServers[
|
|
120
|
-
command:
|
|
121
|
-
args:
|
|
129
|
+
config.mcpServers[mcpServerName] = {
|
|
130
|
+
command: hsCommand,
|
|
131
|
+
args: mcpCommandArgs,
|
|
122
132
|
};
|
|
123
133
|
// Write the updated config
|
|
124
134
|
fs_1.default.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
125
135
|
SpinniesManager_1.default.succeed('claudeDesktop', {
|
|
126
|
-
text:
|
|
136
|
+
text: en_1.commands.mcp.setup.spinners.configuredClaudeDesktop,
|
|
127
137
|
});
|
|
128
138
|
return true;
|
|
129
139
|
}
|
|
130
140
|
catch (error) {
|
|
131
141
|
SpinniesManager_1.default.fail('claudeDesktop', {
|
|
132
|
-
text:
|
|
142
|
+
text: en_1.commands.mcp.setup.spinners.failedToConfigureClaudeDesktop,
|
|
133
143
|
});
|
|
134
|
-
|
|
144
|
+
(0, errorHandlers_1.logError)(error);
|
|
135
145
|
return false;
|
|
136
146
|
}
|
|
137
147
|
}
|
|
138
148
|
async function setupClaudeCode() {
|
|
139
149
|
try {
|
|
140
150
|
SpinniesManager_1.default.add('claudeCode', {
|
|
141
|
-
text:
|
|
151
|
+
text: en_1.commands.mcp.setup.spinners.configuringClaudeCode,
|
|
142
152
|
});
|
|
143
153
|
try {
|
|
144
154
|
// Check if claude command is available
|
|
@@ -146,19 +156,19 @@ async function setupClaudeCode() {
|
|
|
146
156
|
// Run claude mcp add command
|
|
147
157
|
const mcpConfig = JSON.stringify({
|
|
148
158
|
type: 'stdio',
|
|
149
|
-
command:
|
|
150
|
-
args:
|
|
159
|
+
command: hsCommand,
|
|
160
|
+
args: mcpCommandArgs,
|
|
151
161
|
});
|
|
152
162
|
const { stdout } = await execAsync('claude mcp list');
|
|
153
|
-
if (stdout.includes(
|
|
163
|
+
if (stdout.includes(mcpServerName)) {
|
|
154
164
|
SpinniesManager_1.default.update('claudeCode', {
|
|
155
|
-
text:
|
|
165
|
+
text: en_1.commands.mcp.setup.spinners.alreadyInstalled,
|
|
156
166
|
});
|
|
157
|
-
await execAsync(
|
|
167
|
+
await execAsync(`claude mcp remove "${mcpServerName}" --scope user`);
|
|
158
168
|
}
|
|
159
|
-
await execAsync(`claude mcp add-json "
|
|
169
|
+
await execAsync(`claude mcp add-json "${mcpServerName}" '${mcpConfig}' --scope user`);
|
|
160
170
|
SpinniesManager_1.default.succeed('claudeCode', {
|
|
161
|
-
text:
|
|
171
|
+
text: en_1.commands.mcp.setup.spinners.configuredClaudeCode,
|
|
162
172
|
});
|
|
163
173
|
return true;
|
|
164
174
|
}
|
|
@@ -166,38 +176,36 @@ async function setupClaudeCode() {
|
|
|
166
176
|
if (error instanceof Error &&
|
|
167
177
|
error.message.includes('claude: command not found')) {
|
|
168
178
|
SpinniesManager_1.default.fail('claudeCode', {
|
|
169
|
-
text:
|
|
179
|
+
text: en_1.commands.mcp.setup.spinners.claudeCodeNotFound,
|
|
170
180
|
});
|
|
171
|
-
logger_1.logger.info(' Install Claude Code CLI to enable this configuration');
|
|
172
181
|
}
|
|
173
182
|
else {
|
|
174
183
|
SpinniesManager_1.default.fail('claudeCode', {
|
|
175
|
-
text:
|
|
184
|
+
text: en_1.commands.mcp.setup.spinners.claudeCodeInstallFailed,
|
|
176
185
|
});
|
|
177
|
-
|
|
186
|
+
(0, errorHandlers_1.logError)(error);
|
|
178
187
|
}
|
|
179
188
|
return false;
|
|
180
189
|
}
|
|
181
190
|
}
|
|
182
191
|
catch (error) {
|
|
183
192
|
SpinniesManager_1.default.fail('claudeCode', {
|
|
184
|
-
text:
|
|
193
|
+
text: en_1.commands.mcp.setup.spinners.claudeCodeInstallFailed,
|
|
185
194
|
});
|
|
186
|
-
|
|
195
|
+
(0, errorHandlers_1.logError)(error);
|
|
187
196
|
return false;
|
|
188
197
|
}
|
|
189
198
|
}
|
|
190
199
|
async function setupCursor() {
|
|
191
200
|
try {
|
|
192
201
|
SpinniesManager_1.default.add('cursor', {
|
|
193
|
-
text:
|
|
202
|
+
text: en_1.commands.mcp.setup.spinners.configuringCursor,
|
|
194
203
|
});
|
|
195
204
|
const cursorConfigPath = path_1.default.join(os_1.default.homedir(), '.cursor', 'mcp.json');
|
|
196
205
|
if (!fs_1.default.existsSync(cursorConfigPath)) {
|
|
197
206
|
SpinniesManager_1.default.succeed('cursor', {
|
|
198
|
-
text:
|
|
207
|
+
text: en_1.commands.mcp.setup.spinners.noCursorMcpFile(cursorConfigPath),
|
|
199
208
|
});
|
|
200
|
-
logger_1.logger.info(' Create a .cursor/mcp.json file in your project to enable Cursor MCP support');
|
|
201
209
|
return false;
|
|
202
210
|
}
|
|
203
211
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -206,32 +214,32 @@ async function setupCursor() {
|
|
|
206
214
|
try {
|
|
207
215
|
const configContent = fs_1.default.readFileSync(cursorConfigPath, 'utf8');
|
|
208
216
|
config = JSON.parse(configContent);
|
|
209
|
-
logger_1.logger.debug(`Found existing Cursor config at ${cursorConfigPath}`);
|
|
210
217
|
}
|
|
211
218
|
catch (error) {
|
|
212
|
-
|
|
219
|
+
(0, errorHandlers_1.logError)(error);
|
|
220
|
+
return false;
|
|
213
221
|
}
|
|
214
222
|
// Initialize mcpServers if it doesn't exist
|
|
215
223
|
if (!config.mcpServers) {
|
|
216
224
|
config.mcpServers = {};
|
|
217
225
|
}
|
|
218
226
|
// Add or update HubSpot CLI MCP server
|
|
219
|
-
config.mcpServers[
|
|
220
|
-
command:
|
|
221
|
-
args:
|
|
227
|
+
config.mcpServers[mcpServerName] = {
|
|
228
|
+
command: hsCommand,
|
|
229
|
+
args: mcpCommandArgs,
|
|
222
230
|
};
|
|
223
231
|
// Write the updated config
|
|
224
232
|
fs_1.default.writeFileSync(cursorConfigPath, JSON.stringify(config, null, 2));
|
|
225
233
|
SpinniesManager_1.default.succeed('cursor', {
|
|
226
|
-
text:
|
|
234
|
+
text: en_1.commands.mcp.setup.spinners.configuredCursor,
|
|
227
235
|
});
|
|
228
236
|
return true;
|
|
229
237
|
}
|
|
230
238
|
catch (error) {
|
|
231
239
|
SpinniesManager_1.default.fail('cursor', {
|
|
232
|
-
text:
|
|
240
|
+
text: en_1.commands.mcp.setup.spinners.failedToConfigure,
|
|
233
241
|
});
|
|
234
|
-
|
|
242
|
+
(0, errorHandlers_1.logError)(error);
|
|
235
243
|
return false;
|
|
236
244
|
}
|
|
237
245
|
}
|
package/commands/mcp/start.js
CHANGED
|
@@ -3,12 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const logger_1 = require("@hubspot/local-dev-lib/logger");
|
|
7
6
|
const child_process_1 = require("child_process");
|
|
8
7
|
const path_1 = __importDefault(require("path"));
|
|
9
8
|
const fs_1 = __importDefault(require("fs"));
|
|
10
9
|
const exitCodes_1 = require("../../lib/enums/exitCodes");
|
|
11
10
|
const yargsUtils_1 = require("../../lib/yargsUtils");
|
|
11
|
+
const logger_1 = require("../../lib/ui/logger");
|
|
12
|
+
const errorHandlers_1 = require("../../lib/errorHandlers");
|
|
13
|
+
const en_1 = require("../../lang/en");
|
|
12
14
|
const command = 'start';
|
|
13
15
|
const describe = undefined; // Leave hidden for now
|
|
14
16
|
function startBuilder(yargs) {
|
|
@@ -22,7 +24,7 @@ async function handler() {
|
|
|
22
24
|
await import('@modelcontextprotocol/sdk/server/mcp.js');
|
|
23
25
|
}
|
|
24
26
|
catch (e) {
|
|
25
|
-
logger_1.
|
|
27
|
+
logger_1.uiLogger.error(en_1.commands.mcp.start.errors.needsNode20);
|
|
26
28
|
process.exit(exitCodes_1.EXIT_CODES.ERROR);
|
|
27
29
|
}
|
|
28
30
|
await startMcpServer();
|
|
@@ -32,13 +34,11 @@ async function startMcpServer() {
|
|
|
32
34
|
const serverPath = path_1.default.join(__dirname, '..', '..', 'mcp-server', 'server.js');
|
|
33
35
|
// Check if server file exists
|
|
34
36
|
if (!fs_1.default.existsSync(serverPath)) {
|
|
35
|
-
logger_1.
|
|
37
|
+
logger_1.uiLogger.error(en_1.commands.mcp.start.errors.serverFileNotFound(serverPath));
|
|
36
38
|
return;
|
|
37
39
|
}
|
|
38
|
-
logger_1.
|
|
39
|
-
logger_1.
|
|
40
|
-
logger_1.logger.info('The server will run in stdio mode for MCP client connections');
|
|
41
|
-
logger_1.logger.info('Press Ctrl+C to stop the server');
|
|
40
|
+
logger_1.uiLogger.info(en_1.commands.mcp.start.startingServer);
|
|
41
|
+
logger_1.uiLogger.info(en_1.commands.mcp.start.stopInstructions);
|
|
42
42
|
// Start the server using ts-node
|
|
43
43
|
const child = (0, child_process_1.spawn)('node', [serverPath], {
|
|
44
44
|
stdio: 'inherit',
|
|
@@ -48,31 +48,27 @@ async function startMcpServer() {
|
|
|
48
48
|
});
|
|
49
49
|
// Handle server process events
|
|
50
50
|
child.on('error', error => {
|
|
51
|
-
|
|
52
|
-
logger_1.
|
|
51
|
+
(0, errorHandlers_1.logError)(error);
|
|
52
|
+
logger_1.uiLogger.error(en_1.commands.mcp.start.errors.failedToStart);
|
|
53
53
|
});
|
|
54
|
-
child.on('close',
|
|
55
|
-
|
|
56
|
-
logger_1.logger.info('MCP server stopped gracefully');
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
logger_1.logger.error(`MCP server exited with code ${code}`);
|
|
60
|
-
}
|
|
54
|
+
child.on('close', () => {
|
|
55
|
+
logger_1.uiLogger.info(en_1.commands.mcp.start.stoppedSuccessfully);
|
|
61
56
|
});
|
|
62
57
|
// Handle graceful shutdown
|
|
63
58
|
process.on('SIGINT', () => {
|
|
64
|
-
logger_1.
|
|
59
|
+
logger_1.uiLogger.info(en_1.commands.mcp.start.shuttingDown);
|
|
65
60
|
child.kill('SIGTERM');
|
|
66
|
-
process.exit(
|
|
61
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
67
62
|
});
|
|
68
63
|
process.on('SIGTERM', () => {
|
|
69
|
-
logger_1.
|
|
64
|
+
logger_1.uiLogger.info(en_1.commands.mcp.start.shuttingDown);
|
|
70
65
|
child.kill('SIGTERM');
|
|
71
|
-
process.exit(
|
|
66
|
+
process.exit(exitCodes_1.EXIT_CODES.SUCCESS);
|
|
72
67
|
});
|
|
73
68
|
}
|
|
74
69
|
catch (error) {
|
|
75
|
-
logger_1.
|
|
70
|
+
logger_1.uiLogger.error(en_1.commands.mcp.start.errors.failedToStart);
|
|
71
|
+
(0, errorHandlers_1.logError)(error);
|
|
76
72
|
}
|
|
77
73
|
}
|
|
78
74
|
exports.default = { command, describe, builder, handler };
|
package/commands/mcp.js
CHANGED
|
@@ -7,7 +7,8 @@ const start_1 = __importDefault(require("./mcp/start"));
|
|
|
7
7
|
const setup_1 = __importDefault(require("./mcp/setup"));
|
|
8
8
|
const yargsUtils_1 = require("../lib/yargsUtils");
|
|
9
9
|
const command = 'mcp';
|
|
10
|
-
|
|
10
|
+
// Leave this as undefined to hide the command
|
|
11
|
+
const describe = undefined;
|
|
11
12
|
function mcpBuilder(yargs) {
|
|
12
13
|
yargs.command(start_1.default).command(setup_1.default).demandCommand(1, '');
|
|
13
14
|
return yargs;
|
package/lang/en.d.ts
CHANGED
|
@@ -764,6 +764,50 @@ Global configuration replaces hubspot.config.yml, and you will be prompted to mi
|
|
|
764
764
|
};
|
|
765
765
|
readonly tailLogs: (functionPath: string, accountId: string) => string;
|
|
766
766
|
};
|
|
767
|
+
readonly mcp: {
|
|
768
|
+
readonly setup: {
|
|
769
|
+
readonly claudeCode: "Claude Code";
|
|
770
|
+
readonly claudeDesktop: "Claude Desktop";
|
|
771
|
+
readonly cursor: "Cursor";
|
|
772
|
+
readonly args: {
|
|
773
|
+
readonly targets: "Target applications to configure";
|
|
774
|
+
};
|
|
775
|
+
readonly success: (derivedTargets: string[]) => string;
|
|
776
|
+
readonly errors: {
|
|
777
|
+
readonly needsNode20: "This feature requires node >=20";
|
|
778
|
+
};
|
|
779
|
+
readonly spinners: {
|
|
780
|
+
readonly failedToConfigure: "Failed to configure the HubSpot mcp server.";
|
|
781
|
+
readonly configuringClaudeDesktop: "Configuring Claude Desktop...";
|
|
782
|
+
readonly configuredClaudeDesktop: "Configured Claude Desktop";
|
|
783
|
+
readonly configuringClaudeCode: "Configuring Claude Code...";
|
|
784
|
+
readonly configuredClaudeCode: "Configured Claude Code";
|
|
785
|
+
readonly claudeCodeNotFound: "Claude Code not found - skipping configuration";
|
|
786
|
+
readonly claudeCodeInstallFailed: "Claude Code CLI not working - skipping configuration";
|
|
787
|
+
readonly failedToConfigureClaudeDesktop: "Failed to configure Claude Desktop";
|
|
788
|
+
readonly configuringCursor: "Configuring Cursor...";
|
|
789
|
+
readonly noCursorMcpFile: (configFile: string) => string;
|
|
790
|
+
readonly failedToConfigureCursor: "Failed to configure Cursor";
|
|
791
|
+
readonly configuredCursor: "Configured Cursor";
|
|
792
|
+
readonly alreadyInstalled: "HubSpot CLI mcp server already installed, reinstalling";
|
|
793
|
+
};
|
|
794
|
+
readonly prompts: {
|
|
795
|
+
readonly targets: "[--targets] Which tools would you like to add the HubSpot CLI MCP server to?";
|
|
796
|
+
readonly targetsRequired: "Must choose at least one application to configure.";
|
|
797
|
+
};
|
|
798
|
+
};
|
|
799
|
+
readonly start: {
|
|
800
|
+
readonly errors: {
|
|
801
|
+
readonly needsNode20: "This feature requires node >=20";
|
|
802
|
+
readonly serverFileNotFound: (serverPath: string) => string;
|
|
803
|
+
readonly failedToStart: "Failed to start MCP server";
|
|
804
|
+
};
|
|
805
|
+
readonly startingServer: "Starting HubSpot CLI MCP server...";
|
|
806
|
+
readonly stopInstructions: "Press Ctrl+C to stop the server";
|
|
807
|
+
readonly stoppedSuccessfully: "Stopped successfully.";
|
|
808
|
+
readonly shuttingDown: "Shutting down MCP server...";
|
|
809
|
+
};
|
|
810
|
+
};
|
|
767
811
|
readonly mv: {
|
|
768
812
|
readonly describe: "Move a remote file or folder in HubSpot. This feature is currently in beta and the CLI contract is subject to change.";
|
|
769
813
|
readonly errors: {
|
package/lang/en.js
CHANGED
|
@@ -776,6 +776,50 @@ exports.commands = {
|
|
|
776
776
|
},
|
|
777
777
|
tailLogs: (functionPath, accountId) => `Waiting for log entries for "${functionPath}" on account "${accountId}".\n`,
|
|
778
778
|
},
|
|
779
|
+
mcp: {
|
|
780
|
+
setup: {
|
|
781
|
+
claudeCode: 'Claude Code',
|
|
782
|
+
claudeDesktop: 'Claude Desktop',
|
|
783
|
+
cursor: 'Cursor',
|
|
784
|
+
args: {
|
|
785
|
+
targets: 'Target applications to configure',
|
|
786
|
+
},
|
|
787
|
+
success: (derivedTargets) => `You can now use the HubSpot CLI tools in ${derivedTargets.join(', ')}. ${chalk_1.default.bold('You may need to restart these tools to apply the changes')}.`,
|
|
788
|
+
errors: {
|
|
789
|
+
needsNode20: `This feature requires node >=20`,
|
|
790
|
+
},
|
|
791
|
+
spinners: {
|
|
792
|
+
failedToConfigure: 'Failed to configure the HubSpot mcp server.',
|
|
793
|
+
configuringClaudeDesktop: 'Configuring Claude Desktop...',
|
|
794
|
+
configuredClaudeDesktop: 'Configured Claude Desktop',
|
|
795
|
+
configuringClaudeCode: 'Configuring Claude Code...',
|
|
796
|
+
configuredClaudeCode: 'Configured Claude Code',
|
|
797
|
+
claudeCodeNotFound: 'Claude Code not found - skipping configuration',
|
|
798
|
+
claudeCodeInstallFailed: 'Claude Code CLI not working - skipping configuration',
|
|
799
|
+
failedToConfigureClaudeDesktop: 'Failed to configure Claude Desktop',
|
|
800
|
+
configuringCursor: 'Configuring Cursor...',
|
|
801
|
+
noCursorMcpFile: (configFile) => `No ${configFile} file found - skipping Cursor configuration`,
|
|
802
|
+
failedToConfigureCursor: 'Failed to configure Cursor',
|
|
803
|
+
configuredCursor: 'Configured Cursor',
|
|
804
|
+
alreadyInstalled: 'HubSpot CLI mcp server already installed, reinstalling',
|
|
805
|
+
},
|
|
806
|
+
prompts: {
|
|
807
|
+
targets: '[--targets] Which tools would you like to add the HubSpot CLI MCP server to?',
|
|
808
|
+
targetsRequired: 'Must choose at least one application to configure.',
|
|
809
|
+
},
|
|
810
|
+
},
|
|
811
|
+
start: {
|
|
812
|
+
errors: {
|
|
813
|
+
needsNode20: `This feature requires node >=20`,
|
|
814
|
+
serverFileNotFound: (serverPath) => `MCP server file not found at ${serverPath}`,
|
|
815
|
+
failedToStart: 'Failed to start MCP server',
|
|
816
|
+
},
|
|
817
|
+
startingServer: 'Starting HubSpot CLI MCP server...',
|
|
818
|
+
stopInstructions: 'Press Ctrl+C to stop the server',
|
|
819
|
+
stoppedSuccessfully: 'Stopped successfully.',
|
|
820
|
+
shuttingDown: 'Shutting down MCP server...',
|
|
821
|
+
},
|
|
822
|
+
},
|
|
779
823
|
mv: {
|
|
780
824
|
describe: 'Move a remote file or folder in HubSpot. This feature is currently in beta and the CLI contract is subject to change.',
|
|
781
825
|
errors: {
|
|
@@ -9,7 +9,9 @@ const constants_2 = require("./constants");
|
|
|
9
9
|
const project_1 = require("../../utils/project");
|
|
10
10
|
const inputSchema = {
|
|
11
11
|
absoluteProjectPath: constants_2.absoluteProjectPath,
|
|
12
|
-
addApp: zod_1.z
|
|
12
|
+
addApp: zod_1.z
|
|
13
|
+
.boolean()
|
|
14
|
+
.describe('Should an app be added? If there is no app in the project, and app must be added to add a feature'),
|
|
13
15
|
distribution: zod_1.z
|
|
14
16
|
.optional(zod_1.z.union([
|
|
15
17
|
zod_1.z.literal(constants_1.APP_DISTRIBUTION_TYPES.MARKETPLACE),
|
package/package.json
CHANGED