@peppermint-mcp/wizard 0.1.0 → 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 (3) hide show
  1. package/README.md +7 -7
  2. package/dist/cli.js +16 -11
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- # @peppermint/mcp-wizard
1
+ # @peppermint-mcp/wizard
2
2
 
3
3
  One-command installer for [Peppermint](https://peppermint.com) MCP across AI coding hosts.
4
4
 
5
5
  ```bash
6
- npx @peppermint/mcp-wizard
6
+ npx @peppermint-mcp/wizard
7
7
  ```
8
8
 
9
9
  Detects your installed AI tools, authenticates with Peppermint, and writes the correct MCP config for each host. No manual JSON editing.
@@ -22,7 +22,7 @@ Detects your installed AI tools, authenticates with Peppermint, and writes the c
22
22
  ### Install Peppermint MCP
23
23
 
24
24
  ```bash
25
- npx @peppermint/mcp-wizard
25
+ npx @peppermint-mcp/wizard
26
26
  ```
27
27
 
28
28
  The wizard will:
@@ -36,13 +36,13 @@ The wizard will:
36
36
 
37
37
  ```bash
38
38
  # List detected hosts and their status
39
- npx @peppermint/mcp-wizard list
39
+ npx @peppermint-mcp/wizard list
40
40
 
41
41
  # Health check on existing installation
42
- npx @peppermint/mcp-wizard doctor
42
+ npx @peppermint-mcp/wizard doctor
43
43
 
44
44
  # Remove Peppermint from selected hosts
45
- npx @peppermint/mcp-wizard remove
45
+ npx @peppermint-mcp/wizard remove
46
46
  ```
47
47
 
48
48
  ### Flags
@@ -56,7 +56,7 @@ npx @peppermint/mcp-wizard remove
56
56
  ### Using staging
57
57
 
58
58
  ```bash
59
- npx @peppermint/mcp-wizard --server https://dev-api.peppermint.com/mcp/
59
+ npx @peppermint-mcp/wizard --server https://dev-api.peppermint.com/mcp/
60
60
  ```
61
61
 
62
62
  ## How it works
package/dist/cli.js CHANGED
@@ -255,7 +255,8 @@ async function createApiKey(serverBase2, accessToken) {
255
255
  const text = await res.text();
256
256
  throw new Error(`API key creation failed (${res.status}): ${text}`);
257
257
  }
258
- return res.json();
258
+ const data = await res.json();
259
+ return data.raw_key;
259
260
  }
260
261
  function waitForCallback(port, expectedState) {
261
262
  return new Promise((resolve, reject) => {
@@ -335,9 +336,9 @@ async function authenticateWithBrowser(serverBase2) {
335
336
  clientId,
336
337
  verifier
337
338
  );
338
- const apiKeyResult = await createApiKey(serverBase2, tokens.access_token);
339
+ const rawKey = await createApiKey(serverBase2, tokens.access_token);
339
340
  const creds = {
340
- api_key: apiKeyResult.key,
341
+ api_key: rawKey,
341
342
  email: tokens.email,
342
343
  server: serverBase2,
343
344
  client_id: clientId,
@@ -351,7 +352,7 @@ async function authenticateWithBrowser(serverBase2) {
351
352
  import { execFile as execFile3 } from "child_process";
352
353
  import { promisify as promisify3 } from "util";
353
354
  var exec3 = promisify3(execFile3);
354
- async function installClaudeCode(serverUrl, dryRun) {
355
+ async function installClaudeCode(serverUrl, apiKey, dryRun) {
355
356
  const args = [
356
357
  "mcp",
357
358
  "add",
@@ -362,6 +363,9 @@ async function installClaudeCode(serverUrl, dryRun) {
362
363
  "peppermint-memory",
363
364
  serverUrl
364
365
  ];
366
+ if (apiKey) {
367
+ args.push("--header", `Authorization: Bearer ${apiKey}`);
368
+ }
365
369
  if (dryRun) {
366
370
  return {
367
371
  success: true,
@@ -588,8 +592,11 @@ async function removeCursor(dryRun) {
588
592
  import { execFile as execFile4 } from "child_process";
589
593
  import { promisify as promisify4 } from "util";
590
594
  var exec4 = promisify4(execFile4);
591
- async function installCodex(serverUrl, dryRun) {
595
+ async function installCodex(serverUrl, apiKey, dryRun) {
592
596
  const addArgs = ["mcp", "add", "peppermint-memory", "--url", serverUrl];
597
+ if (apiKey) {
598
+ addArgs.push("--header", `Authorization: Bearer ${apiKey}`);
599
+ }
593
600
  if (dryRun) {
594
601
  return {
595
602
  success: true,
@@ -696,15 +703,13 @@ var DEFAULT_SERVER = "https://api.peppermint.com/mcp/";
696
703
  function serverBase(serverUrl) {
697
704
  return serverUrl.replace(/\/mcp\/?$/, "");
698
705
  }
699
- function needsAuth(hosts) {
700
- return hosts.some(
701
- (h) => h.installMethod === "file-native-http" || h.installMethod === "file-stdio-shim"
702
- );
706
+ function needsAuth(_hosts) {
707
+ return true;
703
708
  }
704
709
  async function installHost(host, serverUrl, apiKey, dryRun) {
705
710
  switch (host.id) {
706
711
  case "claude-code":
707
- return installClaudeCode(serverUrl, dryRun);
712
+ return installClaudeCode(serverUrl, apiKey, dryRun);
708
713
  case "claude-desktop":
709
714
  if (!apiKey) throw new Error("API key required for Claude Desktop");
710
715
  return installClaudeDesktop(serverUrl, apiKey, dryRun);
@@ -712,7 +717,7 @@ async function installHost(host, serverUrl, apiKey, dryRun) {
712
717
  if (!apiKey) throw new Error("API key required for Cursor");
713
718
  return installCursor(serverUrl, apiKey, dryRun);
714
719
  case "codex":
715
- return installCodex(serverUrl, dryRun);
720
+ return installCodex(serverUrl, apiKey, dryRun);
716
721
  }
717
722
  }
718
723
  async function removeHost(host, dryRun) {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@peppermint-mcp/wizard",
3
- "version": "0.1.0",
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": {
7
- "peppermint-mcp-wizard": "./dist/cli.js"
7
+ "peppermint-mcp-wizard": "dist/cli.js"
8
8
  },
9
9
  "files": [
10
10
  "dist/"