AI Sessions
About
Searching and access your AI coding sessions from Claude Code, Gemini CLI, opencode, and OpenAI Codex.
Details
- Author
- yoavf
- Categories
- Developer Tools, Knowledge Base, Search
Jump to
Setup
Install AI Sessions in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/yoavf/ai-sessions-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
An MCP server that makes sessions from Claude Code, OpenAI Codex, Gemini CLI, opencode, Mistral Vibe, and GitHub Copilot CLI available to any MCP-compatible client.
Allows AI agents to search, list, and read your previous local coding sessions from multiple CLI coding agents. Useful for:
- Finding past solutions to similar problems
- Reviewing what you worked on recently
- Learning from previous conversations
- Resuming interrupted work
Resuming a Claude Code session in Codex CLI.
macOS (Intel and Apple Silicon), Linux (amd64 and arm64, including WSL), and Windows amd64 (Git Bash):
curl -fsSL https://aisessions.dev/install.sh | bash
This installs the binary to~/.aisessions/bin. Follow the instructions to add it to your PATH.
curl -fsSL https://aisessions.dev/install.sh | INSTALL_DIR=/custom/path bash
Download pre-built binaries fromGitHub Releases.
go build -o bin/aisessions ./cmd/ai-sessions
After installation, configure your MCP client to use the binary:
claude mcp add --scope user --transport stdio ai-sessions -- ~/.aisessions/bin/aisessions
claude mcp add --scope user --transport stdio ai-sessions -- /path/to/aisessions
Verify the connection withclaude mcp get ai-sessions.
codex mcp add ai-sessions -- ~/.aisessions/bin/aisessions
Codex CLI and the ChatGPT desktop app share~/.codex/config.toml, so the server is available in both after you restart the desktop app. In ChatGPT, openSettings→MCP serversto check its status, or type/mcpin the composer.
For manual configuration, use an absolute path (the command is launched directly, without shell expansion):
[mcp_servers.ai_sessions] command = "/Users/YOUR_USERNAME/.aisessions/bin/aisessions"
ReplaceYOUR_USERNAMEwith your actual username, or use your custom install path.
Add to the config file opened fromSettings→Developer→Edit Config:
{ "mcpServers": { "ai-sessions": { "command": "/Users/YOUR_USERNAME/.aisessions/bin/aisessions" } } }
ReplaceYOUR_USERNAMEwith your actual username, or use your custom install path.
Restart Claude Desktop, then openDevelopersettings or+→Connectorsin a conversation to check the connection. Claude Desktop also supports packaged.mcpbextensions, but direct configuration remains useful for a standalone downloaded binary.
Theaisessionsbinary includes a CLI tool for uploading supported local agent transcripts toaisessions.devfor sharing.
Opens your browser to generate a CLI token. The token is saved locally in~/.aisessions/config.json.
Displays a searchable list of recent upload-compatible sessions from Claude Code, Codex, Gemini CLI, Mistral Vibe, and GitHub Copilot CLI. Use arrow keys to navigate and select a session to upload. opencode sessions remain available through the MCP server but are omitted from the upload picker because its current store is a shared SQLite database rather than one transcript file per session.
aisessions upload /path/to/session.jsonl aisessions upload /path/to/session.jsonl --title "Custom Title"
- --title <title>- Set a custom title for the uploaded transcript
- --url <url>- Override the API URL (https://aisessions.devor a local development server)
Once configured as an MCP server, you can ask:
- "Let's continue my latest session from Claude Code"
- "Show me my recent Codex sessions"
- "Search my sessions for authentication bugs"
- "How many times did Claude tell me I wasabsolutely rightyesterday?"
The server reads session files stored locally by various CLI coding agents:
- Claude Code:~/.claude/projects/[PROJECT_DIR]/.jsonl
- Gemini CLI:~/.gemini/tmp/[PROJECT_HASH]/chats/session-.jsonl(plus legacy.jsonrecordings)
- OpenAI Codex:~/.codex/sessions/and~/.codex/archived_sessions/
- opencode:~/.local/share/opencode/opencode.db(plus the legacystorage/JSON tree)
- Mistral Vibe:~/.vibe/logs/session/
- GitHub Copilot CLI:~/.copilot/session-state/[SESSION_ID]/events.jsonl(plus legacy flat JSONL files)
When you ask your AI agent to list or search sessions, the server reads these local stores through source-specific adapters; it does not launch the agent CLIs.
Shows which AI CLI source adapters are available from the running server.
Lists recent sessions from all projects (newest first).
- source(optional): Filter byclaude,gemini,codex,opencode,mistral, orcopilot
- project_path(optional): Filter by specific project directory
- limit(optional): Max results (default: 10)
Example:{"source": "claude", "limit": 20}
Searches session content using BM25 ranking. Returns results sorted by relevance score with contextual snippets.
- query(required): Search term (supports multiple keywords)
- source(optional): Filter by source
- project_path(optional): Filter by project
- limit(optional): Max results (default: 10)
Example:{"query": "authentication bug"}
- session: Session metadata (ID, source, project, timestamp)
- score: Relevance score (higher = more relevant)
- snippet: Contextual excerpt (~300 chars) showing where the match occurred
Retrieves full session content with pagination.
- session_id(required): Session ID from list results
- source(required): Which coding agent created it
- page(optional): Page number (default: 0)
- page_size(optional): Messages per page (default: 20)
To keep formatting consistent and catch regressions early:
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
An intelligent codebase search engine that transforms local codebases into a natural language queryable knowledge base.
A local MCP server for AI coding agents. AST-aware indexing, semantic search, and automatic compression. Your agent stops re-reading your entire codebase every session.
A server for code indexing, searching, and analysis, enabling LLMs to interact with code repositories.
Finds relevant code snippets, developer articles, and blog posts based on your queries.
Hosted MCP for 800+ pre-indexed OSS libs: real source, callers, usages, tests. 11 languages. No API key.
A Model Context Protocol (MCP) server that indexes your local Maven repository (~/.m2/repository) and Gradle cache ( ~/.gradle/caches/modules-2/files-2.1) to provide AI agents with tools to search for Java classes, method signatures, and source code.
Local stdio MCP server that lets AI coding agents read and maintain structured architecture, rules, and decisions directly from your repository.
Official Context7 MCP server that brings up-to-date, version-specific library documentation and code examples into AI coding prompts.
Remote, no-auth MCP server providing AI-powered codebase context and answers
Semantic code search for AI agents without indexing your codebase or storing any data. Fast and accurate.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




