mcp-sessions
mcp-sessions
Search and browse Claude Code conversation history across all your projects.
Features
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 projectsFull-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
Tools
Tool | Description |
| List all projects with session history |
| List recent sessions (by project) |
| Full-text search with snippets |
| Find sessions mentioning a file |
| Session overview: dates, messages, files |
| Git commits during a session |
| Read raw messages from a session |
Install
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.
Manual setup
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.
Usage examples
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
Environment variables
Variable | Default | Description |
|
| Directory where Claude Code stores session files |
How it works
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.
Requirements
Python 3.10+
mcppackage (installed automatically)Claude Code (session files must exist in
~/.claude/projects/)
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/Yurich-ru/mcp-sessions'
If you have feedback or need assistance with the MCP directory API, please join our Discord server