Add an MCP full-access permission that runs every action without local confirmation
CI / verify (push) Canceled after 0s
CI / verify (push) Canceled after 0s
With full access the installation grants every capability, destructive and conditionally confirmed actions (queue retry/remove with source deletion, history clear, app restart, ...) run without the local dialog, and the new mhu_files_grant tool can add or widen directory grants. Narrowing or removing grants and changing permissions stay local. Enabling full access in the settings asks for local confirmation once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
432c0e01b8
commit
08f375621a
6 files changed
+42
-13
No files matched your search
@@ -4270,6 +4270,7 @@ async function startMcpService() {
|
||||
getSystemMetrics: args => systemMetrics.snapshot(args),
|
||||
getGrants: () => mcpService?.store.value.grants || [], trashFile: file => require('electron').shell.trashItem(file), canWrite: assertConfigWriteAllowed,
|
||||
getCapabilities: () => mcpService?.capabilities() || [],
|
||||
grantDirectory: (directory, options) => mcpService.grantDirectory(directory, options),
|
||||
getProtectedPaths: () => [app.getPath('userData'), configStore.filePath, configStore.historyPath, configStore.automationCompletionPath],
|
||||
getInstallationId: () => mcpService?.store.value.identity?.installationId,
|
||||
getRuntimeDiagnostics: () => ({
|
||||
@@ -4307,7 +4308,7 @@ ipcMain.on('mcp:reply', (event, payload) => {
|
||||
});
|
||||
ipcMain.handle('mcp:configure', async (event, args) => {
|
||||
if (!isTrustedOnlineBackupIpcEvent(event) || !mcpService) throw new Error('MCP_ACCESS_DENIED');
|
||||
if (args?.enabled && (args.capabilities?.includes('secrets') || (args.capabilities?.includes('updates') && !mcpService.capabilities().includes('updates')) || !mcpService.active)) {
|
||||
if (args?.enabled && (args.capabilities?.includes('secrets') || (args.capabilities?.includes('full_access') && !mcpService.capabilities().includes('full_access')) || (args.capabilities?.includes('updates') && !mcpService.capabilities().includes('updates')) || !mcpService.active)) {
|
||||
const result = await dialog.showMessageBox(mainWindow, { type: 'warning', title: 'MCP-Zugriff / MCP access', message: 'MCP-Zugriff mit diesen Berechtigungen aktivieren? / Enable MCP with these capabilities?',
|
||||
detail: String(args.capabilities?.join(', ') || '').slice(0, 100), buttons: ['Abbrechen / Cancel', 'Aktivieren / Enable'], defaultId: 0, cancelId: 0, noLink: true });
|
||||
if (result.response !== 1) return mcpService.state();
|
||||
|
||||
Reference in new issue
Block a user