diff --git a/README.md b/README.md index 9e68ded3..349852db 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ Restart Claude Code. Context from previous sessions will automatically appear in - 📊 **Progressive Disclosure** - Layered memory retrieval with token cost visibility - 🔍 **Skill-Based Search** - Query your project history with mem-search skill (~2,250 token savings) - 🖥️ **Web Viewer UI** - Real-time memory stream at http://localhost:37777 +- 💻 **Claude Desktop Skill** - Search memory from Claude Desktop conversations - 🔒 **Privacy Control** - Use `` tags to exclude sensitive content from storage - ⚙️ **Context Configuration** - Fine-grained control over what context gets injected - 🤖 **Automatic Operation** - No manual intervention required @@ -108,7 +109,7 @@ npx mintlify dev - **[Architecture Evolution](https://docs.claude-mem.ai/architecture-evolution)** - The journey from v3 to v5 - **[Hooks Architecture](https://docs.claude-mem.ai/hooks-architecture)** - How Claude-Mem uses lifecycle hooks - **[Hooks Reference](https://docs.claude-mem.ai/architecture/hooks)** - 7 hook scripts explained -- **[Worker Service](https://docs.claude-mem.ai/architecture/worker-service)** - HTTP API & Bun process management +- **[Worker Service](https://docs.claude-mem.ai/architecture/worker-service)** - HTTP API & PM2 management - **[Database](https://docs.claude-mem.ai/architecture/database)** - SQLite schema & FTS5 search - **[Search Architecture](https://docs.claude-mem.ai/architecture/search-architecture)** - Hybrid search with Chroma vector database @@ -148,7 +149,7 @@ npx mintlify dev 1. **5 Lifecycle Hooks** - SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd (6 hook scripts) 2. **Smart Install** - Cached dependency checker (pre-hook script, not a lifecycle hook) -3. **Worker Service** - HTTP API on port 37777 with web viewer UI and 10 search endpoints, managed by Bun +3. **Worker Service** - HTTP API on port 37777 with web viewer UI and 10 search endpoints, managed by PM2 4. **SQLite Database** - Stores sessions, observations, summaries with FTS5 full-text search 5. **mem-search Skill** - Natural language queries with progressive disclosure (~2,250 token savings vs MCP) 6. **Chroma Vector Database** - Hybrid semantic + keyword search for intelligent context retrieval @@ -260,10 +261,10 @@ See [CHANGELOG.md](CHANGELOG.md) for complete version history. ## System Requirements -- **Bun**: 1.0 or higher (auto-installed on first run if missing) -- **Node.js**: 18.0.0 or higher (for build tools) +- **Node.js**: 18.0.0 or higher - **Claude Code**: Latest version with plugin support -- **SQLite 3**: For persistent storage (via bun:sqlite - zero native dependencies) +- **PM2**: Process manager (bundled - no global install required) +- **SQLite 3**: For persistent storage (bundled) --- diff --git a/desktop-skill/Skill.md b/desktop-skill/Skill.md new file mode 100644 index 00000000..40c8a098 --- /dev/null +++ b/desktop-skill/Skill.md @@ -0,0 +1,44 @@ +--- +name: mem-search +description: Search your persistent memory database from previous coding sessions. Use when asked about past work, decisions, bugs fixed, or development history. +--- + +## Overview + +Search your local memory database for past sessions, decisions, code changes, and development history. This skill uses the `mem-search` MCP server tools. + +## Available MCP tools + +Use these tools from the `mem-search` MCP server: + +| Tool | Description | +|------|-------------| +| `search` | Unified search across all memory types | +| `decisions` | Find architectural/design decisions | +| `changes` | Find code changes and refactorings | +| `timeline` | Get observations around a specific point in time | +| `find_by_file` | Find observations for specific files | +| `find_by_type` | Filter by type (decision, bugfix, feature, refactor, discovery, change) | +| `find_by_concept` | Find by concept tags | +| `how_it_works` | Understand system architecture and design patterns | + +## Common parameters + +- `query` - Natural language search query +- `limit` - Max results (1-100, default 20) +- `format` - `index` for titles only (recommended), `full` for complete content +- `type` - Filter: observations, sessions, or prompts +- `obs_type` - Filter observation type: decision, bugfix, feature, refactor, discovery, change + +## When to use + +- "Did we already solve this?" +- "How did we do X last time?" +- "Find the bug fix for..." +- "What decisions did we make about..." +- "Show me changes to [file]" +- "What work did we do on [project]?" + +## Setup requirement + +The `mem-search` MCP server must be configured in Claude Desktop settings. See MCP configuration docs. diff --git a/desktop-skill/mem-search.zip b/desktop-skill/mem-search.zip new file mode 100644 index 00000000..89573028 Binary files /dev/null and b/desktop-skill/mem-search.zip differ diff --git a/docs/public/docs.json b/docs/public/docs.json index 96ad53c1..7837d537 100644 --- a/docs/public/docs.json +++ b/docs/public/docs.json @@ -37,6 +37,7 @@ "installation", "usage/getting-started", "usage/search-tools", + "usage/claude-desktop", "usage/private-tags", "beta-features" ] diff --git a/docs/public/usage/claude-desktop.mdx b/docs/public/usage/claude-desktop.mdx new file mode 100644 index 00000000..c95e3d3d --- /dev/null +++ b/docs/public/usage/claude-desktop.mdx @@ -0,0 +1,169 @@ +--- +title: Claude Desktop Skill +description: Use claude-mem memory search in Claude Desktop with the mem-search skill +icon: desktop +--- + + +**Availability:** The mem-search skill works with Claude Desktop on macOS and Windows. + + +## Overview + +Claude Desktop can access your claude-mem memory database through the **mem-search** skill. This allows you to search past sessions, decisions, and observations directly from Claude Desktop conversations. + +## Prerequisites + +Before installing the skill, ensure: + +1. **claude-mem is installed** and the worker service is running +2. **MCP server is configured** in Claude Desktop (the skill uses the `mem-search` MCP server) + +### Verify Worker is Running + +```bash +curl http://localhost:37777/api/health +# Should return: {"status":"ok"} +``` + +## Installation + +### Step 1: Download the Skill + +Download the skill package from the repository: + + + Download the mem-search skill for Claude Desktop + + +Or build from source: + +```bash +cd desktop-skill +zip -r mem-search.zip Skill.md +``` + +### Step 2: Install in Claude Desktop + +1. Open **Claude Desktop** +2. Go to **Settings** (gear icon) +3. Navigate to **Skills** +4. Click **Install Skill** or drag the `mem-search.zip` file +5. Confirm installation + +### Step 3: Configure MCP Server + +The skill requires the `mem-search` MCP server. Add this to your Claude Desktop configuration: + + + + Edit `~/Library/Application Support/Claude/claude_desktop_config.json`: + + ```json + { + "mcpServers": { + "mem-search": { + "command": "node", + "args": [ + "/Users/YOUR_USERNAME/.claude/plugins/marketplaces/thedotmack/plugin/scripts/mcp-server.cjs" + ] + } + } + } + ``` + + + Edit `%APPDATA%\Claude\claude_desktop_config.json`: + + ```json + { + "mcpServers": { + "mem-search": { + "command": "node", + "args": [ + "C:\\Users\\YOUR_USERNAME\\.claude\\plugins\\marketplaces\\thedotmack\\plugin\\scripts\\mcp-server.cjs" + ] + } + } + } + ``` + + + + +Replace `YOUR_USERNAME` with your actual username. Restart Claude Desktop after editing the configuration. + + +### Step 4: Restart Claude Desktop + +Close and reopen Claude Desktop for the MCP server configuration to take effect. + +## Usage + +Once installed, the skill auto-activates when you ask about past work: + +``` +"What did we do last session?" +"Did we fix this bug before?" +"How did we implement authentication?" +"What decisions did we make about the API?" +"Show me changes to worker-service.ts" +``` + +## Available Search Tools + +The skill provides access to these MCP tools: + +| Tool | Description | +|------|-------------| +| `search` | Unified search across all memory types | +| `decisions` | Find architectural/design decisions | +| `changes` | Find code changes and refactorings | +| `timeline` | Get observations around a specific point in time | +| `find_by_file` | Find observations for specific files | +| `find_by_type` | Filter by type (decision, bugfix, feature, refactor, discovery, change) | +| `find_by_concept` | Find by concept tags | +| `how_it_works` | Understand system architecture and design patterns | + +## Troubleshooting + +### Skill Not Appearing + +1. Verify the zip file was properly installed +2. Check Claude Desktop's skill installation logs +3. Restart Claude Desktop + +### MCP Server Connection Failed + +1. Verify the worker is running: `curl http://localhost:37777/api/health` +2. Check the MCP server path in configuration +3. Look for errors in Claude Desktop logs + + + + ```bash + # View Claude Desktop logs + tail -f ~/Library/Logs/Claude/claude.log + ``` + + + Check `%APPDATA%\Claude\logs\` + + + +### Search Returns No Results + +1. Ensure claude-mem has recorded sessions (check http://localhost:37777) +2. Verify the database exists: `ls ~/.claude-mem/claude-mem.db` +3. Test the API directly: `curl "http://localhost:37777/api/search?query=test"` + +## Related + + + + Complete search API reference + + + Build custom integrations + +