Search and browse Claude Code conversation history across all your projects.
- Cross-project search — search sessions in any project, not just the current one
- Smart project resolution — use short names (
myapp), full paths, or*for all projects - Full-text search — AND-matching across sessions with snippet context
- Git integration — see commits made during a session
- System tag filtering — strips Claude Code internal tags from displayed content
| Tool | Description |
|---|---|
sessions_projects |
List all projects with session history |
sessions_list |
List recent sessions (by project) |
sessions_search |
Full-text search with snippets |
sessions_by_file |
Find sessions mentioning a file |
session_summary |
Session overview: dates, messages, files |
session_diff |
Git commits during a session |
session_messages |
Read raw messages from a session |
git clone https://github.com/yurich-ru/mcp-sessions.git
cd mcp-sessions
chmod +x setup.sh
./setup.shThe setup script will print the JSON config to add to your ~/.claude.json.
python3 -m venv venv
./venv/bin/pip install -r requirements.txtAdd to ~/.claude.json:
{
"mcpServers": {
"sessions": {
"type": "stdio",
"command": "/path/to/mcp-sessions/venv/bin/python",
"args": ["/path/to/mcp-sessions/server.py"]
}
}
}Restart Claude Code.
From Claude Code, the tools are available automatically:
- "Show my recent sessions" →
sessions_list - "Search our conversations about auth" →
sessions_search(query="auth") - "Find discussions about auth in project backend" →
sessions_search(query="auth", project="backend") - "Search all projects for deploy issues" →
sessions_search(query="deploy", project="*") - "What projects have session history?" →
sessions_projects
| Variable | Default | Description |
|---|---|---|
CLAUDE_SESSIONS_DIR |
~/.claude/projects |
Directory where Claude Code stores session files |
Claude Code stores conversation history as JSONL files in ~/.claude/projects/<project-name>/. Each project directory name is derived from the filesystem path (e.g., /home/user/myapp → -home-user-myapp).
This server reads those files and provides search/browse tools via the MCP protocol.
- Python 3.10+
mcppackage (installed automatically)- Claude Code (session files must exist in
~/.claude/projects/)