@peppermint-mcp/wizard 0.4.2 → 0.4.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +13 -16
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -523,12 +523,10 @@ function getConfigPath3() {
523
523
  }
524
524
  async function installClaudeDesktop(serverUrl, apiKey, dryRun) {
525
525
  const configPath = getConfigPath3();
526
- const serverConfig = {
527
- url: serverUrl,
528
- headers: {
529
- Authorization: `Bearer ${apiKey}`
530
- }
531
- };
526
+ const serverConfig = { url: serverUrl };
527
+ if (apiKey) {
528
+ serverConfig.headers = { Authorization: `Bearer ${apiKey}` };
529
+ }
532
530
  try {
533
531
  removeServerFromConfig(configPath, "mcpServers", "peppermint", dryRun);
534
532
  const result = writeServerToConfig({
@@ -574,12 +572,10 @@ function getConfigPath4() {
574
572
  }
575
573
  async function installCursor(serverUrl, apiKey, dryRun) {
576
574
  const configPath = getConfigPath4();
577
- const serverConfig = {
578
- url: serverUrl,
579
- headers: {
580
- Authorization: `Bearer ${apiKey}`
581
- }
582
- };
575
+ const serverConfig = { url: serverUrl };
576
+ if (apiKey) {
577
+ serverConfig.headers = { Authorization: `Bearer ${apiKey}` };
578
+ }
583
579
  try {
584
580
  removeServerFromConfig(configPath, "mcpServers", "peppermint", dryRun);
585
581
  const result = writeServerToConfig({
@@ -995,7 +991,10 @@ var DEFAULT_SERVER = "https://api.peppermint.com/mcp/";
995
991
  function serverBase(serverUrl) {
996
992
  return serverUrl.replace(/\/mcp\/?$/, "");
997
993
  }
998
- function needsAuth(_hosts) {
994
+ function needsAuth(serverUrl) {
995
+ if (serverUrl && (serverUrl.includes("localhost") || serverUrl.includes("127.0.0.1"))) {
996
+ return false;
997
+ }
999
998
  return true;
1000
999
  }
1001
1000
  async function installHost(host, serverUrl, apiKey, dryRun) {
@@ -1003,10 +1002,8 @@ async function installHost(host, serverUrl, apiKey, dryRun) {
1003
1002
  case "claude-code":
1004
1003
  return installClaudeCode(serverUrl, apiKey, dryRun);
1005
1004
  case "claude-desktop":
1006
- if (!apiKey) throw new Error("API key required for Claude Desktop");
1007
1005
  return installClaudeDesktop(serverUrl, apiKey, dryRun);
1008
1006
  case "cursor":
1009
- if (!apiKey) throw new Error("API key required for Cursor");
1010
1007
  return installCursor(serverUrl, apiKey, dryRun);
1011
1008
  case "codex":
1012
1009
  return installCodex(serverUrl, apiKey, dryRun);
@@ -1103,7 +1100,7 @@ async function addCommand(options) {
1103
1100
  apiKey = tokenFromFlag;
1104
1101
  const msg = "Using provided auth token";
1105
1102
  nonInteractive ? console.log(msg) : p.log.success(msg);
1106
- } else if (needsAuth(selectedHosts)) {
1103
+ } else if (needsAuth(options.server)) {
1107
1104
  const base = serverBase(options.server);
1108
1105
  const existing = loadCredentials(base);
1109
1106
  if (existing) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peppermint-mcp/wizard",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "One-command installer for Peppermint MCP across AI coding hosts",
5
5
  "type": "module",
6
6
  "bin": {