Skip to content

Commit 2f78ed9

Browse files
fix(editor): Make sure when you duplicate a workflow MCP is disabled (n8n-io#22784)
Co-authored-by: Milorad FIlipović <milorad@n8n.io>
1 parent b358940 commit 2f78ed9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

packages/frontend/editor-ui/src/app/stores/workflows.store.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,12 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, () => {
15821582
// make sure that the new ones are not active
15831583
sendData.active = false;
15841584

1585+
// When activation is false, ensure MCP is disabled
1586+
if (!sendData.settings) {
1587+
sendData.settings ??= {};
1588+
}
1589+
sendData.settings.availableInMCP = false;
1590+
15851591
const projectStore = useProjectsStore();
15861592

15871593
if (!sendData.projectId && projectStore.currentProjectId) {

0 commit comments

Comments
 (0)