# ai-session-search [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/ahundt/ai-session-search  
**GitHub Stars:** 81  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ai-session-search

## Description
Ultra-fast rust-powered AI agent session search and analysis. Search millions of messages in under a second. Claude Code, Claude Desktop, Codex, Cursor, Antigravity, Pi, Google AI Studio, and Gemini CLI. One Rust core behind the aise CLI, an MCP server, a Rust library, and a Python API.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "ai-session-search": {
    "command": "uvx",
    "args": ["--from","ai-session-search","aise"]
  }
}
```

## Documentation

## What ai-session-search does

ai-session-search provides an MCP interface for searching local AI coding-agent history. It uses one index across transcripts from Claude Code, Claude Desktop local agent, Codex, Cursor, Antigravity, Pi, Prime Agent, Google AI Studio, and Gemini CLI. The same indexed data is also available through the `aise` command-line tool, Rust library, and Python API.

The indexed records can help locate an earlier prompt, inspect the messages around a failure, recover versions of a file, identify why an agent stopped or became blocked, and find work performed by subagents. Session-level searches, message searches, file history, exports, analysis, and explicit reindexing are available through the CLI; MCP focuses on querying the index and returning context to the connected client.

## How it works

The MCP process is started with `aise mcp serve` and communicates with a client over stdio. Installation can register it with detected agent harnesses through `aise integrations install`. The installer writes the configuration and, for some harnesses, additional guidance or skills in the locations those harnesses use. A `--client` option limits installation to selected harnesses, and `--dry-run` previews changes.

Searches use a shared local index that can refresh when a query runs. Use the `--index-refresh existing-only` behavior when the client should read the existing SQLite index without refreshing it. The server can report index status and effective paths, while `aise doctor` helps inspect index health and parsing warnings outside the MCP interface.

The MCP tools use closed input schemas, so misspelled fields fail with the relevant argument path. Large message searches can be paged by using a result limit and following the returned next offset. Session and message results preserve provenance information useful when sender attribution is uncertain.

## Setup and configuration

Install the executable with either of these approaches:

```bash
uv tool install ai-session-search
```

or:

```bash
cargo install ai-session-search --locked
```

Then register the MCP server with detected harnesses:

```bash
aise integrations install
```

Use `aise integrations status` to inspect registrations. The direct server command is:

```bash
aise mcp serve
```

The project supports macOS, Linux, and Windows. Installation rollback preserves a recovery receipt and prints an `aise integrations recover` command if cleanup cannot complete automatically.

## Tools and capabilities

The MCP interface exposes:

- `search_sessions` for finding relevant sessions.
- `search_messages` for searching individual messages with filters such as session, role, and result limits.
- `list_sessions` for listing sessions by criteria such as project path, time window, or session kind.
- `get_session` for reading a session and surrounding context.
- `get_resume_command` for obtaining a command to continue a prior session.
- `get_index_status` for checking index state.
- `run_skill_capability` for invoking an indexed skill capability.
- `query_session_index` for read-only SQL queries.

Indexed content can include human input, generated text, tool-related records, file mentions, attachments, memory, plans, harness notices, and file history, depending on the source format. Harness notices are searchable with the appropriate kind filter. Subagent sessions can be listed separately and narrowed to the children of a parent session.

Outside MCP, `aise` supports file extraction, file-version history, Markdown export, interactive browsing, correction searches, repeat reports, and explicit reindexing. File recovery writes to a `.recovered` sibling when using the restore flow rather than overwriting the existing file.

## Limitations and notes

The index is built from local transcripts, so results depend on the records available from each supported harness. Some older Claude Code entries may lack sender attribution; those rows are excluded from default correction-oriented results unless unattributed input is explicitly included. Parsing warnings can occur for unrecognized record types, malformed attachments, or skipped binary payloads.

Correction categories are a small fixed starter set and may not match every way a correction was phrased. For broad investigation, search the recorded input and read matching messages with context. A query can write index state while refreshing; use existing-only mode when read-only access to the current index is required.

_Full upstream README: https://allmcps.com/mcp/ai-session-search/readme_

