kiro-total-recall
Enables semantic search across all Kiro conversations (CLI and IDE), allowing the AI to recall past discussions, decisions, and user preferences.
README
Kiro Total Recall
Ever told Kiro "like we discussed yesterday" only to realize... it has no idea?
Total Recall gives Kiro the memory it's missing.
The Problem
- Sessions Are Isolated: Each Kiro session starts fresh. Yesterday's architecture discussion? Gone.
- Projects Don't Share Knowledge: Your preferences (testing style, package managers, patterns) aren't remembered across projects.
- CLI and IDE Are Separate: Conversations in Kiro CLI don't connect to Kiro IDE.
Total Recall indexes every Kiro conversation and provides semantic search. Find discussions by meaning, not just keywords.
Quickstart
As a Kiro Power (Recommended, IDE only)
- In Kiro IDE: Powers panel → Add power from GitHub
- Enter:
https://github.com/danilop/kiro-total-recall - The power activates automatically when you mention "recall", "remember", or "past conversation"
Manual MCP Setup (CLI and IDE)
Add to ~/.kiro/settings/mcp.json (this config is shared by both CLI and IDE):
{
"mcpServers": {
"total-recall": {
"command": "uvx",
"args": ["--from", "git+https://github.com/danilop/kiro-total-recall", "kiro-total-recall"]
}
}
}
Restart Kiro CLI/IDE after adding. MCP servers are only loaded at startup.
Verify Installation
In Kiro CLI: /mcp should list total-recall
In Kiro IDE: Check the MCP Servers panel
How It Works
┌─────────────────────────────────────────────────────────────────────────┐
│ Kiro CLI & IDE │
│ ┌──────────────────────────┐ ┌──────────────────────────────────┐ │
│ │ CLI: SQLite DB │ │ IDE: .chat JSON files │ │
│ │ ~/Library/App Support/ │ │ ~/Library/App Support/Kiro/ │ │
│ │ kiro-cli/data.sqlite3 │ │ User/globalStorage/.../*.chat │ │
│ └────────────┬─────────────┘ └─────────────┬────────────────────┘ │
│ └────────────────┬───────────────┘ │
│ ▼ │
│ ┌───────────────────────┐ │
│ │ Unified Loader │ │
│ └───────────┬───────────┘ │
└────────────────────────────────┼────────────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ Kiro Total Recall │
│ ┌─────────┐ ┌──────────┐ ┌─────────┐ ┌────────────────────┐ │
│ │ loader │───▶│ indexer │───▶│ query │───▶│ MCP server │ │
│ │ CLI+IDE │ │ 384-dim │ │ cosine │ │ 4 search tools │ │
│ └─────────┘ └────┬─────┘ └─────────┘ └────────────────────┘ │
│ ▼ │
│ ~/.cache/kiro-total-recall/embeddings.pkl │
└─────────────────────────────────────────────────────────────────────────┘
The Index: Making Search Fast
On first search, Total Recall:
- Loads all messages from CLI (SQLite) and IDE (.chat files)
- Embeds each message using all-MiniLM-L6-v2 (384-dimensional vectors)
- Caches embeddings to
~/.cache/kiro-total-recall/embeddings.pkl
Subsequent searches are fast because:
- Fingerprinting: Only rebuilds when conversations change
- Incremental updates: New messages get embedded; existing embeddings loaded from cache
- Hash-based deduplication: Same text = same embedding (no recomputation)
Features
- Semantic Search: Find by meaning, not just keywords
- Dual Source: Searches both CLI and IDE conversations
- Context Windows: See surrounding messages for each match
- Date Filtering: Filter by time range (ISO 8601)
- Incremental Indexing: Only processes new conversations
- Memory Limits: Configurable RAM usage (default: 1/3 of RAM)
MCP Tools
| Tool | Scope | Use Case |
|---|---|---|
search_project_history |
Current workspace | Bugs, decisions in this codebase |
search_global_history |
All workspaces | Preferences, patterns across all work |
search_cli_history |
CLI only | Kiro CLI conversations |
search_ide_history |
IDE only | Kiro IDE conversations |
Parameters
All tools accept:
| Parameter | Default | Description |
|---|---|---|
query |
required | Keywords or sentence to search |
after |
none | Filter to messages on/after this date (inclusive). ISO 8601 format. |
before |
none | Filter to messages before this date (exclusive). ISO 8601 format. |
context_size |
3 | Messages before AND after each match |
threshold |
0.2 | Minimum similarity (0-1, higher = stricter) |
max_results |
10 | Maximum results to return |
offset |
0 | Skip results (for pagination) |
Date Filtering Examples
# Messages from a specific day
search_project_history(query="auth bug", after="2025-01-15", before="2025-01-16")
# Messages from the past week
search_project_history(query="refactoring", after="2025-01-25")
# Messages in January
search_project_history(query="database", after="2025-01-01", before="2025-02-01")
Response Structure
{
"results": [
{
"matched_message": {
"role": "assistant",
"content": "To fix the authentication bug...",
"timestamp": "2025-01-15T10:30:00",
"workspace": "/Users/dev/myproject",
"session_id": "abc123",
"uuid": "msg-456",
"source": "cli"
},
"score": 0.8542,
"context": [
{"role": "user", "content": "How do I fix this auth bug?", "timestamp": "...", "is_match": false},
{"role": "assistant", "content": "To fix the authentication bug...", "timestamp": "...", "is_match": true}
]
}
],
"query": "authentication bug fix",
"total_matches": 25,
"offset": 0,
"has_more": true,
"hint": "Showing 1-10 of 25 matches. Use offset: 10 for more."
}
Usage Examples
Just ask naturally:
"How did we fix that auth bug?"
"What did we discuss about the database schema?"
"What's my usual approach to error handling?"
"Find our React component discussions from last week"
Or use tools directly:
search_project_history(query="authentication bug fix")
search_global_history(query="React component patterns")
search_cli_history(query="deployment", after="2025-01-01")
Configuration
Create ~/.config/kiro-total-recall/config.toml to customize:
[sources.cli]
enabled = true
paths = [
"~/Library/Application Support/kiro-cli/data.sqlite3",
"~/.local/share/kiro-cli/data.sqlite3",
"~/AppData/Roaming/kiro-cli/data.sqlite3",
]
[sources.ide]
enabled = true
patterns = [
"~/Library/Application Support/Kiro/User/globalStorage/kiro.kiroagent/*/*.chat",
"~/.config/Kiro/User/globalStorage/kiro.kiroagent/*/*.chat",
"~/AppData/Roaming/Kiro/User/globalStorage/kiro.kiroagent/*/*.chat",
]
[embedding]
model = "all-MiniLM-L6-v2"
cache_dir = "~/.cache/kiro-total-recall"
[search]
default_threshold = 0.2
default_max_results = 10
default_context_window = 3
[memory]
fraction = 0.33 # Use 1/3 of RAM
# limit_mb = 512 # Or set explicit limit
Memory Management
Total Recall limits in-memory index size to prevent excessive memory usage. By default, it uses 1/3 of physical RAM. When the limit is reached, the oldest sessions are excluded from the index (newest sessions are kept).
| Variable | Description | Default |
|---|---|---|
KIRO_RECALL_MEMORY_LIMIT_MB |
Override memory limit in MB | 1/3 of RAM |
KIRO_RECALL_NO_MEMORY_LIMIT |
Set to any value to disable limit | - |
Testing
# Test server starts
uvx kiro-total-recall
# Ctrl+C to exit
# Test search directly
uv run python -c "
from kiro_total_recall.query import search_conversations
result = search_conversations(query='bug fix', max_results=3)
print(f'Found {result.total_matches} matches')
"
Project Structure
kiro-total-recall/
├── POWER.md # Kiro Power manifest + steering
├── mcp.json # MCP server config for Power
├── config.default.toml # Default configuration
├── src/kiro_total_recall/
│ ├── server.py # FastMCP server, tool definitions
│ ├── query.py # Search engine, deduplication
│ ├── indexer.py # Embedding, caching, fingerprinting
│ ├── loader.py # Unified loader (CLI + IDE)
│ ├── cli_loader.py # SQLite parsing for CLI
│ ├── ide_loader.py # JSON parsing for IDE .chat files
│ ├── config.py # Configuration management
│ └── models.py # Pydantic data models
├── pyproject.toml
└── LICENSE
Technical Details
| Component | Technology |
|---|---|
| Embedding model | all-MiniLM-L6-v2 (384 dimensions) |
| Vector search | Cosine similarity via NumPy dot product |
| Cache format | Python pickle with file locking |
| MCP framework | FastMCP |
| Package manager | uv |
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。