Forráskód Böngészése

chore: define CLAUDE_PLUGIN_ROOT in project settings for local dev

When this repo is opened as a project (not installed via marketplace),
Claude Code reads `.mcp.json` as a project-level MCP config. The
`${CLAUDE_PLUGIN_ROOT}/build/index.js` path can't resolve because
that variable is only set during plugin install.

Set `CLAUDE_PLUGIN_ROOT` to `$CLAUDE_PROJECT_DIR` in `.claude/settings.json`
so the project-scoped MCP server resolves correctly. Marketplace install
is unaffected (it loads from the cached plugin dir with its own real
CLAUDE_PLUGIN_ROOT and never reads this file).

Side benefit: editing src/, rebuilding, and reopening the project now
gives you a live local apple-mail MCP server for development without
reinstalling the plugin.
Robert Sweet 1 hónapja
szülő
commit
a56b2a4cd0
2 módosított fájl, 10 hozzáadás és 1 törlés
  1. 5 0
      .claude/settings.json
  2. 5 1
      .gitignore

+ 5 - 0
.claude/settings.json

@@ -0,0 +1,5 @@
+{
+  "env": {
+    "CLAUDE_PLUGIN_ROOT": "$CLAUDE_PROJECT_DIR"
+  }
+}

+ 5 - 1
.gitignore

@@ -28,4 +28,8 @@ Thumbs.db
 
 # npm package files
 *.tgz
-.claude/
+
+# Claude Code per-user state (settings.local.json, worktrees, etc.)
+# but keep the shared project settings.json tracked.
+.claude/*
+!.claude/settings.json