ClaudeX
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.
๐ Documentation | ๐ฌ Discussions | ๐ Issues

๐ 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,/historyfor 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
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
View full changelog | Troubleshooting guide
๐ธ Screenshots
๐จ NEW in v1.2.0: Theming & Customization
Conversation View
Full-Text Search
โจ 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/projectsdirectory to discover all conversations across multiple projectsFull-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
Every contribution helps keep this project alive and growing! ๐
๐ 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/claudexAdd MCP Server (gives Claude Code persistent memory):
claude mcp add --transport stdio claudex -- claudex-mcpSee 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
Clone the repository:
git clone https://github.com/kunwar-shah/claudex.git
cd claudexRun system check (optional but recommended):
npm run checkThis validates your environment and catches common setup issues.
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:fixConfigure environment (if not using auto-fix):
cd server
cp .env.example .env
# Edit .env if needed (default: PROJECT_ROOT=~/.claude/projects)
cd ..Start the application:
# Automatically runs system check, then starts servers
npm run devOpen 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:jsonWhat 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=developmentDefault 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
rolefield directlyClaude Code v1.x: Original format with
typefieldEdge cases: Mixed formats and migration states
New message types:
file-history-snapshotsupportRole 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 |
| GET | List all projects |
| GET | Get sessions for project |
| GET | Get full session with messages |
Search
Endpoint | Method | Description |
| POST | Search conversations (FTS5) |
| POST | Build/rebuild search index |
| GET | Get index statistics |
| POST | Clear search index |
Export
Endpoint | Method | Description |
| GET | Export as JSON |
| GET | Export as HTML |
| GET | Export as TXT |
Health
Endpoint | Method | Description |
| 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 devTesting the Search System
# Run comprehensive search tests
./test-search.shThis script will:
Check server health
Get index status
Build/rebuild index
Run test searches with various filters
Display results
Adding New Templates
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'
}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
};
}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 checknpm run check:verbose- Run detailed system checknpm run check:fix- Auto-fix common setup issuesnpm 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 productionnpm run preview- Preview production build
๐ Troubleshooting
Quick Diagnosis
Run the system checker first to identify issues:
npm run check:verboseThis 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:
# Update to latest version
cd claude-viewer
git pull origin main
npm install && cd server && npm install && cd ../client && npm install && cd ..
npm run devSee detailed troubleshooting guide for more information.
No Projects Found
# Check what the system sees
npm run check
# Verify path
cat server/.env | grep PROJECT_ROOTVerify
PROJECT_ROOTin.envpoints to~/.claude/projectsCheck that Claude Code has created conversation files
Run
npm run check:fixto 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/buildPort 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/.envPermission Errors
# Check permissions
npm run check:verbose
# Fix permissions
chmod +r ~/.claude/projects
chmod +w claude-viewer/server/dataDependencies 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 downAccess 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:roCommon 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:roDocker 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-webDocker 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 pathManual 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 startAccess at: http://localhost:3400
๐ Roadmap
SQLite FTS5 full-text search
Universal template support (V1/V2/V3)
Export to JSON/HTML/TXT
Docker deployment (v1.1.0)
Conversation analytics dashboard (v1.1.0)
Theming system โ 10 themes, 29 fonts (v1.2.0)
Session favorites/bookmarking (v1.2.4)
MCP server for Claude Code (v1.3.0)
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
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureCommit changes:
git commit -m 'Add amazing feature'Push to branch:
git push origin feature/amazing-featureOpen 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/healthendpoint to verify system statusUse
npm run devfor the best development experience with hot reload
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kunwar-shah/claudex'
If you have feedback or need assistance with the MCP directory API, please join our Discord server