@proplandev/mcp 1.0.2 → 1.0.4

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.
package/bin/init.js CHANGED
@@ -145,21 +145,41 @@ if (mode === 'local') {
145
145
  }
146
146
  print();
147
147
 
148
- // 5. allowedTools tip
148
+ // 5. allowedTools — offer to auto-write
149
+ const ALLOWED_TOOLS = [
150
+ 'mcp__project-planner__get_project_status',
151
+ 'mcp__project-planner__get_next_tasks',
152
+ 'mcp__project-planner__get_project_roadmap',
153
+ 'mcp__project-planner__get_tasks',
154
+ 'mcp__project-planner__add_session_summary',
155
+ 'mcp__project-planner__update_task_status',
156
+ 'mcp__project-planner__add_note_to_task',
157
+ ];
158
+
159
+ const claudeSettingsPath = path.join(os.homedir(), '.claude', 'settings.json');
149
160
  print(bold(' Tip — skip approval prompts for read-only tools'));
150
- print(dim(' Add this to ~/.claude/settings.json:'));
161
+ const autoWrite = (await ask(' Add these to your Claude settings automatically? [Y/n]: ')).trim().toLowerCase();
151
162
  print();
152
- print(dim(' {'));
153
- print(dim(' "allowedTools": ['));
154
- print(dim(' "mcp__project-planner__get_project_status",'));
155
- print(dim(' "mcp__project-planner__get_next_tasks",'));
156
- print(dim(' "mcp__project-planner__get_project_roadmap",'));
157
- print(dim(' "mcp__project-planner__get_tasks",'));
158
- print(dim(' "mcp__project-planner__add_session_summary",'));
159
- print(dim(' "mcp__project-planner__update_task_status",'));
160
- print(dim(' "mcp__project-planner__add_note_to_task"'));
161
- print(dim(' ]'));
162
- print(dim(' }'));
163
+
164
+ if (autoWrite !== 'n') {
165
+ try {
166
+ let settings = {};
167
+ try { settings = JSON.parse(fs.readFileSync(claudeSettingsPath, 'utf8')); } catch { /* new file */ }
168
+ const existing_tools = Array.isArray(settings.allowedTools) ? settings.allowedTools : [];
169
+ const merged = [...new Set([...existing_tools, ...ALLOWED_TOOLS])];
170
+ settings.allowedTools = merged;
171
+ fs.mkdirSync(path.dirname(claudeSettingsPath), { recursive: true });
172
+ fs.writeFileSync(claudeSettingsPath, JSON.stringify(settings, null, 2) + '\n', 'utf8');
173
+ print(green(' ✓ Claude settings updated') + ' ' + dim(claudeSettingsPath));
174
+ } catch (err) {
175
+ print(' ' + YELLOW + '⚠ Could not write settings: ' + err.message + RESET);
176
+ print(dim(' Add manually to ~/.claude/settings.json:'));
177
+ print(dim(' "allowedTools": ' + JSON.stringify(ALLOWED_TOOLS, null, 4).replace(/\n/g, '\n ')));
178
+ }
179
+ } else {
180
+ print(dim(' To add manually, paste into ~/.claude/settings.json:'));
181
+ print(dim(' "allowedTools": ' + JSON.stringify(ALLOWED_TOOLS, null, 4).replace(/\n/g, '\n ')));
182
+ }
163
183
  print();
164
184
 
165
185
  rl.close();
package/index.js CHANGED
@@ -356,7 +356,7 @@ server.tool(
356
356
  'export_to_cloud',
357
357
  'Sync local projects to the ProPlan dashboard. Only works in local mode. New projects are inserted, changed projects updated, unchanged ones skipped.',
358
358
  {
359
- mcp_token: z.string().describe('Your MCP token from app.proplan.dev → Settings → Claude Code Integration.'),
359
+ mcp_token: z.string().describe('Your MCP token from project-planner-7zw4.onrender.com → Settings → Claude Code Integration.'),
360
360
  api_url: z.string().optional().describe('Override the API base URL. Defaults to the production ProPlan backend.'),
361
361
  },
362
362
  async ({ mcp_token, api_url }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proplandev/mcp",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "MCP server for Claude Code — persistent project memory, session continuity, and structural repo analysis",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -7,7 +7,7 @@ export async function exportToCloud({ mcp_token, api_url }) {
7
7
  const resolvedApiUrl = api_url || process.env.PROPLAN_API_URL || 'https://project-planner-7zw4.onrender.com';
8
8
 
9
9
  if (!mcp_token) {
10
- throw new Error('mcp_token is required. Generate one at app.proplan.dev → Settings → Claude Code Integration.');
10
+ throw new Error('mcp_token is required. Generate one at project-planner-7zw4.onrender.com → Settings → Claude Code Integration.');
11
11
  }
12
12
 
13
13
  const dbPath = join(process.cwd(), '.project-planner', 'db.sqlite');