memory-engineering-mcp
Version:
š§ AI Memory System powered by MongoDB Atlas & Voyage AI - Autonomous memory management with zero manual work
45 lines (33 loc) ⢠1.41 kB
JavaScript
/**
* Clean ALL data from MongoDB Atlas
* Use this to simulate a fresh first-time user experience
*/
import { MongoClient } from 'mongodb';
const uri = "mongodb+srv://rom:05101994@mongovibe.mmzhvvr.mongodb.net/memory_engineering?retryWrites=true&w=majority&appName=mongovibe";
const client = new MongoClient(uri);
try {
await client.connect();
console.log('šļø CLEANING MONGODB ATLAS - Fresh Start Simulation\n');
const db = client.db();
// Drop all collections
const collections = await db.listCollections().toArray();
console.log(`Found ${collections.length} collections to clean:\n`);
for (const coll of collections) {
const count = await db.collection(coll.name).countDocuments({});
console.log(` š¦ ${coll.name}: ${count} documents`);
await db.collection(coll.name).deleteMany({});
console.log(` ā
Deleted all documents`);
}
console.log('\n⨠MongoDB Atlas is now COMPLETELY CLEAN!');
console.log('šÆ Ready for fresh first-time installation!\n');
console.log('Next steps:');
console.log(' 1. Restart Cursor (reload window)');
console.log(' 2. Run: memory_engineering_init');
console.log(' 3. Run: memory_engineering_sync');
console.log(' 4. Test: memory_engineering_search\n');
} catch (error) {
console.error('ā Error cleaning database:', error);
} finally {
await client.close();
}