Skip to content

AI Sessions MCP

MCP server for searching and accessing your AI coding sessions from Claude Code, Gemini CLI, opencode, and OpenAI Codex. Also an uploader for aisessions.dev

Install

$claude mcp add --scope user --transport stdio ai-sessions -- ~/.aisessions/bin/aisessions

Install command taken from the project's README or registry entry. Always review code before running it.

AI Sessions MCP Server

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.

Mostly written using Claude Code.

What It Does

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

Demo

Resuming a Claude Code session in Codex CLI.

Installation

Quick Install

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.

Custom installation directory:

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

Manual Download

Download pre-built binaries from GitHub Releases.

Build from Source

Prerequisites: Go 1.25.13 or later

go build -o bin/aisessions ./cmd/ai-sessions

Setup

After installation, configure your MCP client to use the binary:

Claude Code CLI

claude mcp add --scope user --transport stdio ai-sessions -- ~/.aisessions/bin/aisessions

Or if using a custom install location:

claude mcp add --scope user --transport stdio ai-sessions -- /path/to/aisessions

Verify the connection with claude mcp get ai-sessions.

Codex CLI and ChatGPT desktop app

Add the server from the CLI:

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, open Settings → MCP servers to check its status, or type /mcp in 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"

Replace YOUR_USERNAME with your actual username, or use your custom install path.

Claude Desktop

Add to the config file opened from Settings → Developer → Edit Config:

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

Replace YOUR_USERNAME with your actual username, or use your custom install path.

Restart Claude Desktop, then open Developer settings or + → Connectors in a conversation to check the connection. Claude Desktop also supports packaged .mcpb extensions, but direct configuration remains useful for a standalone downloaded binary.

CLI Upload

The aisessions binary includes a CLI tool for uploading supported local agent transcripts to aisessions.dev for sharing.

Authentication

aisessions login

Opens your browser to generate a CLI token. The token is saved locally in ~/.aisessions/config.json.

Uploading Sessions

Interactive mode (no file argument):

aisessions upload

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Explore related