Claudex

io.github.kunwar-shah由 GitHub 帳號 kunwar-shah 發布v1.3.4更新於 Nov 3, 2026

Persistent memory + FTS5 search MCP server for Claude Code conversation history.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

為 Claude Code 提供持久記憶,並讓助理檢索本機保存之歷史對話記錄的 MCP 伺服器。

可以做什麼
  • 跨專案回想專案脈絡與過往工作階段
  • 依專案、工作階段、角色、日期等條件全文搜尋對話歷史
  • 讀取完整工作階段與訊息內容
  • 新增、讀取、更新與刪除結構化記憶項目(慣例、架構、決策、錯誤模式),支援優先順序、信心度與有效期限
  • 提供回想、進度補課、歷史回顧等內建提示詞
  • 以最小、標準、完整三種詳細程度控制脈絡用量以節省 token
適用情境
希望 Claude Code 在不同工作階段之間記住程式慣例、架構決策與先前的討論,或需要查詢某個專案過去談過什麼時適用。適合已在本機保留 Claude Code 對話歷史、並想讓助理直接檢索這些紀錄的開發者。
執行需求
以本機 stdio 程序執行,透過 npm 套件安裝,需要 Node.js 18+ 與 npm。需要本機已有 Claude Code 對話歷史,目錄由環境變數 PROJECT_ROOT 指定(預設為 ~/.claude/projects)。未宣告任何驗證機制或 API 金鑰。
安裝前請注意
伺服器會讀取 Claude Code 對話紀錄,其中可能包含原始碼、提示詞等敏感內容,並在本機建立 SQLite 搜尋索引。記憶類工具可新增、修改與刪除記憶項目,變更會跨工作階段保留。請只將 PROJECT_ROOT 指向你願意讓助理存取的目錄。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Claudex,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Claudex Logo]

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] [License: MIT] [Documentation] [Discussions] [Mentioned in 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.]


🆕 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
Previous releases

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

[10 Professional Themes]

10 Professional Themes
Classic, Emerald, Blue, Purple, Orange, Red, Rose, Yellow, Green, Default

[29 Font Families]

29 Font Families
Visual preview showing actual typefaces

[Font Size & Border Radius]

Granular Font Sizing
5 precise options (14px-18px) + border radius control

[Settings Modal]

Settings Modal
Appearance functional, more settings coming soon

Conversation View

[Conversation View]

Full-Text Search

[Search Results]

✨ 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

[Ko-fi] [PayPal]

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)
bash
# Global installationnpm 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):

bash
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:
bash
git clone https://github.com/kunwar-shah/claudex.gitcd claudex
  1. Run system check (optional but recommended):
bash
npm run check

This validates your environment and catches common setup issues.

  1. Install dependencies (or use auto-fix):
bash
# Option 1: Manual installationnpm installcd 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):
bash
cd servercp .env.example .env# Edit .env if needed (default: PROJECT_ROOT=~/.claude/projects)cd ..
  1. Start the application:
bash
# Automatically runs system check, then starts serversnpm 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:

bash
# Quick checknpm run check
# Detailed outputnpm run check:verbose
# Auto-fix common issuesnpm 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:

bash
./install.sh
# Then run from anywhere:claudex

🔧 Configuration

Server Configuration (.env)

env
# Path to Claude Code projects directory# Supports ~ expansion (e.g., ~/.claude/projects)PROJECT_ROOT=~/.claude/projects
# Server portPORT=3400
# EnvironmentNODE_ENV=development

Default Ports

📂 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:

bash
# Option 1: Via APIcurl -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

bash
# Basic searchcurl -X POST http://localhost:3400/api/search \  -H "Content-Type: application/json" \  -d '{"q": "migration", "limit": 10}'
# Search with filterscurl -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 statuscurl http://localhost:3400/api/search/index/status

📡 API Endpoints

Projects & Sessions

EndpointMethodDescription
/api/projectsGETList all projects
/api/projects/:id/sessionsGETGet sessions for project
/api/projects/:id/sessions/:sessionIdGETGet full session with messages

Search

EndpointMethodDescription
/api/searchPOSTSearch conversations (FTS5)
/api/search/index/buildPOSTBuild/rebuild search index
/api/search/index/statusGETGet index statistics
/api/search/index/clearPOSTClear search index

Export

EndpointMethodDescription
/api/export/session/:projectId/:sessionId?format=jsonGETExport as JSON
/api/export/session/:projectId/:sessionId?format=htmlGETExport as HTML
/api/export/session/:projectId/:sessionId?format=txtGETExport as TXT

Health

EndpointMethodDescription
/api/healthGETHealth check + system info

🛠️ Development

Development Mode

bash
# Run both frontend + backend with hot reloadnpm 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

bash
# 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):
javascript
'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):
javascript
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 versioncd claude-viewergit pull origin mainnpm install && cd server && npm install && cd ../client && npm install && cd ..npm run dev

See detailed troubleshooting guide for more information.

No Projects Found
bash
# Check what the system seesnpm run check
# Verify pathcat 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
bash
# Quick fix via UI# Visit http://localhost:3000/search → Click "Rebuild Index"
# Or via command linecurl -X POST http://localhost:3400/api/search/index/build
Port Conflicts
bash
# System checker will detect port conflictsnpm run check
# Auto-detected ports in use show PID# Kill process: kill <PID># Or change PORT in server/.env
Permission Errors
bash
# Check permissionsnpm run check:verbose
# Fix permissionschmod +r ~/.claude/projectschmod +w claude-viewer/server/data
Dependencies Issues
bash
# Auto-install all dependenciesnpm 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
bash
# Build and start with docker-composedocker-compose up -d
# View logsdocker-compose logs -f
# Stopdocker-compose down

Access at: http://localhost:3400

Docker Configuration

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

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

Common path configurations:

bash
# 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
bash
# Build image manuallydocker build -t claudex:latest .
# Run container manuallydocker run -d \  -p 3400:3400 \  -v ~/.claude/projects:/root/.claude/projects:ro \  -v claudex-data:/app/data \  --name claudex-web \  claudex:latest
# Check healthdocker ps  # Check STATUS column for "healthy"
# View logsdocker logs claudex-web -f
# Stop and removedocker 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
bash
# 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:

bash
# 1. Install dependenciesnpm run install-deps
# 2. Build clientnpm run build
# 3. Start server (serves built client)cd server && NODE_ENV=production npm start

Access 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

  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

來源:README.md,提交 8458466

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.3.4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分