Skip to main content
Glama
abekek

Personal Intelligence System

by abekek

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.

System design

What it does

  • Captures automatically. A Claude Code Stop hook 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.

Related MCP server: sigmodx-mcp

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

  1. Settings → Connectors → Add custom connectorhttps://<service-url>/mcp

  2. Approve with your passcode (generated in Secrets Manager at deploy).

  3. 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.

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Automatically records AI conversation turns and code changes to local Markdown files to provide persistent context across chat sessions. It enables AI agents to search history through MCP tools and provides a web viewer for browsing past discussions.
    Last updated
    3
    4
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    Audit infrastructure for AI agents to log consequential decisions (invoice, GL, anomaly) and verify attestations via MCP tools.
    Last updated
    6
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    Enables AI agents to capture, store, and retrieve durable learnings from projects via MCP tools, providing a queryable memory of product and technical lessons across repos.
    Last updated
    MIT

View all related MCP servers

Related MCP Connectors

  • A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud

  • Hash-chained HMAC-signed audit log MCP for A2A (agent-to-agent) calls. Every tool-call, agent-ha...

  • Cross-vendor AI memory over MCP. One semantic store, readable and writeable from every MCP client.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abekek/personal-intelligence-system'

If you have feedback or need assistance with the MCP directory API, please join our Discord server