@@ -19,14 +19,14 @@ const MCP_CONFIG_WITH_COMMENTS = `{
1919 "servers": {
2020 "simple-memory-mcp": {
2121 "command": "simple-memory"
22- // 💡 Customize with environment variables:
22+ // 💡 Uncomment and customize environment variables as needed :
2323 // "env": {
24- // "MEMORY_DB": "/path/to/your/memory.db",
25- // "MEMORY_BACKUP_PATH": "/path/to/backups",
26- // "MEMORY_BACKUP_INTERVAL": "1440",
27- // "DEBUG": "false"
24+ // "MEMORY_DB": "./memory.db", // Custom database location
25+ // "MEMORY_BACKUP_PATH": "./backups", // Enable automatic backups
26+ // "MEMORY_BACKUP_INTERVAL": "1440", // Backup interval in minutes
27+ // "MEMORY_BACKUP_RETENTION": "30", // Keep backups for N days
28+ // "DEBUG": "false" // Enable debug logging
2829 // }
29- // See README for more options: https://github.com/chrisribe/simple-memory-mcp#configuration
3030 }
3131 }
3232}` ;
@@ -39,8 +39,8 @@ function getVSCodeConfigPaths() {
3939 if ( platform === 'win32' ) {
4040 const appData = process . env . APPDATA || join ( home , 'AppData' , 'Roaming' ) ;
4141 paths . push (
42- { name : 'VS Code' , path : join ( appData , 'Code' , 'User' ) } ,
43- { name : 'VS Code Insiders' , path : join ( appData , 'Code - Insiders' , 'User' ) }
42+ { name : 'VS Code' , path : join ( appData , 'Code' , 'User' ) . replace ( / \\ / g , '/' ) } ,
43+ { name : 'VS Code Insiders' , path : join ( appData , 'Code - Insiders' , 'User' ) . replace ( / \\ / g , '/' ) }
4444 ) ;
4545 } else if ( platform === 'darwin' ) {
4646 const appSupport = join ( home , 'Library' , 'Application Support' ) ;
@@ -99,8 +99,7 @@ function configureVSCode(name, vscodeUserPath) {
9999 // Check if already configured
100100 if ( mcpConfig [ serversProp ] [ 'simple-memory-mcp' ] ) {
101101 console . log ( `✅ Already configured in ${ name } ` ) ;
102- console . log ( ` 💡 To customize: ${ mcpJsonPath } ` ) ;
103- return { success : true , reason : 'already-configured' , path : mcpJsonPath } ;
102+ return { success : true , reason : 'already-configured' , path : mcpJsonPath . replace ( / \\ / g, '/' ) } ;
104103 }
105104
106105 // Add simple-memory-mcp config
@@ -110,8 +109,7 @@ function configureVSCode(name, vscodeUserPath) {
110109 mkdirSync ( vscodeUserPath , { recursive : true } ) ;
111110 writeFileSync ( mcpJsonPath , JSON . stringify ( mcpConfig , null , 2 ) , 'utf8' ) ;
112111 console . log ( `✅ Added to ${ name } mcp.json` ) ;
113- console . log ( ` Location: ${ mcpJsonPath } ` ) ;
114- return { success : true , reason : 'configured' , path : mcpJsonPath } ;
112+ return { success : true , reason : 'configured' , path : mcpJsonPath . replace ( / \\ / g, '/' ) } ;
115113 } catch ( error ) {
116114 console . error ( `❌ Failed to update ${ name } mcp.json:` , error . message ) ;
117115 return { success : false , reason : 'write-error' } ;
@@ -142,19 +140,25 @@ function main() {
142140 if ( foundCount === 0 ) {
143141 console . log ( '\nℹ️ No VS Code installations detected' ) ;
144142 console . log ( ' Add this to your VS Code User/mcp.json manually:' ) ;
145- console . log ( MCP_CONFIG_WITH_COMMENTS ) ;
146143 } else if ( configuredCount > 0 ) {
147144 console . log ( '\n🎉 Configuration complete!' ) ;
148145 console . log ( ' Restart VS Code and simple-memory-mcp will be available' ) ;
149- console . log ( '\n💡 Customization Tips:' ) ;
150- console . log ( ' • Set custom database location with MEMORY_DB environment variable' ) ;
151- console . log ( ' • Enable automatic backups with MEMORY_BACKUP_PATH' ) ;
152- console . log ( ' • Run multiple instances for work/personal contexts' ) ;
153- console . log ( ' • See README for all configuration options' ) ;
154- console . log ( '\n📖 Configuration docs: https://github.com/chrisribe/simple-memory-mcp#configuration' ) ;
155146 } else {
156147 console . log ( '\n✅ All installations already configured' ) ;
157148 }
149+
150+ // Show example config and instructions (for all cases)
151+ if ( foundCount > 0 ) {
152+ console . log ( '\n💡 Example configuration with all options:' ) ;
153+ console . log ( MCP_CONFIG_WITH_COMMENTS ) ;
154+ console . log ( '\n💡 To find and edit your config file:' ) ;
155+ console . log ( ' Run: node dist/index.js memory-stats' ) ;
156+ if ( configuredCount > 0 ) {
157+ console . log ( '\n📖 Configuration docs: https://github.com/chrisribe/simple-memory-mcp#configuration' ) ;
158+ }
159+ } else {
160+ console . log ( MCP_CONFIG_WITH_COMMENTS ) ;
161+ }
158162}
159163
160164main ( ) ;
0 commit comments