diff --git a/js/mzta-storage.js b/js/mzta-storage.js
new file mode 100644
index 00000000..21ceb5b7
--- /dev/null
+++ b/js/mzta-storage.js
@@ -0,0 +1,187 @@
+/*
+ * ThunderAI [https://micz.it/thunderbird-addon-thunderai/]
+ * Copyright (C) 2024 - 2026 Mic (m@micz.it)
+
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+import { taLogger } from './mzta-logger.js';
+
+export class taStorage {
+
+ static STORAGE_KEY_PREFIX = 'msg:';
+ static SCHEMA_VERSION = 1;
+
+ logger = null;
+
+ constructor(do_debug = false) {
+ this.taLog = new taLogger("mzta-storage", do_debug);
+ }
+
+ /**
+ * Build the storage key for a given Message-ID.
+ * @param {string} messageId - The Message-ID header string.
+ * @returns {string} The prefixed storage key.
+ */
+ _buildKey(messageId) {
+ return taStorage.STORAGE_KEY_PREFIX + messageId;
+ }
+
+ /**
+ * Read the full record for a given Message-ID.
+ * @param {string} messageId - The Message-ID header string.
+ * @returns {Promise