scream-life

scream-life

An MCP server that captures and stores user decisions during AI-agent interactions, offering structured decision memory, cognitive bias detection, and personalized advice from historical patterns.

Category
访问服务器

README

◆ ScreamLife — Human Decision Memory System

The Decision System AI Cannot Replace

A decision-memory system that records why you chose, not just what you did.


✌️ Two-Touch Product Surface

ScreamLife is built around exactly two moments:

Touch Tool What happens
You talk, it records scream-capture One call classifies the utterance: an open/decided decision or a passed-on missed opportunity, and stores it automatically. No choosing between granular tools.
You ask, it answers scream-query One call dispatches every ask: advice, history, patterns, bias analysis, profile, courage report, or missed ledger (via intent).
It talks back at the right moment automatic After a capture, the interception engine may emit a single history-grounded nudge (SSE) — no tool call needed. Enable via INTERCEPT_CONFIG.enabled.

Everything else (search, bias analysis, patterns, advice, profile, missed-ledger management) is available as granular tools for explicit control, but the default workflow is two touches.

The lens: not a mirror that diagnoses your biases — a ledger that also counts what staying conservative cost you.


🌟 What is ScreamLife?

ScreamLife is a local MCP (Model Context Protocol) service that captures your decisions during everyday AI-agent conversations, stores them as structured decision blocks, and delivers objective, personalized guidance based on your own decision history.

Not a memory system (what you did) — a decision system (why you chose).


🎯 Core Value

Value Description
Auto-capture Automatically detects decisions during agent conversations, zero manual work
Structured blocks Context, options, choice, reasoning, confidence, outcome, reflection
3-layer search Vector semantics + keyword + hybrid search
Bias detection Real-time detection of 8 cognitive biases
Pattern mining Mines behavioral patterns from your history
Personalized advice Based on your historical patterns, not generic advice
Context injection Auto-generates AGENTS.md so agents understand your decision style

🧩 MCP Tools

Tool Function Trigger
scream-save Save a structured decision Call immediately when a decision signal appears in the user message
scream-create Manually create a decision Precise manual entry
scream-search 3-layer historical decision search Check history before facing a new decision
scream-get Fetch a single decision's details Inspect a specific decision
scream-profile User identity profile Understand the user on first connection
scream-bias Detect 8 cognitive biases When the user expresses decision reasoning
scream-patterns Discover behavioral patterns When analyzing decision habits
scream-advice Personalized decision advice When the user faces an important decision
scream-missed Missed-opportunities ledger: record things passed on, review expired ones, attach hindsight The user mentions passing on an opportunity (decided not to / too risky / can't afford / turned down)
scream-capture Two-touch default: auto-classify and store a decision or a missed opportunity The user expresses a decision or a passed-on opportunity — use this instead of choosing granular tools
scream-query Two-touch default: one ask tool (intent = advice/search/missed/patterns/bias/profile/courage) The user asks for anything: advice, history, patterns, bias, profile, courage

scream-save Structured Fields

situation   What the user is considering
options     List of candidate options
choice      Final choice (empty if undecided)
reasoning   Decision reasoning
confidence  Confidence (0-1)
outcome     Outcome (pending/success/partial/failed)
reflection  Post-hoc reflection
category    Category (career/finance/health/relationship/education/tech/lifestyle/other)
user_text   [Required] The user's exact words (used to verify decision attribution)

Precision: Only user-declared decisions are recorded. AI's own analysis/suggestions are automatically rejected.


🚀 Quick Start

1. Configure MCP

Add to your MCP-compatible agent's config (works with any MCP-compatible agent):

{
  "mcpServers": {
    "scream-life": {
      "command": "bun",
      "args": ["/absolute/path/scream-life/Core/mcp-server.ts"],
      "env": {
        "SCREAM_LIFE_DB_PATH": "/absolute/path/scream-life/Data/scream-life.db"
      }
    }
  }
}

2. Optional: Hook prompts

If your agent supports hooks, configure hooks/hooks.json to remind the agent to check for decisions each turn.

3. Web Gateway

The MCP server auto-starts a web gateway at http://localhost:3000 — view your decision timeline, inject decisions manually, and monitor in real time via SSE.

Optional runtime switches (set in the MCP env):

Variable Effect
SCREAM_LIFE_WATCH=0 Disable the transcript watcher (it is enabled by default).
SCREAM_LIFE_WATCH_DIRS=/a,/b Extra comma-separated directories the watcher monitors.
SCREAM_LIFE_INTERCEPT=1 Enable automatic decision-moment nudges after captures.
SCREAM_LIFE_WEB_PORT=3100 Change the gateway port.

Standalone web dashboard (dev): the MCP gateway already serves the dashboard; to run the standalone server separately use a different port to avoid the port conflict:

PORT=3001 bun run Web/server.ts

4. Connect to an Agent Platform

The MCP server speaks the standard stdio protocol — register it as an MCP server in your agent client:

Desktop MCP clients — add to the client's MCP server config file (a common desktop client uses claude_desktop_config.json):

{
  "mcpServers": {
    "scream-life": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/scream-life/Core/mcp-server.ts"],
      "env": { "SCREAM_LIFE_WATCH": "0" }
    }
  }
}

