claude-conversation-memory-mcp 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -59,6 +59,10 @@ Claude Code CLI is required because it stores conversation history in `~/.claude
59
59
  npm install -g claude-conversation-memory-mcp
60
60
  ```
61
61
 
62
+ **🎉 Automatic Configuration**: The global installation will automatically configure the MCP server in Claude Code's `~/.claude.json` file. You'll see a success message when it's done!
63
+
64
+ **Manual Configuration** (if needed): If automatic configuration doesn't work, see the [Configure Claude Code CLI](#configure-claude-code-cli) section below.
65
+
62
66
  **Discover Available Models:**
63
67
  After installation, you can see all available embedding models and their dimensions:
64
68
  - Run the CLI: `claude-conversation-memory-mcp`
@@ -19,7 +19,7 @@ export class ConversationMemoryServer {
19
19
  constructor() {
20
20
  this.server = new Server({
21
21
  name: "claude-conversation-memory",
22
- version: "1.1.0",
22
+ version: "1.2.0",
23
23
  }, {
24
24
  capabilities: {
25
25
  tools: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-conversation-memory-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "MCP server for indexing and searching Claude Code conversation history with decision tracking, git integration, and project migration/merge",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "files": [
11
11
  "dist",
12
+ "scripts",
12
13
  "README.md",
13
14
  "LICENSE",
14
15
  ".claude-memory-config.example.json",
@@ -17,6 +18,7 @@
17
18
  "scripts": {
18
19
  "build": "tsc && npm run postbuild",
19
20
  "postbuild": "cp src/storage/schema.sql dist/storage/",
21
+ "postinstall": "node scripts/postinstall.js",
20
22
  "dev": "tsc --watch",
21
23
  "start": "node dist/index.js",
22
24
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
@@ -83,7 +85,7 @@
83
85
  "typescript": "^5.7.3"
84
86
  },
85
87
  "engines": {
86
- "node": ">=18.0.0"
88
+ "node": ">=20.0.0"
87
89
  },
88
90
  "lint-staged": {
89
91
  "*.ts": [
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Post-install script to automatically configure claude-conversation-memory-mcp
4
+ * in Claude Code's global configuration (~/.claude.json)
5
+ */
6
+
7
+ import { readFileSync, writeFileSync, existsSync, copyFileSync } from 'fs';
8
+ import { join } from 'path';
9
+ import { homedir } from 'os';
10
+
11
+ const CLAUDE_CONFIG_PATH = join(homedir(), '.claude.json');
12
+ const SERVER_NAME = 'conversation-memory';
13
+
14
+ function postInstall() {
15
+ // Only run if this is a global installation
16
+ if (process.env.npm_config_global !== 'true') {
17
+ console.log('📦 Local installation detected - skipping global MCP configuration');
18
+ console.log(' To configure manually, run: claude mcp add --scope user conversation-memory');
19
+ return;
20
+ }
21
+
22
+ console.log('🔧 Configuring claude-conversation-memory-mcp in Claude Code...');
23
+
24
+ // Check if Claude Code config exists
25
+ if (!existsSync(CLAUDE_CONFIG_PATH)) {
26
+ console.log('⚠️ Claude Code configuration not found at ~/.claude.json');
27
+ console.log(' Please install Claude Code first: https://claude.ai/download');
28
+ console.log(' Then run: claude mcp add --scope user conversation-memory claude-conversation-memory-mcp');
29
+ return;
30
+ }
31
+
32
+ try {
33
+ // Read current configuration
34
+ const configContent = readFileSync(CLAUDE_CONFIG_PATH, 'utf-8');
35
+ const config = JSON.parse(configContent);
36
+
37
+ // Check if already configured
38
+ if (config.mcpServers && config.mcpServers[SERVER_NAME]) {
39
+ console.log('✓ conversation-memory MCP server is already configured');
40
+ console.log(' Current command:', config.mcpServers[SERVER_NAME].command);
41
+ return;
42
+ }
43
+
44
+ // Create backup
45
+ const backupPath = `${CLAUDE_CONFIG_PATH}.backup.${Date.now()}`;
46
+ copyFileSync(CLAUDE_CONFIG_PATH, backupPath);
47
+ console.log(`📋 Created backup: ${backupPath}`);
48
+
49
+ // Initialize mcpServers object if it doesn't exist
50
+ if (!config.mcpServers) {
51
+ config.mcpServers = {};
52
+ }
53
+
54
+ // Add our MCP server configuration
55
+ config.mcpServers[SERVER_NAME] = {
56
+ type: 'stdio',
57
+ command: 'claude-conversation-memory-mcp',
58
+ args: [],
59
+ env: {}
60
+ };
61
+
62
+ // Write updated configuration
63
+ writeFileSync(
64
+ CLAUDE_CONFIG_PATH,
65
+ JSON.stringify(config, null, 2),
66
+ 'utf-8'
67
+ );
68
+
69
+ console.log('✅ Successfully configured conversation-memory MCP server!');
70
+ console.log();
71
+ console.log('🎉 Setup complete! You can now use these tools in Claude Code:');
72
+ console.log(' • index_conversations - Index conversation history');
73
+ console.log(' • search_conversations - Search past conversations');
74
+ console.log(' • get_decisions - Find design decisions');
75
+ console.log(' • check_before_modify - Check file context before editing');
76
+ console.log(' • forget_by_topic - Selectively delete conversations');
77
+ console.log(' • and 10 more tools...');
78
+ console.log();
79
+ console.log('📚 Documentation: https://github.com/xiaolai/claude-conversation-memory-mcp');
80
+ console.log('🔍 List tools: /mcp (in Claude Code)');
81
+
82
+ } catch (error) {
83
+ console.error('❌ Failed to configure MCP server:', error.message);
84
+ console.log();
85
+ console.log('💡 Manual configuration:');
86
+ console.log(' Add this to ~/.claude.json under "mcpServers":');
87
+ console.log(' {');
88
+ console.log(' "conversation-memory": {');
89
+ console.log(' "type": "stdio",');
90
+ console.log(' "command": "claude-conversation-memory-mcp",');
91
+ console.log(' "args": []');
92
+ console.log(' }');
93
+ console.log(' }');
94
+ }
95
+ }
96
+
97
+ postInstall();