Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

kunwar-shah/claudex MCP server](https://glama.ai/mcp/servers/kunwar-shah/claudex/badges/score.svg)](https://glama.ai/mcp/servers/kunwar-shah/claudex) πŸ“‡ 🏠 🍎 πŸͺŸ 🐧 - Persistent memory + FTS5 full-text search for Claude Code conversation history.

README.md

<div align="center"> <img src="docs/logo-sm.png" alt="Claudex Logo" width="180">

Claudex

Professional conversation viewer and analysis tool for Claude Code

Category: Development Tools Β· Conversation Analysis Β· Usage Monitoring

Claudex is a full-stack web application designed for developers, QA engineers, and researchers who need to inspect, search, and analyze Claude Code conversation histories. Built with React and Fastify, it provides enterprise-grade full-text search using SQLite FTS5, universal template support for all Claude Code versions, and comprehensive analytics dashboards.

![Version](https://github.com/kunwar-shah/claudex/releases) ![License: MIT](https://github.com/kunwar-shah/claudex/blob/main/LICENSE) ![Documentation](https://kunwar-shah.github.io/claudex/) ![Discussions](https://github.com/kunwar-shah/claudex/discussions) ![Mentioned in Awesome Claude Code](https://github.com/hesreallyhim/awesome-claude-code)

πŸ“š Documentation | πŸ’¬ Discussions | πŸ› Issues

!Claudex β€” browse, search, and give Claude Code persistent memory. SQLite FTS5 full-text search across all sessions, MCP server with 10 tools, universal V1/V2/V3 template support.

</div>

---

πŸ†• What's New

Version 1.3.0 (February 12, 2026) β€” MCP Server

  • 🧠 MCP Server: Model Context Protocol server gives Claude Code persistent memory across sessions
  • πŸ”§ 10 MCP Tools: Project context, session search, conversation retrieval, structured memory CRUD
  • πŸ’Ύ Structured Memory System: Store coding knowledge (conventions, architecture, decisions, error patterns) with priority, confidence, and TTL
  • πŸ“‹ 3 MCP Prompts: /recall, /catchup, /history for quick access to past sessions
  • 🎯 Token Budgeting: Three detail levels (minimal/standard/full) for context management
  • πŸ“– One-Command Setup: claude mcp add --transport stdio claudex -- claudex-mcp

<details> <summary>Previous releases</summary>

Version 1.2.0 (November 11, 2025)

  • 🎨 Comprehensive Theming System: 10 professional themes (default, emerald, green, blue, purple, orange, red, rose, yellow, classic)
  • πŸ”€ Advanced Typography: 29 font families with visual preview
  • πŸ“ Granular Font Sizing: 5 precise font size options (14px-18px)
  • πŸ’Ύ Settings Persistence: All customizations saved to localStorage

Version 1.1.0 (October 27, 2025)

  • 🎯 Smart Title Extraction: Meaningful session titles from conversation content
  • πŸ“Š Tremor Analytics Dashboard: Tailwind-based charts and multi-scale visualizations
  • 🐳 Docker Multi-Platform: amd64 and arm64 with optimized ~200MB images
  • ⚑ Performance: 121x faster async search index rebuild

</details>

View full changelog | Troubleshooting guide

---

πŸ“Έ Screenshots

🎨 NEW in v1.2.0: Theming & Customization

<table> <tr> <td width="50%"> <img src="screenshots/v1.2.0/01-theme-selector.png" alt="10 Professional Themes" width="100%"> <p align="center"><strong>10 Professional Themes</strong><br/>Classic, Emerald, Blue, Purple, Orange, Red, Rose, Yellow, Green, Default</p> </td> <td width="50%"> <img src="screenshots/v1.2.0/02-font-family-preview.png" alt="29 Font Families" width="100%"> <p align="center"><strong>29 Font Families</strong><br/>Visual preview showing actual typefaces</p> </td> </tr> <tr> <td width="50%"> <img src="screenshots/v1.2.0/03-font-size-border-radius.png" alt="Font Size & Border Radius" width="100%"> <p align="center"><strong>Granular Font Sizing</strong><br/>5 precise options (14px-18px) + border radius control</p> </td> <td width="50%"> <img src="screenshots/v1.2.0/04-settings-tabs-soon-badges.png" alt="Settings Modal" width="100%"> <p align="center"><strong>Settings Modal</strong><br/>Appearance functional, more settings coming soon</p> </td> </tr> </table>

Conversation View

<img src="screenshots/conversation-view.png" alt="Conversation View" width="800">

Full-Text Search

<img src="screenshots/search-results.png" alt="Search Results" width="800">

✨ Features

  • MCP Server: Give Claude Code persistent memory β€” conventions, architecture, decisions, and error patterns survive across sessions
  • Structured Memory: Store and recall coding knowledge with priority (1-10), confidence, and TTL-based expiration
  • Auto Project Discovery: Automatically scans ~/.claude/projects directory to discover all conversations across multiple projects
  • Full-Text Search: Enterprise-grade SQLite FTS5 search engine with advanced filtering by project, session, role, date range, and content highlighting
  • Universal Template Support: Intelligent template detection and parsing for all Claude Code versions (V1.x, V2-mixed, V2.0+) with automatic format detection
  • Smart Content Rendering: Syntax-highlighted code blocks, markdown rendering, diff visualization, JSON formatting, and tool usage tracking
  • Session Analytics: Comprehensive analytics dashboard with message distribution charts, file operation tracking, and conversation statistics using Tremor React
  • Export Options: Export conversations to JSON (structured data), HTML (readable format), or plain TXT for archival and sharing
  • Modern UI: Responsive React interface with 10 themes, 29 fonts, session favorites, and optimized for developer workflows

---

πŸ’– Support This Project

Claudex is free and open source. If it saves you time and improves your workflow, please consider:

  • ⭐ Star the repo - Help others discover Claudex
  • πŸ› Report bugs - Your feedback makes us better
  • πŸ’‘ Share ideas - Request features in Discussions
  • β˜• Buy me a coffee - Support continued development

<div align="center">

![Ko-fi](https://ko-fi.com/kunwarshah) ![PayPal](https://paypal.me/kunwarJhamat) <!-- ![GitHub Sponsors](https://github.com/sponsors/kunwar-shah) -->

Every contribution helps keep this project alive and growing! πŸš€

</div>

---

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Claude Code installed with conversation history in ~/.claude/projects

Installation

Option 1: npm (Recommended)

# Global installation
npm install -g @kunwarshah/claudex [https://www.npmjs.com/package/@kunwarshah/claudex]

# Then run anywhere:
claudex

# Custom port (if 3400 is in use):
claudex --port 3500

# Custom project directory:
claudex --project-root ~/my-claude-projects

# Or use without installing (npx):
npx @kunwarshah/claudex

Add MCP Server (gives Claude Code persistent memory):

claude mcp add --transport stdio claudex -- claudex-mcp

See the MCP Server Guide for details.

CLI Options:

  • --help, -h: Show help message
  • --version, -v: Show version
  • --port, -p <port>: Custom server port (default: 3400)
  • --project-root <path>: Custom Claude projects directory

Environment Variables:

  • PORT: Server port (default: 3400)
  • PROJECT_ROOT: Claude projects directory (default: ~/.claude/projects)

Option 2: From Source

  1. Clone the repository:
git clone https://github.com/kunwar-shah/claudex.git
cd claudex
  1. Run system check (optional but recommended):
npm run check

This validates your environment and catches common setup issues.

  1. Install dependencies (or use auto-fix):
# Option 1: Manual installation
npm install
cd server && npm install && cd ..
cd client && npm install && cd ..

# Option 2: Auto-fix (installs deps + creates .env)
npm run check:fix
  1. Configure environment (if not using auto-fix):
cd server
cp .env.example .env
# Edit .env if needed (default: PROJECT_ROOT=~/.claude/projects)
cd ..
  1. Start the application:
# Automatically runs system check, then starts servers
npm run dev
  1. Open your browser: http://localhost:3000

The backend API runs on http://localhost:3400

System Checker

Claudex includes a comprehensive system checker that validates your environment:

# Quick check
npm run check

# Detailed output
npm run check:verbose

# Auto-fix common issues
npm run check:fix

# JSON output (for CI/CD)
npm run check:json

What it checks:

  • βœ… Node.js & npm versions
  • βœ… PROJECT_ROOT path & permissions
  • βœ… Port availability (3000, 3400)
  • βœ… Dependencies installation
  • βœ… Claude Code data (projects, sessions)
  • βœ… JSONL file validity
  • βœ… Database permissions
  • βœ… Search index status

Global CLI Installation (Optional)

Install globally to use claudex command anywhere:

./install.sh

# Then run from anywhere:
claudex

πŸ”§ Configuration

Server Configuration (.env)

# Path to Claude Code projects directory
# Supports ~ expansion (e.g., ~/.claude/projects)
PROJECT_ROOT=~/.claude/projects

# Server port
PORT=3400

# Environment
NODE_ENV=development

Default Ports

  • Frontend: http://localhost:3000 (Vite dev server)
  • Backend: http://localhost:3400 (Fastify API)
  • Frontend build: Uses port 3400 (served by backend in production)

πŸ“‚ Project Structure

claudex/
β”œβ”€β”€ server/                    # Backend (Node.js + Fastify)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ parsers/          # Template detection & message parsing
β”‚   β”‚   β”‚   β”œβ”€β”€ templateDetector.js    # V1/V2/V3 template detection
β”‚   β”‚   β”‚   └── messageParser.js       # Universal message parser
β”‚   β”‚   β”œβ”€β”€ services/         # Core business logic
β”‚   β”‚   β”‚   β”œβ”€β”€ fileScanner.js        # Project/session discovery
β”‚   β”‚   β”‚   β”œβ”€β”€ sessionParser.js      # Full session parsing
β”‚   β”‚   β”‚   β”œβ”€β”€ searchDatabase.js     # SQLite FTS5 search
β”‚   β”‚   β”‚   β”œβ”€β”€ searchIndexer.js      # Search index builder
β”‚   β”‚   β”‚   └── memoryService.js      # Structured memory CRUD
β”‚   β”‚   β”œβ”€β”€ mcp/              # MCP server (Claude Code integration)
β”‚   β”‚   β”‚   β”œβ”€β”€ index.js              # MCP entry point + stdio transport
β”‚   β”‚   β”‚   β”œβ”€β”€ tools.js              # 10 MCP tool handlers
β”‚   β”‚   β”‚   β”œβ”€β”€ resources.js          # MCP resources
β”‚   β”‚   β”‚   └── prompts.js            # 3 MCP prompts
β”‚   β”‚   β”œβ”€β”€ routes/           # API endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ projects.js           # Project/session routes
β”‚   β”‚   β”‚   β”œβ”€β”€ search.js             # Search routes
β”‚   β”‚   β”‚   └── export.js             # Export routes
β”‚   β”‚   β”œβ”€β”€ utils/            # Helper utilities
β”‚   β”‚   β”‚   └── pathHelper.js         # Path expansion (~/ support)
β”‚   β”‚   └── server.js         # Main server
β”‚   β”œβ”€β”€ data/                 # SQLite database (auto-created)
β”‚   β”œβ”€β”€ .env.example          # Environment template
β”‚   └── package.json
β”œβ”€β”€ client/                   # Frontend (React + Vite)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/       # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ ProjectSelector.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SessionList.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ConversationThread.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ MessageBubble.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ClaudeMessageRenderer.jsx
β”‚   β”‚   β”‚   └── SearchPage.jsx
β”‚   β”‚   β”œβ”€β”€ services/         # API client
β”‚   β”‚   β”‚   └── api.js
β”‚   β”‚   └── App.jsx           # Main app
β”‚   └── package.json
β”œβ”€β”€ bin/                      # CLI entry point
β”œβ”€β”€ test-search.sh           # Search API testing script
β”œβ”€β”€ install.sh               # Global CLI installer
β”œβ”€β”€ SETUP.md                 # Detailed setup guide
β”œβ”€β”€ README.md                # This file
└── package.json             # Root package (CLI + concurrently)

🎯 Supported Claude Code Formats

The viewer automatically detects and parses all Claude Code conversation formats:

V3 Template (Universal - Recommended)

  • Claude Code v2.0+: New format with role field directly
  • Claude Code v1.x: Original format with type field
  • Edge cases: Mixed formats and migration states
  • New message types: file-history-snapshot support
  • Role mapping: All system messages β†’ assistant (binary user/assistant classification)

Legacy Templates (Auto-detected)

  • V2-Mixed: Transition format between V1 and V2
  • V1: Original Claude Code format

The template detector uses a waterfall detection strategy, automatically selecting the best parser for your conversation files.

πŸ” Search System

Building the Search Index

The search index needs to be built before searching:

# Option 1: Via API
curl -X POST http://localhost:3400/api/search/index/build

# Option 2: Via test script
./test-search.sh

# Option 3: Via UI (Search page β†’ "Rebuild Index" button)

When to Rebuild Index

Rebuild the search index when:

  • First time setup
  • After template changes
  • When new conversations are added
  • If search results seem outdated

Search API Examples

# Basic search
curl -X POST http://localhost:3400/api/search \
  -H "Content-Type: application/json" \
  -d '{"q": "migration", "limit": 10}'

# Search with filters
curl -X POST http://localhost:3400/api/search \
  -H "Content-Type: application/json" \
  -d '{
    "q": "database",
    "projectId": "my-project",
    "role": "user",
    "limit": 20,
    "offset": 0
  }'

# Check index status
curl http://localhost:3400/api/search/index/status

πŸ“‘ API Endpoints

Projects & Sessions

| Endpoint | Method | Description | |----------|--------|-------------| | /api/projects | GET | List all projects | | /api/projects/:id/sessions | GET | Get sessions for project | | /api/projects/:id/sessions/:sessionId | GET | Get full session with messages |

Search

| Endpoint | Method | Description | |----------|--------|-------------| | /api/search | POST | Search conversations (FTS5) | | /api/search/index/build | POST | Build/rebuild search index | | /api/search/index/status | GET | Get index statistics | | /api/search/index/clear | POST | Clear search index |

Export

| Endpoint | Method | Description | |----------|--------|-------------| | /api/export/session/:projectId/:sessionId?format=json | GET | Export as JSON | | /api/export/session/:projectId/:sessionId?format=html | GET | Export as HTML | | /api/export/session/:projectId/:sessionId?format=txt | GET | Export as TXT |

Health

| Endpoint | Method | Description | |----------|--------|-------------| | /api/health | GET | Health check + system info |

πŸ› οΈ Development

Development Mode

# Run both frontend + backend with hot reload
npm run dev

# Or run separately:
# Terminal 1 - Backend (auto-restarts on changes)
cd server && npm run dev

# Terminal 2 - Frontend (hot module replacement)
cd client && npm run dev

Testing the Search System

# Run comprehensive search tests
./test-search.sh

This script will:

  1. Check server health
  2. Get index status
  3. Build/rebuild index
  4. Run test searches with various filters
  5. Display results

Adding New Templates

  1. Update Template Detector (server/src/parsers/templateDetector.js):
'my-template': {
  name: 'My Template Name',
  detect: (samples) => {
    return samples.some(s => s.myUniqueField !== undefined);
  },
  parser: 'my-template'
}
  1. Add Parser Method (server/src/parsers/messageParser.js):
parseMyTemplate(rawMessage) {
  return {
    id: rawMessage.id || this.generateId(),
    role: rawMessage.myRole === 'user' ? 'user' : 'assistant',
    content: rawMessage.myContent || '',
    timestamp: rawMessage.myTimestamp,
    // ... other fields
  };
}
  1. Rebuild Search Index: The new template will be automatically detected and used.

πŸ“ Scripts Reference

Claudex Directory

  • npm run dev - Run frontend + backend concurrently (with pre-check)
  • npm start - Run frontend + backend (production mode)
  • npm run check - Run system health check
  • npm run check:verbose - Run detailed system check
  • npm run check:fix - Auto-fix common setup issues
  • npm run check:json - JSON output for CI/CD
  • ./install.sh - Install as global CLI command
  • ./test-search.sh - Test search API endpoints

Server Directory

  • npm run dev - Run with nodemon (auto-restart)
  • npm start - Run in production mode

Client Directory

  • npm run dev - Vite dev server (http://localhost:3000)
  • npm run build - Build for production
  • npm run preview - Preview production build

πŸ› Troubleshooting

Quick Diagnosis

Run the system checker first to identify issues: ``bash npm run check:verbose ``

This will check all common problems and provide actionable suggestions.

Common Issues

"No messages found" Despite Messages Existing

Fixed in v1.1.1 - If you see intermittent empty sessions or duplicate key warnings: ```bash

Update to latest version

cd claude-viewer git pull origin main npm install && cd server && npm install && cd ../client && npm install && cd .. npm run dev ``` See detailed troubleshooting guide for more information.

No Projects Found

# Check what the system sees
npm run check

# Verify path
cat server/.env | grep PROJECT_ROOT
  • Verify PROJECT_ROOT in .env points to ~/.claude/projects
  • Check that Claude Code has created conversation files
  • Run npm run check:fix to auto-create missing directories

Search Not Working

# Quick fix via UI
# Visit http://localhost:3000/search β†’ Click "Rebuild Index"

# Or via command line
curl -X POST http://localhost:3400/api/search/index/build

Port Conflicts

# System checker will detect port conflicts
npm run check

# Auto-detected ports in use show PID
# Kill process: kill <PID>
# Or change PORT in server/.env

Permission Errors

# Check permissions
npm run check:verbose

# Fix permissions
chmod +r ~/.claude/projects
chmod +w claude-viewer/server/data

Dependencies Issues

# Auto-install all dependencies
npm run check:fix

🚒 Production Deployment

Using Docker (Recommended)

Claudex includes production-ready Docker configuration with multi-stage builds for optimal image size.

Quick Start with Docker

# Build and start with docker-compose
docker-compose up -d

# View logs
docker-compose logs -f

# Stop
docker-compose down

Access at: http://localhost:3400

Docker Configuration

The default docker-compose.yml mounts your Claude projects directory as read-only:

volumes:
  # Adjust path to match your system
  - ~/.claude/projects:/root/.claude/projects:ro

Common path configurations:

# Linux/macOS
~/.claude/projects:/root/.claude/projects:ro

# Windows (WSL2)
/mnt/c/Users/YourName/.claude/projects:/root/.claude/projects:ro

# Custom path
/path/to/your/projects:/root/.claude/projects:ro

Docker Commands

# Build image manually
docker build -t claudex:latest .

# Run container manually
docker run -d \
  -p 3400:3400 \
  -v ~/.claude/projects:/root/.claude/projects:ro \
  -v claudex-data:/app/data \
  --name claudex-web \
  claudex:latest

# Check health
docker ps  # Check STATUS column for "healthy"

# View logs
docker logs claudex-web -f

# Stop and remove
docker stop claudex-web && docker rm claudex-web

Docker Features

  • Multi-stage build: Optimized image size (~200MB)
  • Non-root user: Runs as nodejs user for security
  • Health checks: Automatic health monitoring
  • Persistent volumes: Stores search index and logs
  • Read-only mounts: Claude projects mounted read-only for safety
  • Log rotation: JSON logs with 10MB max size, 3 file rotation

Docker Environment Variables

# Override in docker-compose.yml or docker run
-e PORT=3400                           # Server port
-e HOST=0.0.0.0                        # Bind address
-e NODE_ENV=production                 # Environment
-e PROJECT_ROOT=/root/.claude/projects # Claude projects path

Manual Production Build

For non-Docker deployments:

# 1. Install dependencies
npm run install-deps

# 2. Build client
npm run build

# 3. Start server (serves built client)
cd server && NODE_ENV=production npm start

Access at: http://localhost:3400

πŸ“‹ Roadmap

  • [x] SQLite FTS5 full-text search
  • [x] Universal template support (V1/V2/V3)
  • [x] Export to JSON/HTML/TXT
  • [x] Docker deployment (v1.1.0)
  • [x] Conversation analytics dashboard (v1.1.0)
  • [x] Theming system β€” 10 themes, 29 fonts (v1.2.0)
  • [x] Session favorites/bookmarking (v1.2.4)
  • [x] MCP server for Claude Code (v1.3.0)
  • [x] Structured memory system (v1.3.0)
  • [ ] Token cost calculator
  • [ ] WebSocket live updates
  • [ ] Plugin system for custom parsers

---

πŸ“„ License

MIT License - see LICENSE file for details.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“š Additional Documentation

  • SETUP.md - Detailed setup and configuration guide
  • INSTALL.md - Legacy installation instructions

πŸ’‘ Tips

  • Use the search page to find conversations across all projects
  • Export conversations to share with team members
  • Rebuild search index after adding new conversations
  • Check /api/health endpoint to verify system status
  • Use npm run dev for the best development experience with hot reload

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Databases servers.