Other MCP-capable clients (IDE plugins, custom agents) — point them at the same command/args. If the client supports JSON config, use the same shape above.

Verify it connected: ask your agent "have I made any decisions before?" — it should call the query tool and answer from your history (or say there's nothing yet). Then say "I decided to try this new framework" — the agent should call capture to record it. If neither tool is called, check the client's MCP server list for errors.

Note: SCREAM_LIFE_WATCH=0 above disables the file watcher so the agent-only workflow is clean. Remove it if you also want automatic transcript capture.


🔍 3-Layer Search

Strategy Technology Use case
vector Chroma + auto-embedding Semantic search ("startup" matches "start a company")
fts5 SQLite FTS5 Exact keyword matching
hybrid FTS5 filtering + vector ranking Default, most accurate
tfidf TF-IDF + cosine similarity Fallback when Chroma is unavailable

Embedding Model

Uses the chromadb built-in multilingual model by default (all-MiniLM-L6-v2, zero config). An optional Chinese-optimized model BAAI/bge-large-zh-v1.5 is supported:

# Option 1: built-in multilingual model (default, zero config)
uvx --with chromadb python3 Core/chroma_helper.py

# Option 2: BGE Chinese-optimized model (more accurate, requires model download)
SCREAM_LIFE_EMBEDDING_MODEL=BAAI/bge-large-zh-v1.5 \
  uvx --with chromadb --with sentence-transformers python3 Core/chroma_helper.py

BAAI/bge-base-zh-v1.5 (400MB) is recommended for better Chinese results with less latency. Switch via the SCREAM_LIFE_EMBEDDING_MODEL environment variable; automatically falls back to TF-IDF when offline.


🏗 Architecture

┌──────────────────────────────────────────────┐
│         Any MCP-Compatible Agent              │
│   (any MCP-compatible agent)     │
└──────────────────┬───────────────────────────┘
                   │ MCP Protocol (stdio / NDJSON)
                   ▼
┌──────────────────────────────────────────────┐
│            ScreamLife MCP Server              │
│               (8 tools)                       │
├──────────────────────────────────────────────┤
│  scream-save    → user decision capture       │
│  scream-search  → 3-layer retrieval           │
│  scream-bias    → 8 bias detection            │
│  scream-advice  → history-based advice        │
├──────────────────────────────────────────────┤
│  SQLite (decisions / patterns / identity)     │
│  Chroma (vector index, auto-embedding)        │
│  AGENTS.md (auto-generated context)           │
└──────────────────────────────────────────────┘

📁 Project Structure

scream-life/
├── .mcp.json              ← MCP config entry
├── package.json
├── deploy.sh              ← One-click deploy
├── Core/
│   ├── mcp-server.ts      ← MCP Server (8 tools, NDJSON)
│   ├── database.ts        ← SQLite storage + FTS5
│   ├── search.ts          ← 3-layer search engine
│   ├── chroma-client.ts   ← Chroma vector client
│   ├── chroma_helper.py   ← Chroma Python helper
│   ├── analyzer.ts        ← Bias detection + pattern mining
│   ├── advisor.ts         ← Decision advice engine
│   ├── transcript-watcher.ts ← Real-time capture
│   ├── migrations.ts      ← Schema versioned migrations
│   ├── logger.ts          ← Structured JSON logging
│   └── middleware/rate-limit.ts ← API rate limiting
├── Web/
│   ├── server.ts          ← Web gateway (API + SSE)
│   └── public/            ← Frontend (glassmorphism UI)
├── hooks/                 ← Hook integration
└── tests/                 ← Test suite

🛡 Security

  • SQL injection — column whitelist on all updates
  • Path traversal — resolved-path boundary checks
  • XSS — full HTML entity escaping (incl. quotes)
  • Rate limiting — per-client token bucket
  • Decision validation — agent-voice exclusion + user-decision signal check

🧰 Tech Stack

Layer Technology
Runtime Bun + TypeScript
Storage SQLite + FTS5
Vector Chroma + auto-embedding
Protocol MCP (JSON-RPC 2.0 over stdio)
Web Bun.serve + SSE
UI Vanilla JS + Glassmorphism

📦 Version

v0.1.0 · 2026-07-31


<p align="center"> <sub>Built for the AGI era — a decision system that AI cannot replace.</sub> </p>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选