@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 +33 -13
- package/index.js +1 -1
- package/package.json +1 -1
- package/tools/exportToCloud.js +1 -1
package/bin/init.js
CHANGED
|
@@ -145,21 +145,41 @@ if (mode === 'local') {
|
|
|
145
145
|
}
|
|
146
146
|
print();
|
|
147
147
|
|
|
148
|
-
// 5. allowedTools
|
|
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
|
-
|
|
161
|
+
const autoWrite = (await ask(' Add these to your Claude settings automatically? [Y/n]: ')).trim().toLowerCase();
|
|
151
162
|
print();
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
print(
|
|
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
|
|
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
package/tools/exportToCloud.js
CHANGED
|
@@ -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
|
|
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');
|