ai-setup 5 min read

AI Sessions – MCP Server for AI Coding Session History

Share and search AI coding sessions across Claude Code, Codex CLI, Gemini CLI, and opencode with this open-source MCP server.

By
Share: X in
AI Sessions product thumbnail

TL;DR

TL;DR: AI Sessions is an open-source MCP server that indexes and makes your Claude Code, Codex CLI, Gemini CLI, and opencode sessions searchable across any MCP-compatible client.

What Is AI Sessions?

AI Sessions is an open-source MCP server built by @yoavf that captures, stores, and retrieves coding sessions from major AI CLI agents. It lets you search past sessions, resume interrupted work, and share session transcripts with your team.

“An MCP server that makes sessions from Claude Code, OpenAI Codex, Gemini CLI and opencode available to any MCP compatible client.” — GitHub README

Key features (verified from README):

  • Search across all your AI coding sessions from multiple CLI agents
  • Works with Claude Code, OpenAI Codex, Gemini CLI, and opencode
  • Session replay and resume capability
  • MCP-compatible — works with any MCP client (Claude Desktop, Codex CLI, etc.)
  • Upload sessions to aisessions.dev for sharing
  • Also works as an MCP server endpoint

License: MIT (verified via GitHub API)

Setup Workflow

Prerequisites

  • Go 1.25 or later (for building from source)
  • One or more of: Claude Code, OpenAI Codex CLI, Gemini CLI, opencode
  • macOS, Linux, or Windows (Git Bash/WSL)

Step 1: Quick Install

Install the binary via the official installer script:

curl -fsSL https://aisessions.dev/install.sh | bash

This downloads the pre-built binary and installs it to ~/.aisessions/bin. Follow the on-screen instructions to add it to your PATH.

Custom install directory:

INSTALL_DIR=/custom/path curl -fsSL https://aisessions.dev/install.sh | bash

Step 2: Manual Download (Alternative)

Download pre-built binaries for your platform from the GitHub Releases page.

Step 3: Build from Source

If you prefer building from source:

git clone https://github.com/yoavf/ai-sessions-mcp.git
cd ai-sessions-mcp
go build -o bin/aisessions ./cmd/ai-sessions

Step 4: Configure Your MCP Client

Claude Code

claude mcp add ai-sessions ~/.aisessions/bin/aisessions

For custom install paths:

claude mcp add ai-sessions /path/to/aisessions

Codex CLI

Edit ~/.codex/config.toml:

[mcp_servers.ai_sessions]
command = "~/.aisessions/bin/aisessions"

Claude Desktop

Add to your Claude Desktop config file (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "ai-sessions": {
      "command": "~/.aisessions/bin/aisessions"
    }
  }
}

Step 5: Upload a Session

Authenticate and upload:

aisessions login
aisessions upload

Or visit aisessions.dev to upload transcript files (JSON or JSONL format) directly.

Deeper Analysis

What Problem Does It Solve?

AI coding agents are becoming primary development tools, but session history is typically locked inside each agent’s CLI. If you want to:

  • Find a solution you discovered three sessions ago
  • Share a debugging session with a teammate
  • Resume work that was interrupted
  • Learn from past agent decisions

…you’re mostly out of luck. Each agent stores sessions differently, if at all.

AI Sessions provides a unified session store and MCP interface, making any session searchable from any MCP-compatible client.

Architecture

The tool has two components:

  1. Local MCP server — runs on your machine, indexes sessions from configured AI agents
  2. Cloud upload/sharing — optional aisessions.dev service for sharing transcripts publicly

The MCP server itself is written in Go and acts as a bridge between local session data and any MCP-compatible AI client.

Comparison to Alternatives

| Feature | AI Sessions | Buildlog | Dexicon | |---|---|---|---| | Open source | Yes (MIT) | Yes | Yes | | MCP-native | Yes | No | No | | CLI agent support | Claude Code, Codex, Gemini CLI, opencode | Generic | Generic | | Cloud sharing | Yes | Yes | Yes | | Self-hostable | Partial | Yes | Unknown |

Practical Evaluation Checklist

  • [ ] Install script runs without errors on macOS/Linux
  • [ ] Binary is added to PATH correctly
  • [ ] aisessions login authenticates successfully
  • [ ] aisessions upload successfully uploads a session
  • [ ] Claude Code MCP connection works (claude mcp list shows ai-sessions)
  • [ ] Session search returns relevant results across agents
  • [ ] Uploaded session is accessible at aisessions.dev

Security Notes

  • The installer fetches a binary from GitHub Releases — verify the checksums if you’re security-conscious
  • Uploaded sessions are public by default on aisessions.dev — check what you’re sharing
  • The MCP server runs locally and accesses your local session files — review the source if you want to audit data access

FAQ

Q: Does it work with Claude Desktop (not Claude Code)? A: Yes. Add it to your Claude Desktop MCP config via Settings → Developer → Edit Config.

Q: Can I self-host the session storage? A: The local MCP server works fully offline. The cloud upload/sharing (aisessions.dev) is optional and not self-hostable currently.

Q: What session formats does it support? A: JSON and JSONL transcript files. The MCP server reads directly from the native session formats of supported CLI agents.

Q: Is the uploaded session data private? A: Sessions uploaded to aisessions.dev are public by default. Do not upload sessions containing secrets, credentials, or proprietary code.

Conclusion

AI Sessions solves a real problem as AI coding agents become primary development tools — session history is scattered across disconnected CLIs. The MCP server approach is elegant: instead of building another AI agent, it wraps existing ones with a standard interface.

The install process is straightforward, the MCP integration is clean, and the open-source MIT license means you can audit and modify it freely. If you use multiple AI coding agents and want unified session search, this is worth trying.

Source: github.com/yoavf/ai-sessions-mcp — MIT license, 28 stars, last pushed 2026-02-11

Source and Accuracy Notes