@vibekiln/cutline-mcp-cli 0.1.1 → 0.1.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.
@@ -83,14 +83,39 @@ function prompt(question) {
83
83
  });
84
84
  });
85
85
  }
86
- function buildServerConfig() {
86
+ function resolveServeRuntime() {
87
+ // Optional explicit override for advanced environments.
88
+ if (process.env.CUTLINE_MCP_BIN?.trim()) {
89
+ return {
90
+ command: process.env.CUTLINE_MCP_BIN.trim(),
91
+ argsPrefix: [],
92
+ source: 'binary',
93
+ };
94
+ }
95
+ // Prefer the globally installed binary for faster/more reliable startup.
96
+ const voltaBin = join(homedir(), '.volta', 'bin', 'cutline-mcp');
97
+ if (existsSync(voltaBin)) {
98
+ return {
99
+ command: voltaBin,
100
+ argsPrefix: [],
101
+ source: 'binary',
102
+ };
103
+ }
104
+ // Fallback for machines without a global install.
87
105
  const voltaNpx = join(homedir(), '.volta', 'bin', 'npx');
88
106
  const npxCommand = existsSync(voltaNpx) ? voltaNpx : 'npx';
107
+ return {
108
+ command: npxCommand,
109
+ argsPrefix: ['-y', '@vibekiln/cutline-mcp-cli@latest'],
110
+ source: 'npx',
111
+ };
112
+ }
113
+ function buildServerConfig(runtime) {
89
114
  const config = {};
90
115
  for (const name of SERVER_NAMES) {
91
116
  config[`cutline-${name}`] = {
92
- command: npxCommand,
93
- args: ['-y', '@vibekiln/cutline-mcp-cli@latest', 'serve', name],
117
+ command: runtime.command,
118
+ args: [...runtime.argsPrefix, 'serve', name],
94
119
  };
95
120
  }
96
121
  return config;
@@ -198,7 +223,8 @@ export async function setupCommand(options) {
198
223
  catch { /* ignore parse errors */ }
199
224
  }
200
225
  // ── 3. Write MCP server config to IDEs ───────────────────────────────────
201
- const serverConfig = buildServerConfig();
226
+ const runtime = resolveServeRuntime();
227
+ const serverConfig = buildServerConfig(runtime);
202
228
  const home = homedir();
203
229
  const ideConfigs = [
204
230
  { name: 'Cursor', path: join(home, '.cursor', 'mcp.json') },
@@ -217,6 +243,12 @@ export async function setupCommand(options) {
217
243
  }
218
244
  if (wroteAny) {
219
245
  console.log(chalk.dim('\n MCP server entries merged into IDE config (existing servers preserved).\n'));
246
+ if (runtime.source === 'binary') {
247
+ console.log(chalk.dim(` Using local MCP binary: ${runtime.command}\n`));
248
+ }
249
+ else {
250
+ console.log(chalk.dim(' Local `cutline-mcp` binary not found — using npx fallback.\n'));
251
+ }
220
252
  }
221
253
  else {
222
254
  console.log(chalk.yellow('\n No IDE config files found. Printing config for manual setup:\n'));
@@ -231,7 +263,8 @@ export async function setupCommand(options) {
231
263
  console.log(chalk.dim(' If you prefer `claude mcp add` instead of ~/.claude.json:\n'));
232
264
  const coreServers = ['constraints', 'premortem', 'tools', 'exploration'];
233
265
  for (const name of coreServers) {
234
- console.log(chalk.cyan(` claude mcp add cutline-${name} -- npx -y @vibekiln/cutline-mcp-cli serve ${name}`));
266
+ const invocation = [runtime.command, ...runtime.argsPrefix, 'serve', name].join(' ');
267
+ console.log(chalk.cyan(` claude mcp add cutline-${name} -- ${invocation}`));
235
268
  }
236
269
  console.log();
237
270
  // ── 6. What you can do ───────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibekiln/cutline-mcp-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "CLI and MCP servers for Cutline — authenticate, then run constraint-aware MCP servers in Cursor or any MCP client.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",