@peppermint-mcp/wizard 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.
Files changed (2) hide show
  1. package/dist/cli.js +12 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -352,7 +352,7 @@ async function authenticateWithBrowser(serverBase2) {
352
352
  import { execFile as execFile3 } from "child_process";
353
353
  import { promisify as promisify3 } from "util";
354
354
  var exec3 = promisify3(execFile3);
355
- async function installClaudeCode(serverUrl, dryRun) {
355
+ async function installClaudeCode(serverUrl, apiKey, dryRun) {
356
356
  const args = [
357
357
  "mcp",
358
358
  "add",
@@ -363,6 +363,9 @@ async function installClaudeCode(serverUrl, dryRun) {
363
363
  "peppermint-memory",
364
364
  serverUrl
365
365
  ];
366
+ if (apiKey) {
367
+ args.push("--header", `Authorization: Bearer ${apiKey}`);
368
+ }
366
369
  if (dryRun) {
367
370
  return {
368
371
  success: true,
@@ -589,8 +592,11 @@ async function removeCursor(dryRun) {
589
592
  import { execFile as execFile4 } from "child_process";
590
593
  import { promisify as promisify4 } from "util";
591
594
  var exec4 = promisify4(execFile4);
592
- async function installCodex(serverUrl, dryRun) {
595
+ async function installCodex(serverUrl, apiKey, dryRun) {
593
596
  const addArgs = ["mcp", "add", "peppermint-memory", "--url", serverUrl];
597
+ if (apiKey) {
598
+ addArgs.push("--header", `Authorization: Bearer ${apiKey}`);
599
+ }
594
600
  if (dryRun) {
595
601
  return {
596
602
  success: true,
@@ -697,15 +703,13 @@ var DEFAULT_SERVER = "https://api.peppermint.com/mcp/";
697
703
  function serverBase(serverUrl) {
698
704
  return serverUrl.replace(/\/mcp\/?$/, "");
699
705
  }
700
- function needsAuth(hosts) {
701
- return hosts.some(
702
- (h) => h.installMethod === "file-native-http" || h.installMethod === "file-stdio-shim"
703
- );
706
+ function needsAuth(_hosts) {
707
+ return true;
704
708
  }
705
709
  async function installHost(host, serverUrl, apiKey, dryRun) {
706
710
  switch (host.id) {
707
711
  case "claude-code":
708
- return installClaudeCode(serverUrl, dryRun);
712
+ return installClaudeCode(serverUrl, apiKey, dryRun);
709
713
  case "claude-desktop":
710
714
  if (!apiKey) throw new Error("API key required for Claude Desktop");
711
715
  return installClaudeDesktop(serverUrl, apiKey, dryRun);
@@ -713,7 +717,7 @@ async function installHost(host, serverUrl, apiKey, dryRun) {
713
717
  if (!apiKey) throw new Error("API key required for Cursor");
714
718
  return installCursor(serverUrl, apiKey, dryRun);
715
719
  case "codex":
716
- return installCodex(serverUrl, dryRun);
720
+ return installCodex(serverUrl, apiKey, dryRun);
717
721
  }
718
722
  }
719
723
  async function removeHost(host, dryRun) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peppermint-mcp/wizard",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "One-command installer for Peppermint MCP across AI coding hosts",
5
5
  "type": "module",
6
6
  "bin": {