# claudex

claudex gives Claude Code memory that carries across sessions and lets it search earlier conversations. Use it to recover project context or revisit a past decision.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 97
- Author: kunwar-shah
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/kunwar-shah/claudex
- Updated: 2026-06-20
- HTML: https://affpapa.org/en/nevibecode/mcp/claudex

## What it does

claudex adds persistent memory for Claude Code. It can retain project conventions, architecture notes, decisions, and recurring error patterns, with priority, confidence, and an expiration period attached to stored items. The server also supports conversation search and retrieval, plus three MCP prompts for accessing session history.

SQLite FTS5 powers its search, and claudex scans `~/.claude/projects` to find conversations. You need Node.js 18+, npm, and Claude Code conversation history. Without saved history, there are no earlier sessions to search. Set `PROJECT_ROOT` when adding the server to provide project context.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `PROJECT_ROOT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env PROJECT_ROOT=<PROJECT_ROOT> --transport stdio claudex -- npx -y @kunwarshah/claudex
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add claudex --env PROJECT_ROOT=<PROJECT_ROOT> -- npx -y @kunwarshah/claudex
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "claudex": {
            "command": "npx",
            "args": [
                "-y",
                "@kunwarshah/claudex"
            ],
            "env": {
                "PROJECT_ROOT": "<PROJECT_ROOT>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "claudex": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@kunwarshah/claudex"
            ],
            "env": {
                "PROJECT_ROOT": "<PROJECT_ROOT>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e PROJECT_ROOT=<PROJECT_ROOT> claudex npx -y @kunwarshah/claudex
```
Replace <…> with your own values

## When to use it
- search past conversations by their content
- retain project conventions across sessions
- bring architecture decisions back into context
- record recurring errors for later sessions

## Example prompts
- Find the earlier conversation about this project.
- Save the project's agreed structure in memory.
- Gather context from recent sessions before I continue.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
