Local Behavioral Monitoring System with MCP Pipeline and Claude Code

A developer has implemented a persistent local behavioral monitoring system that tracks computer usage and feeds data to Claude Code through a custom MCP (Model Context Protocol) server. The system, called BRAIN, collects data on app switches, file operations, and development sessions entirely locally without cloud dependencies.
System Architecture and Components
The stack consists of:
- Python for the core implementation
- Custom MCP server for data piping
- Claude Code as the primary AI interface
- Haiku-powered local chatbot (referred to as BBC)
- CSV data lake for storage
- All components running 100% locally with zero cloud usage
Key Functionality and Testing Results
During Day 4 of real testing, the system demonstrated resilience when tokens expired and the MCP went offline. The pipeline continued collecting data silently in the background. When Claude reconnected, it executed a boot protocol that:
- Pulled 3 days of summaries from the offline period
- Read the event inbox
- Cross-referenced BBC (Haiku-powered chatbot) conversation logs
- Rebuilt full context in under 60 seconds
The system eliminates manual catch-up processes and "what did I miss?" scenarios by maintaining continuous context awareness. The Claude Code terminal runs in Portuguese as part of the developer's workflow navigation setup.
Philosophical Approach
The developer emphasizes that the AI observes behavior without judging it, maintaining a concept where "the human always owns the deploy, not the machine." The architecture and AI report are shared as a fable on GitHub, with daily updates to the ongoing story.
📖 Read the full source: r/ClaudeAI
👀 See Also

Skir: A Modern Alternative to Protocol Buffers for Type-Safe Data Exchange
Skir is a declarative language for defining data types, constants, and APIs that generates idiomatic, type-safe code in TypeScript, Python, Java, C++, Kotlin, and Dart from a single .skir file. It includes built-in schema evolution safety, RPC support similar to gRPC, and serialization to JSON or binary formats.

Claude Counter: Android app tracks Claude usage limits with real-time notifications
A developer built Claude Counter, a free Android app that polls Claude's API to display live session and weekly usage limits. The app shows progress bars, provides rich notifications with percentage remaining, and alerts when limits reset.

MCP Server Adds Persistent Memory with Retrieval Scoring to Claude Code
A developer built an MCP server called engram-mcp that gives Claude Code persistent memory across sessions and projects, featuring automatic retrieval scoring based on outcome success and drift detection for stale knowledge.

Claude Code Matrix Channel Plugin Built in Rust with E2EE Support
A developer built a Matrix channel plugin for Claude Code in Rust, adding support for text, files, images with E2EE decryption, reply threading, reactions, and bot commands. The 14MB binary is MIT licensed and works with any Matrix homeserver.