viviscape-mcp 2.0.0 → 2.0.1

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.
@@ -134,11 +134,21 @@ function respond(res, status, contentType, body) {
134
134
  res.end(buf);
135
135
  }
136
136
  function openBrowser(url, log) {
137
- const [cmd, args] = process.platform === 'win32' ? ['cmd', ['/c', 'start', '', url]] :
137
+ // Windows: `cmd /c start` treats an unquoted `&` as a command separator, and
138
+ // Node only quotes args containing spaces or quotes -- so the login URL was cut
139
+ // at the first `&` and the page loaded with no `state` (the server answers 400
140
+ // "invalid state"). Quote the URL ourselves and pass the line to cmd verbatim.
141
+ const win = process.platform === 'win32';
142
+ const [cmd, args] = win ? ['cmd.exe', ['/c', 'start', '""', `"${url}"`]] :
138
143
  process.platform === 'darwin' ? ['open', [url]] :
139
144
  ['xdg-open', [url]];
140
145
  try {
141
- const child = spawn(cmd, args, { detached: true, stdio: 'ignore', windowsHide: true });
146
+ const child = spawn(cmd, args, {
147
+ detached: true,
148
+ stdio: 'ignore',
149
+ windowsHide: true,
150
+ windowsVerbatimArguments: win,
151
+ });
142
152
  child.on('error', () => log('Could not open the browser automatically. Open the URL above manually.'));
143
153
  child.unref();
144
154
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viviscape-mcp",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "MCP server for the ViviScape API — CRM, projects, companies, notes, and insights, authenticated as the signed-in ViviScape user",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",