claude-session-manager-mcp
MCP server for managing Claude Code conversation sessions with GUI support.
Manage your Claude Code conversation history (~/.claude/projects) through MCP tools or a web-based GUI interface.
Features
π Session Management: List, rename, and delete conversation sessions
ποΈ Smart Cleanup: Automatically identify and clean empty or invalid sessions
π Web GUI: Beautiful web interface for browsing conversation history
π§ MCP Integration: Full MCP protocol support for Claude Code
π Easy Install: One-line installation with
uvx
Install
Usage
Claude Code MCP Integration
Add to Claude Code:
Or manually edit ~/.claude.json:
Web GUI
Launch the web interface:
The GUI will open at http://localhost:5050 with features:
Browse all projects and sessions
Search conversations
View full conversation history
Rename sessions with inline editing
Delete unwanted sessions
Bulk cleanup of empty sessions
MCP Tools
Tool | Description |
| List all Claude Code projects with session counts |
| List all sessions in a specific project |
| Add descriptive title prefix to session |
| Delete session (safely backed up to .bak) |
| Preview sessions that can be cleaned |
| Delete empty and invalid API key sessions |
| Launch web GUI and open in browser |
| Stop the web GUI server |
Examples
Via Claude Code
Via CLI
Project Structure
Development
How It Works
Session Detection: Scans
~/.claude/projects/for.jsonlfilesSmart Parsing: Extracts titles from first user message, removing IDE context tags
Safe Deletion: Moves deleted sessions to
.bakfolder for recoveryCleanup Logic: Identifies empty sessions and invalid API key errors
Web Server: Flask-based GUI with RESTful API
Requirements
Python 3.10+
Claude Code (for MCP integration)
Modern web browser (for GUI)
Contributing
Issues and pull requests are welcome at github.com/es6kr/claude-session-manager-mcp
License
MIT