Personal Intelligence System
Captures AI-assisted work into a searchable ledger and exposes it via MCP for querying past conversations and decisions.
README
Personal Intelligence System
A self-hosted, conversation-first knowledge ledger. It continuously captures your AI-assisted work — Claude Code sessions, claude.ai chats, uploaded documents, GitHub activity — into an immutable event ledger, and makes all of it searchable (keyword + semantic) from anywhere: your terminal, claude.ai on the web, or your phone.
The core idea: your most valuable knowledge isn't in your file system — it's in your conversations. This system treats every AI conversation as a first-class, permanent, queryable record.

What it does
- Captures automatically. A Claude Code
Stophook records every coding turn (prompt, response, tools used, files changed, git context) seconds after it happens. On claude.ai, Claude itself writes to the ledger through MCP tools (kb_capture_note,kb_capture_document). - Ingests your history. Importers for Claude Code transcripts, claude.ai account exports, and ChatGPT account exports — including text extracted from documents you uploaded into chats. Every import is idempotent: re-running adds only what's new.
- Remembers documents. PDFs, DOCX, and text files are stored content-addressed in S3, chunked, embedded, and linked to the conversations that referenced them.
- Finds things by meaning. Hybrid retrieval: PostgreSQL full-text search and pgvector cosine similarity, fused with reciprocal rank fusion. A paraphrase finds the conversation even when no keywords match.
- Answers from anywhere. An OAuth-protected MCP server exposes the ledger to claude.ai (web, desktop, mobile) as a custom connector, so you can ask "what did I decide about X last month?" from your phone.
- Links code to conversations. GitHub push webhooks connect commits back to the Claude Code session that produced them.
Architecture in one paragraph
Every capture becomes an immutable event (unique content hash, database trigger blocks UPDATE/DELETE). Normalizers project events into queryable tables — conversations, messages, turns, documents — that can be dropped and rebuilt from the ledger at any time. Policy (deny-lists, secret scanning) runs server-side on every write; secrets are additionally redacted client-side before upload. Retrieval layers exact match, full-text, and vector search over the projections. The MCP layer is a thin adapter: every tool wraps a retrieval or ingestion function 1:1.
Read the full walkthrough in docs/ARCHITECTURE.md.
Stack
Python 3.12 · FastAPI · PostgreSQL 16 + pgvector · SQLAlchemy 2 + Alembic · MCP Python SDK · AWS (App Runner, RDS, S3, Secrets Manager, Bedrock via CDK) · pytest (107 tests)
Runs for roughly $40/month on AWS, or entirely locally with Docker.
Quick start (local)
docker compose up -d postgres # pgvector-enabled Postgres
uv sync
uv run alembic upgrade head
uv run pytest -q # 107 tests
uv run python -m pis.api # API on 127.0.0.1:8800
Deploy to AWS
cd infra && npm install
CDK_DEFAULT_ACCOUNT=<your-account> npx cdk deploy # RDS, S3, secrets, roles, Bedrock endpoint
./scripts/create-service.sh # App Runner service
The container migrates the database at boot and serves the API + MCP
endpoint. Subsequent code changes: npx cdk deploy && ./scripts/update-service.sh.
Connect claude.ai
- Settings → Connectors → Add custom connector →
https://<service-url>/mcp - Approve with your passcode (generated in Secrets Manager at deploy).
- Chat naturally: "search my ledger for …", "log this decision", "save this document".
The server implements OAuth 2.1 with dynamic client registration and PKCE, so no client IDs or secrets are ever pasted around.
Capture your history
# Claude Code transcripts (local JSONL)
uv run pis import run ~/.claude/projects --api-url $URL --token $TOKEN
# claude.ai account export (Settings → Privacy → Export data)
uv run pis import run export.zip --adapter claude-export --api-url $URL --token $TOKEN
# ChatGPT account export
uv run pis import run export.zip --adapter chatgpt-export --api-url $URL --token $TOKEN
# Documents from folders
uv run pis artifacts scan ~/Documents --api-url $URL --token $TOKEN
Live capture: integrations/claude-code/install-daemon.sh installs a
launchd daemon and the Stop hook wiring; every future Claude Code turn lands
in the ledger automatically.
Security model
- Ledger immutability enforced by the database, not convention.
- All personal data lives in your Postgres/S3 — never in this repo.
- Secret scanning both client-side (redact) and server-side (reject + audit).
- Deny-lists for repositories/paths that must never be captured.
- MCP and API are bearer/OAuth-gated; the consent screen is passcode-locked.
- Capture is fail-open for your tools (a dead daemon can never block Claude Code) and fail-closed for data (unauthenticated writes are impossible).
Status & roadmap
Working today: capture (Claude Code + claude.ai), historical import, hybrid semantic search, document ingestion, MCP connector, session↔commit linking, LLM memory extraction (conversations distilled into typed propositions with evidence, supersession and dedup), topic context packs, auto-extraction scheduler, and session-start context injection into Claude Code.
Next: curation workflow (promoting memories to user-confirmed), artifact binary resolution, golden retrieval evaluations, isolated finance vault.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。