claude-recall 0.8.7 → 0.8.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-recall",
3
- "version": "0.8.7",
3
+ "version": "0.8.8",
4
4
  "description": "Persistent memory for Claude Code with fire-and-forget PubNub architecture, automatic capture, failure learning, and project scoping via MCP server",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -6,50 +6,39 @@ const os = require('os');
6
6
 
7
7
  console.log('\nšŸš€ Setting up Claude Recall...\n');
8
8
 
9
- try {
10
- // Configure MCP server in ~/.claude.json
11
- const claudeConfigPath = path.join(os.homedir(), '.claude.json');
12
-
13
- // Read or create claude config
14
- let config = { mcpServers: {} };
15
- if (fs.existsSync(claudeConfigPath)) {
16
- const configContent = fs.readFileSync(claudeConfigPath, 'utf8');
17
- config = JSON.parse(configContent);
18
- if (!config.mcpServers) {
19
- config.mcpServers = {};
20
- }
21
- }
22
-
23
- // Check if claude-recall is already configured
24
- if (config.mcpServers['claude-recall']) {
25
- console.log('āš ļø Claude Recall is already configured in ~/.claude.json');
26
- console.log(' Updating configuration...');
27
- }
9
+ const { execSync } = require('child_process');
28
10
 
11
+ try {
29
12
  // Set up database location in user's home directory
30
13
  const dbDir = path.join(os.homedir(), '.claude-recall');
31
-
14
+
32
15
  // Create directory if it doesn't exist
33
16
  if (!fs.existsSync(dbDir)) {
34
17
  fs.mkdirSync(dbDir, { recursive: true });
35
18
  console.log(`šŸ“ Created database directory: ${dbDir}`);
36
19
  }
37
20
 
38
- // Add or update claude-recall configuration
39
- // Remove env variables since we're hardcoding the path to ~/.claude-recall/claude-recall.db
40
- config.mcpServers['claude-recall'] = {
41
- type: 'stdio',
42
- command: 'npx',
43
- args: ['claude-recall', 'mcp', 'start']
44
- };
45
-
46
- // Write back the config with proper formatting
47
- fs.writeFileSync(claudeConfigPath, JSON.stringify(config, null, 2));
21
+ // Register MCP server using official Claude CLI
22
+ try {
23
+ // Remove existing registration first (in case of update)
24
+ try {
25
+ execSync('claude mcp remove claude-recall', { stdio: 'ignore' });
26
+ } catch (e) {
27
+ // Ignore if not registered
28
+ }
48
29
 
49
- console.log('āœ… Successfully configured Claude Recall in ~/.claude.json');
30
+ // Register using official CLI
31
+ execSync('claude mcp add claude-recall -- npx claude-recall mcp start', {
32
+ stdio: 'inherit'
33
+ });
34
+ console.log('āœ… Registered Claude Recall MCP server');
35
+ } catch (mcpError) {
36
+ console.log('āš ļø Could not auto-register MCP server.');
37
+ console.log(' Please run manually:');
38
+ console.log(' claude mcp add claude-recall -- npx claude-recall mcp start');
39
+ }
50
40
 
51
41
  // Update project CLAUDE.md with minimal instructions
52
- const { execSync } = require('child_process');
53
42
  try {
54
43
  execSync('node ' + path.join(__dirname, 'postinstall-claude-md.js'), { stdio: 'inherit' });
55
44
  } catch (error) {