ai-memory-core
Provides DevOps tools for container debugging, Dockerfile optimization, compose generation, permissions analysis, and network troubleshooting.
Enables web search using DuckDuckGo without an API key.
Provides skill routing and architecture recommendations for Electron desktop development, including IPC, preload, and contextBridge patterns.
Enables headless web browsing, screenshot capture, and page interaction using Playwright with Firefox.
Provides game development project scaffolding, design analysis, and mechanics guidance for Roblox.
Enables fetching and parsing RSS feeds for content aggregation.
Provides SVG generation tools for creating vector graphics and design concepts.
Provides game development project scaffolding, design analysis, and optimization guidance for Unity.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ai-memory-corelog error: connection timeout to database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Stratum
Memory that works the way agents actually use it. 243 registered MCP tools for cross-session search, scope management, engineering math, and context compaction. All stdio, all Python stdlib, zero API keys.
Zero cloud dependencies. Zero GPU. Zero API keys.
Limitations documented alongside features. Callouts flag scope edges so you don't discover them mid-session.
Hard Constraints
Constraint | Implication |
Stdio transport | JSON-RPC over standard streams. No HTTP, WebSocket, or Unix socket transports. |
No authentication | No users, roles, or API keys. Any process reaching stdin can call any tool. |
No encryption at rest | Memory, registries, and logs are plain files. AES-GCM encryption available via |
No web UI | MCP protocol only — no dashboard, REST API, or graphical interface. |
Single machine | No clustering, failover, or shared state across processes. |
No crash recovery | Session state persists to JSON on every mutation, but mid-session crashes require manual |
Example Use Cases
Cross-session error memory: An agent hits ModuleNotFoundError: No module named 'xyz', logs it via write_xtrace_log_error. In a later session, a different agent searches read_xtrace_search("ModuleNotFoundError") and retrieves the resolution. No repeated debugging..
Scope enforcement during prompts: A user asks for "a full-stack chat app, also make it into a desktop app, and write the docs." read_focus_decompose splits this into 3 tasks, read_focus_prioritize orders them by dependency, and read_focus_scope_check flags scope-creep before the agent wastes time on the desktop variant.
Engineering computation without licensing a CAS: read_sim_math_matrix_solve(A=[[3,1],[1,2]], b=[5,5]) returns the solution [1.0, 2.0] with LaTeX derivation. read_sim_cfd_pipe computes pressure drop via Darcy-Weisbach. No MATLAB license needed.
Automated context compaction mid-session: When context approaches the token limit, read_compact_token_velocity detects the spike and write_compact_execute condenses verbose session content into a summary, preserving the agent's working set without losing prior decisions.
Memory consolidation across related work: After 50+ memory entries accumulate, mutate_consolidation_run discovers links between related entries (e.g., "fix: npm install" linked to "error: module not found"). read_consolidation_links surfaces these relationships, turning isolated notes into a knowledge graph.
Who it's for:
Agent developers needing persistent memory (error signatures, decisions, preferences, commitments)
Engineers requiring CFD, FEA, or mechanical analysis without commercial solvers
Mathematicians and scientists needing numerical computation (matrix solve, FFT, root finding, integration) with LaTeX formatted output, no CAS license
OpenCode / Claude Code / Cursor users needing scope management, behavioral guardrails, and prompt decomposition
Limitations:
Math covers the 80% case. No symbolic integration, sparse matrices, or arbitrary precision.
Runs locally. Zero telemetry, zero API keys.
Memory uses BM25+FTS5 by default. Vector search is optional and needs
sentence-transformers.No auth, no encryption, no sandboxing (see constraints).
Version
0.7.0-dev. 243 registered tools (core-exposed list is module-filtered at runtime) across 18+ engine modules, 4 simulation engines, and 14 skills. Full changelog in CHANGELOG.md.
Phase 6 Release Gate
Run the release gate locally before tags:
python scripts/phase6-release-gate.py --quickFor tag-grade verification:
python scripts/phase6-release-gate.pyRun extended roadmap regression directly (P1-P8):
python scripts/test-extended-phases.pyThe gate writes a machine-readable report to data/release-gate-report.json.
Related MCP server: SafeFlo
Architecture / Cortical Mapping
Stratum modules map to mammalian brain analogs. Each module pairs with a cortical pathway by function, not by implementation. The naming gives a mental model for dispatch behavior:
Engine / Module | Cortical Analog | Function |
Trace System (xtrace, dtrace) | Anterior Cingulate Cortex — error detection, conflict monitoring | Logs mistakes, recognizes recurring error signatures, prevents repeated debugging |
Skill Router | Thalamus — sensory relay, routing | Examines queries, classifies intent, dispatches to correct module — the central switchboard |
Goal Registry | Prefrontal Cortex — executive control, planning | Maintains goal hierarchy, decomposes tasks, detects scope drift |
NE-Memory (SQLite+FTS5 + vectors) | Hippocampus — episodic memory, consolidation | Stores cross-session learnings; FTS5 for fast pattern completion, vector search for semantic association |
Commitment Checker | Orbitofrontal Cortex — value judgment, promise-keeping | Verifies earlier commitments are honored — cross-session promise tracker |
Verifier Middleware | Cerebellum — fine motor correction, coordination | Detects behavioral drift mid-execution, renudges agent back on course |
Focus Module | Dorsolateral Prefrontal Cortex — working memory, attention | Prevents scope creep, decomposes convoluted prompts, maintains task hierarchy |
Sensory Module | Sensory Cortex — multi-modal perception | Web browsing, screenshots, PDF extraction, OCR, RSS — digital senses |
Audio Module | Auditory Cortex (superior temporal gyrus) | WAV analysis, waveform visualization, FFT frequency analysis, music theory |
Art Module | Visual Cortex (V1–V5) — pattern, color, form | SVG generation, color themes, palette extraction, design concepts |
Coder Module | Broca's Area / Wernicke's Area — language production & comprehension | Code analysis (12 languages), framework scaffolding, review, debugging, conversion |
Literature Module | Angular Gyrus — reading, concept binding | Text analysis (Flesch-Kincaid), concept extraction, study guides |
CFD Engine | Parietal Lobe (spatial reasoning) | Pipe flow (Darcy-Weisbach, Colebrook), boundary layer, drag, Bernoulli solver, pump sizing |
FEA Engine | Parietal Lobe (numerical computation) | Beam stiffness matrix, truss elements, modal analysis, heat conduction, stress recovery |
Mechanics Engine | Parietal Lobe (applied physics) | Beam stress/shear/deflection, column buckling (Euler+Johnson), fatigue (S-N/Goodman/Miner), fasteners |
Math Engine | Parietal Lobe (symbolic mathematics) | 19 numerical tools: linear algebra, calculus, FFT, root finding, statistics, complex numbers, number theory, unit conversion, ODE solving |
Mutation Module | Motor Cortex — action planning & execution | Plans file/state changes, audits before executing |
Compaction Module | Default Mode Network — reflection, summarization | Condenses verbose context — active during "idle" compaction cycles |
Plumber Module | Corpus Callosum — inter-hemisphere communication | Inspects sockets, traces cross-module handoffs, checkpoints state between pipelines |
Pedagogy Module | Medial Prefrontal Cortex — theory of mind, social adaptation | Assesses user understanding, adjusts explanation depth |
Hooks System | Insula — interoception, internal state | Monitors session lifecycle (start, observe, end) |
Consolidation Daemon | Hippocampal Replay — offline memory consolidation | Replays and links related memories during idle cycles |
Audit System | Episodic Buffer — short-term action cache | Checkpoints recent mutations for undo |
Where the Brain Still Wins
Limit | Brain Advantage | Stratum Reality |
Power efficiency | Runs on ~20W for a lifetime | A single LLM inference call burns more energy than a day of thinking |
Parallelism | 86 billion neurons firing simultaneously | Sequential JSON-RPC — one tool call at a time |
Neuroplasticity | Constant rewiring — damaged regions reroute functions | Static module graph; crash kills pathway until restart |
One-shot learning | Single burn teaches never to touch a hot stove | Needs multiple exposures for high FTS5 ranking |
Forgetting | Adaptive pruning (Ebbinghaus curve) | Remembers everything equally until consolidation triggered |
Emotional weighting | Emotion as relevance heuristic | All memories equally important; no salience tagging |
Context horizon | A lifetime of integrated experience | Session-scoped; cross-session persistence requires explicit writes |
Self-healing | Neurogenesis, collateral sprouting | Module crash = dead module until process restart |
Sleep consolidation | Automatic daily hippocampal replay | Manual, on-demand ( |
Usage Scenarios
1. Focus & Scope Management
# A convoluted prompt arrives — decompose it
read_focus_decompose(prompt_text="Build an API, also add a dashboard,
and can you make a mobile app too? Oh and fix the database migration")
# → {"tasks": [{"id": 1, "category": "backend", "description": "Build API"},
# {"id": 2, "category": "frontend", "description": "Add dashboard"},
# {"id": 3, "category": "mobile", "description": "Make mobile app"},
# {"id": 4, "category": "database", "description": "Fix migration"}],
# "total_tasks": 4}
# Prioritize them
read_focus_prioritize(tasks=[...])
# → {"ordered_plan": [4, 1, 2, 3], "rationale": "Migration blocks API, API blocks dashboard"}
# Check for scope creep mid-session
read_focus_scope_check(input_text="Actually let's rewrite everything in Rust instead")
# → {"classification": "scope_creep", "nudge": "That's a new project — store in Global Memory?"}
# Store an off-task idea for later
write_focus_store_global(project="rust-rewrite", task="Evaluate Rust for backend")2. Context Compaction
# Check token velocity (how fast context is growing)
read_compact_token_velocity()
# → {"velocity_5min": 12, "spike_detected": true, "recommendation": "compact now"}
# Condense verbose output into a summary
read_compact_synthesize(content="[300 lines of build logs...]")
# → {"summary": "Build failed: ModuleNotFound in 3 files.\nFixed: npm install react-dom",
# "compression_ratio": 0.04, "protected_blocks": 2}
# Execute full compaction cycle
write_compact_execute(content="[session content...]")
# → {"status": "compacted", "compression_ratio": 0.12}Compaction is extractive. It scores sentences and keeps the top ones, but it doesn't generate new summaries. Important details can get dropped. Token velocity detection assumes steady flow; bursty workloads give false positives.
3. Engineering Simulation
# Pipe flow pressure drop (Darcy-Weisbach + Colebrook friction)
read_sim_cfd_pipe(rho=1000, mu=0.001, v=2.5, D=0.1, L=50, roughness=0.00015)
# → {"pressure_drop_Pa": 42500, "Reynolds_number": 250000, "flow_regime": "turbulent", ...}
# Bernoulli equation solver (solve for any one unknown)
read_sim_cfd_bernoulli(P1=200000, v1=1.5, h1=10, P2=150000, v2=None, h2=12, rho=1000)
# → {"unknown": "v2", "value": 3.27, "units": "m/s", ...}
# Beam stiffness matrix (Euler-Bernoulli 4x4)
read_sim_fea_beam(E=200e9, I=8.33e-6, L=2.0)
# → {"stiffness_matrix": [[...]], "dof": 4, "latex": "K = EI/L³ [matrix]", ...}
# Matrix solve with full LaTeX derivation
read_sim_math_matrix_solve(A=[[3,1],[1,2]], b=[5,5])
# → {"solution": [1.0, 2.0], "latex": "\\begin{cases}3x₁ + 1x₂ = 5\\\\...", "dimension": 2}
# FFT — radix-2 Cooley-Tukey
read_sim_math_fft(samples=[1.0, 0.0, 1.0, 0.0, 0.5, 0.5, 0.0, 0.0])
# → {"fft_magnitudes": [...], "bins": 4, "method": "Radix-2 Cooley-Tukey FFT"}
# Numerical integration (Simpson's rule)
read_sim_math_integrate(expr="math.sin(x)", a=0, b=3.14159, method="simpson")
# → {"integral": 2.0, "steps": 100, "method": "simpson", "latex": "\\int_0^{3.14} sin(x) dx ≈ 2.0"}
# Root finding (Newton-Raphson)
read_sim_math_root(expr="x**2 - 2", method="newton", guess=1.5)
# → {"root": 1.41421356, "iterations": 5, "method": "Newton-Raphson"}
# Prime factorization
read_sim_math_factor(n=123456)
# → {"factors": [2, 2, 2, 2, 2, 2, 3, 643], "latex": "123456 = 2 × 2 × 2 × 2 × 2 × 2 × 3 × 643"}4. Mathematics Engine
The math engine provides 19 tools covering the full computational mathematics spectrum:
Domain | Tools | Method |
Linear Algebra |
| Gaussian elimination, LU decomposition, power iteration |
Calculus |
| Central difference, Simpson's rule, forward difference expansion |
Root Finding |
| Newton-Raphson, bisection, secant (auto-selectable) |
Fourier |
| Radix-2 Cooley-Tukey (recursive, pads to power of 2) |
Statistics |
| Descriptive stats, least-squares linear regression with R² |
Complex Numbers |
| Add/sub/mul/div/pow, polar/rectangular conversion |
Number Theory |
| Trial division, Euclidean algorithm |
Polynomials |
| Horner's method evaluation |
Unit Conversion |
| SI↔imperial, temperature, pressure — 16 conversion types |
ODEs |
| Runge-Kutta 4th order, Euler — string-parsed derivatives |
LaTeX |
| Template-based derivation step generation |
Plotting |
| ASCII line plot from x/y data |
Compared to Wolfram Alpha, this is numerical computation. It won't do symbolic integration, sparse matrices, or arbitrary precision. The table below is the exact gap.
Capability
Wolfram
Stratum
Symbolic differentiation
Yes
❌ Numerical only (central difference)
Symbolic integration
Yes
❌ Numerical only (Simpson's rule)
Arbitrary precision
Yes
❌ Double precision only
Sparse matrix support
Yes
❌ 2x2/3x3 only
Pattern matching
Yes
❌ None
Rule-based rewriting
Yes
❌ None
Special functions
Yes
❌ None
Full symbolic algebra
Yes
❌ None
Multivariate calculus
Yes
❌ Single variable only
Equation solving (symbolic)
Yes
❌ Numerical only
DSolve (symbolic ODEs)
Yes
❌ Numerical only (RK4)
Full 2D/3D plotting
Yes
❌ ASCII line plots only
What it can do: solve
Ax=b, compute determinants and eigenvalues, differentiate and integrate numerically, find roots, fit curves, handle complex numbers.
5. Code Analysis & Review
# Analyze code for issues
read_coder_analyze_code(code="def add(a,b): return a+b", language="python")
# → {"complexity": "low", "issues": [], "suggestions": ["Add type hints"]}
# Deep review across multiple dimensions
read_coder_review(code="...", language="python", focus="security")
# → {"vulnerabilities": 2, "severity": "medium", "fixes": ["Use parameterized queries"]}
# Debug an error with full context
read_coder_debug(error="TypeError: unsupported operand", code_context="...", language="python")
# → {"root_cause": "str + int concatenation", "fix": "Cast to str(): str(value)"}Coder analysis is regex and heuristic based. It does not parse code into ASTs. Deep structural issues like type mismatches across files or race conditions are invisible. The debug tool pattern-matches error messages, it doesn't execute code. Language conversion is literal syntax mapping, not idiomatic translation.
6. Web Browsing & Data Extraction
# Fetch a URL as clean text
read_sensory_fetch(url="https://example.com", method="browser", mode="text")
# → {"content": "Page text content...", "source": "browser"}
# Extract article content
read_sensory_fetch(url="https://example.com/blog", method="article")
# → {"title": "...", "body": "...", "author": "..."}
# Take a screenshot
read_sensory_screenshot(url="https://example.com")
# → {"screenshot_path": "...", "resolution": "1024x1024"}Playwright and Firefox are optional. Browser tools error gracefully if not installed. Screenshots need a display server (X11/Wayland). Some sites block automation. DuckDuckGo search is rate limited to about 1 request per second. OCR is English only by default.
7. Memory Consolidation & Cross-Pollination
# Check current memory state
read_memory_status()
# → {"memory_count": 85, "storage_backend": "sqlite+fts5", "last_consolidation": "2026-07-18"}
# Search memory with mode selection
read_memory_search(query="how to handle async errors", mode="bm25")
# → {"results": [...], "mode": "bm25", "latency_ms": 0.5}
# Cross-pollinate linked memories
mutate_consolidation_run()
# → {"links_found": 15, "entries_analyzed": 80, "status": "consolidated"}
# View discovered links
read_consolidation_links(limit=5, min_similarity=0.3)
# → {"links": [{"source": "error: module not found", "target": "fix: npm install", "similarity": 0.85}]}BM25 is keyword only. It finds documents that share the same words, not documents that share the same meaning. Searching "how to fix slow queries" won't return "indexing strategy for PostgreSQL" unless the terms overlap. Vector search fixes this but requires
sentence-transformersandnumpy. Consolidation uses lexical Jaccard overlap, so "fix bug" and "patch bug" are not treated as duplicates. Memory grows unbounded without manual consolidation.
Docker Only Setup
You only need Docker. No Node.js, no Python, no npm, no pip.
Windows
Send your friend this link. The browser downloads it, then they double-click to run:
https://github.com/ohmpatel3877/stratum/releases/download/v0.6.0-dev/ONE-CLICK.cmdThis is a GitHub Release link, so the browser will download it (not display it). They double-click the downloaded file and it runs.
Mac / Linux
Open Terminal, paste this one line, press Enter:
curl -fsSL https://raw.githubusercontent.com/ohmpatel3877/stratum/main/docker/setup-opencode-container.sh | bashArchitecture
Layer 1: Persistent Memory & Storage
BM25 search · SQLite session store · Structured registries (errors, decisions, goals)
Layer 2: Cognitive Pipeline
/compact → Context compaction, token velocity, state condensation
/mutate → Scope assessment, redundancy audit, execution
/focus → Scope detection, nudges, prompt decomposition, session pipeline
/plumber → Socket inspection, handoff tracing, artifact checkpointing
Layer 3: Engineering Simulation
/sim-cfd → Pipe flow, drag, Bernoulli, pump sizing (5 tools)
/sim-fea → Beam/truss FEA, modal analysis, heat conduction (5 tools)
/sim-mechanics → Beam stress, buckling, fatigue, fasteners (7 tools)
/sim-math → Numerical math engine (19 tools)
Layer 4: Agent Skills
sensory → Web browsing (Playwright), scraping, PDF/OCR, RSS
coder → Analyze, review, debug, convert, scaffold
devops → Containers, compose, Samba, network
gamedev → Design, scaffold, mechanics, monetization
audio → WAV analysis, waveform, frequency, music theory
art → SVG, themes, palettes, design concepts
literature→ Text analysis, concepts, study guides
Layer 5: Orchestration
task-orchestrator.py → Module-pattern detection, auto-DAG, parallel subagents
pipeline/dag-coordinator.py → Topological sort, conditional branching, fan-in merge
phase-verify-full.py → Cross-phase integration tests
### What they get
A running container with the 243-registered-tool MCP server (core exposure is dynamic by active module). Connect it to OpenCode:
```json
{
"mcpServers": {
"opencode-container-server": {
"command": "docker",
"args": ["exec", "-i", "opencode-server", "python3", "/app/scripts/tools-mcp-server.py"]
}
}
}Developer Install
Prerequisites
Python 3.10+
Node.js 18+ (only needed for OpenCode config)
No API keys required. Everything runs locally.
Windows (PowerShell 7+)
git clone https://github.com/ohmpatel3877/stratum.git
cd stratum
pwsh plugin-tools/install-stratum.ps1macOS / Linux
git clone https://github.com/ohmpatel3877/stratum.git
cd stratum
bash plugin-tools/install-stratum.shDocker
docker compose up -dThe installer will:
Validate Python 3.10+
Install Python dependencies (optional extras via
requirements-full.txt)Register the MCP server in
opencode.jsonLink skills to
~/.config/opencode/skills/Run verification checks
If the installer prompts for a MEM0_API_KEY, skip it. Memory works fully offline without one.
MCP Server / 243 Registered Tools
The MCP server runs on the standard JSON-RPC protocol over stdio. OpenCode and Claude Code auto-discover it from opencode.json. Tools use a consistent naming convention: read_* (safe queries), write_* (state mutations), mutate_* (destructive operations, all accept dry_run=true).
Core Infrastructure (13 tools)
Tool | Purpose |
| Log error occurrences for cross-session tracking |
| Search the error registry by signature |
| Error tracking summary statistics |
| Record architectural decisions with context |
| Search the decision registry |
| Match tasks to skills by intent triggers |
| Suggest MCP tools for a given task |
| Initialize a tracked goal |
| Decompose goals into sub-goals |
| Current goal stack state |
| Verify current action aligns with goal |
| List pending session commitments |
| Mark commitments as verified |
Simulation Engine (36 tools)
Engine | Tools | Description |
CFD | 5 |
|
FEA | 5 |
|
Mechanics | 7 |
|
Math | 19 |
|
Coder (7 tools)
read_coder_analyze_code, read_coder_generate_framework, read_coder_debug, read_coder_review, read_coder_explain, read_coder_convert, read_coder_architecture
Supports: Python, JavaScript, TypeScript, Rust, Go, Java, C#, C++, Swift, Kotlin, Ruby, PHP
Sensory — Web & File I/O (11 tools)
read_sensory_fetch (merged browse+scrape+article), read_sensory_screenshot, mutate_sensory_interact, read_sensory_extract_pdf, read_sensory_extract_html, read_sensory_extract_image, read_sensory_api_request, read_sensory_fetch_rss, read_sensory_read_file, read_sensory_search, read_sensory_set_browser_type
Headless Firefox via Playwright. DuckDuckGo search, no API key required.
Cognitive Pipeline (20 tools)
Compact: read_compact_token_velocity, read_compact_synthesize, write_compact_execute, read_compact_record_tick
Mutation: read_mutate_scope, read_mutate_audit, mutate_execute
Focus: read_focus_scope_check, read_focus_nudge, read_focus_decompose, read_focus_prioritize, read_focus_pipeline_status, write_focus_pipeline_advance, read_focus_global, write_focus_store_global, mutate_focus_learn
Plumber: read_plumber_inspect_socket, read_plumber_trace_handoff, write_plumber_checkpoint, read_plumber_checkpoints
DevOps & Engineering (8 tools)
read_devops_container_debug, read_devops_permissions_analyze, read_devops_compose_generator, read_devops_mergerfs_setup, read_devops_dockerfile_analyze, read_devops_network_troubleshoot, read_cad_validate_scad, read_cad_beam_stress
Audio (7 tools)
read_audio_analyze_file, read_audio_waveform, read_audio_frequency_analysis, read_audio_music_theory, read_audio_generate_tone, read_audio_speech_analysis, read_audio_convert_guide
Game Dev (6 tools)
read_gamedev_design_analyze, read_gamedev_scaffold_project, read_gamedev_mechanics_guide, read_gamedev_optimization, read_gamedev_compare_engines, read_gamedev_level_design
Art & Literature (7 tools)
Art: read_art_generate_svg, read_art_generate_theme, read_art_extract_palette, read_art_design_concept
Literature: read_lit_analyze_text, read_lit_extract_concepts, read_lit_generate_study_guide
Memory & State (5 tools)
read_memory_search, read_memory_synthesize, write_memory_add, write_memory_consolidate, read_memory_status
Utility (11 tools)
Database: read_db_query, read_db_schema, write_db_execute
Data Convert: read_convert_csv_to_json, read_convert_json_to_csv, read_convert_json_to_xml, read_convert_xml_to_json, read_convert_json_to_yaml, read_convert_yaml_to_json
Regex: read_regex_test, read_regex_explain
Verifier, Hooks & Lifecycle (9 tools)
Verifier: read_verifier_status, write_verifier_renudge, write_verifier_clear_renudge, mutate_verify_run
Hooks: read_hooks_prefetch, write_hooks_observe, read_hooks_session_status, write_hooks_session_end
Audit: mutate_audit_undo, read_audit_status, read_phase_status
DAG, Workstreams & Agents (7 tools)
read_dag_status, write_dag_execute, write_dag_resume, read_workstream_list, read_workstream_status, read_skill_list, read_agent_list
Skills
Skill | File | Description |
Task Orchestrator |
| Auto-decompose tasks into parallel subagent workstreams |
Security Hardening |
| Security audit, CVE detection, encryption hardening |
Memory Evaluation |
| Session-end memory catalog, gap analysis, registration |
Parameter Virtualizer |
| Token budget optimization, prompt caching strategies |
Speed Optimizer |
| Performance tuning, latency reduction strategies |
Verification Gate |
| Pre-push verification checklist |
Verifier Middleware |
| Behavioral correction signal engine |
Skill Router Triggers
The router auto-loads skills based on keywords in your task description:
Keywords | Skills Loaded |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Default |
|
Usage Examples
Quickstart: Track an Error Across Sessions
# Agent A encounters an error
→ xtrace_log_error("ModuleNotFoundError: No module named 'xyz'")
# Agent B (next session) searches before debugging
→ xtrace_search("ModuleNotFoundError")
← "Already logged. Root cause: missing pip install. Fix: pip install xyz"Record an Architecture Decision
→ dtrace_add(
title="Choose PostgreSQL over MySQL",
context="Need JSONB, array columns, and CTEs for the analytics module",
decision="PostgreSQL 16",
alternatives=["MySQL 8", "SQLite"],
consequences="Slightly higher ops overhead, better query capability"
)Auto-Route a Task to Skills
# User says: "debug the Samba container networking issue"
# Skill Router auto-loads: troubleshooting-master, devops_network_troubleshoot
# No manual skill selection neededDecompose a Complex Task
# Task Orchestrator scores complexity, splits into parallel workstreams:
# [Agent 1: Frontend] React component redesign
# [Agent 2: Backend] API endpoint rewrite
# [Agent 3: DB] Schema migration
# Merge results when all completeQuick Start
One-Click Install (Windows)
Double-click ONE-CLICK.cmd. It downloads Docker, builds the container, and prints your MCP config.
Manual Install
git clone https://github.com/ohmpatel3877/Stratum.git
cd Stratum
python scripts/tools-mcp-server.pyMemory works immediately with zero configuration.
Optional: pip install sentence-transformers for vector search.
Connect to OpenCode
Add to your opencode.json:
{
"mcpServers": {
"Stratum": {
"command": "python",
"args": ["scripts/tools-mcp-server.py"]
}
}
}Or for Docker deployments:
{
"mcpServers": {
"Stratum": {
"command": "docker",
"args": ["exec", "-i", "opencode-server", "python3", "/app/scripts/tools-mcp-server.py"]
}
}
}Scripts
All CLI scripts live in scripts/:
Script | Language | Purpose |
| Python | 243-registered-tool MCP server (main entry point) |
| Python | Complexity scoring for task orchestration |
| Python | DAG-based multi-agent pipeline execution |
| Python | Behavioral correction signal engine |
| Python | SQLite+FTS5 memory engine with synonym expansion |
| Python | Agent identity persistence and evolution |
| Python | Isolated code execution environment |
| Python | Multi-phase state machine orchestration |
| Python | Performance benchmarking suite |
| Python | CI: validate JSON config files |
| Python | CI: check skill router references |
| Python | CI: memory engine integration tests |
| Node.js | mem0 dream consolidation trigger |
Engine modules ( | Python | Art, audio, coder, devops, game-dev, literature, sensory, ... |
Pipeline scripts ( | Python | focus-module, consolidation-daemon, dag-coordinator, state_file_manager |
Benchmark scripts ( | Python | blind-benchmark, terminal-bench, run-eval-harness, ... |
Customization
Memory Categories
Edit .mem0.md to adjust retention policies or add categories:
architecture_decisions: null # Keep forever
anti_patterns: 365 # 1 year
session_state: 90 # 3 monthsSkill Router
Edit skills/skill-router.json to add trigger rules:
{
"mcpServers": {
"Stratum": {
"command": "python",
"args": ["scripts/tools-mcp-server.py"]
}
}
"triggers": ["kubernetes", "k8s", "helm", "pod"],
"skills": ["kubernetes-operations-k8s-manifest-generator"],
"priority": 10
}MCP Server Config
Edit package.json → mcpServers or opencode.json to change server args:
"stratum": {
"command": "python",
"args": ["scripts/tools-mcp-server.py"]
}Tool Inventory
243 registered tools across 30+ domains:
Domain | Tools | Category |
Memory (SQLite+FTS5) | 5 | Core |
Trace (error/decision registries) | 5 | Core |
Lifecycle Hooks | 4 | Core |
Verifier Middleware | 4 | Core |
Goal Registry | 4 | Core |
Commitment Checker | 2 | Core |
Audit / Phase Status | 3 | Core |
Compact Phase | 4 | Cognitive Pipeline |
Mutation Phase | 3 | Cognitive Pipeline |
Focus Module | 9 | Cognitive Pipeline |
Plumber Module | 4 | Cognitive Pipeline |
Pedagogy | 3 | Cognitive Pipeline |
Consolidation | 2 | Cognitive Pipeline |
CAD (3D printing) | 2 | Engineering |
Electrical (circuits) | 2 | Engineering |
CFD (pipe, boundary, drag, Bernoulli, pump) | 5 | Simulation |
FEA (beam, truss, modal, heat, stress) | 5 | Simulation |
Mechanics (stress, shear, deflection, buckle, fatigue) | 7 | Simulation |
Math Engine (matrix, calculus, FFT, stats, root, ODE...) | 19 | Simulation |
Sensory (web) | 13 | Agent Skills |
Coder | 7 | Agent Skills |
DevOps | 6 | Agent Skills |
Game Dev | 6 | Agent Skills |
Audio | 7 | Agent Skills |
Art/SVG | 4 | Agent Skills |
Literature | 3 | Agent Skills |
Data Convert | 6 | Utility |
Database | 3 | Utility |
Regex | 2 | Utility |
Skill Router / Tool Suggest | 2 | Infrastructure |
DAG / Workstreams | 4 | Orchestration |
Skills / Agents | 2 | Introspection |
Project Structure
Stratum/
engine/ # Domain-specific engines
cad-module/ # 3D printing (OpenSCAD)
electrical-module/ # Circuit design
art-module.py # SVG generation
audio-module.py # Audio processing
coder-module.py # Code analysis
compact-module.py # Context compaction
devops-module.py # Container/network ops
game-dev-module.py # Game development
literature-module.py # Text analysis
mutation-module.py # Algorithmic mutation
pedagogy-module.py # Teaching adaptation
plumber-module.py # Execution pipelines
sensory-module.py # Web browsing (Playwright)
utility-module.py # Shared helpers (format conversion, regex, DB)
sim-cfd-module.py # CFD simulation (pipe, drag, Bernoulli)
sim-fea-module.py # FEA simulation (beam, truss, modal, heat)
sim-mechanics-module.py # Mechanics (stress, buckling, fatigue)
sim-math-module.py # Stdlib numerical math engine (19 tools)
scripts/ # Utility scripts & pipeline orchestration
tools-mcp-server.py # MCP server entrypoint (243 registered tools)
memory_search.py # SQLite+FTS5 memory engine
hooks.py # Lifecycle hooks
pipeline/ # Pipeline orchestration
benchmark/ # Performance benchmarks
archive/ # Deprecated scripts
plugins/ # External platform plugins
hermes-plugin/ # Agent MemoryProvider
future/ # Spec-first development blueprints
docs/ # Guides, audits, architecture reviews
data/ # Persistent storage (JSON + SQLite)
install-tools/ # Installer scripts
docker/ # Docker configs
opencode.json # Project configComparisons
Feature | Stratum | Basic MCP memory servers |
Total tools | 243 | 5-15 |
Permission model | 3-tier (read/write/mutate) | None |
Search | BM25 + vector + reranker | Naive substring |
Simulation engines | CFD, FEA, Mechanics, Math (36 tools) | None |
Cognitive pipeline | Compact, mutate, focus, plumber | None |
Session lifecycle | /help → context → execute → /end | None |
Scope management | Prompt decomposition, prioritizer | None |
Orchestration | DAG coordinator, auto-parallelization | None |
Dry-run preview | All write/mutate tools | None |
Checkpoint/undo | All mutations | None |
GPU required | Zero | Varies |
API keys | Zero | Often required |
Market Comparison / Gap Analysis
Stratum has 243 registered tools across 30+ domains. No other single MCP server covers that range. Extended-phase hardening now includes observability, async pool controls, plugin management, OAuth/auth/encryption, connector framework, data lineage, and compliance guardrails.
Feature | Market Leaders | Stratum |
Security sandbox | SecOps-MCP, Desktop Commander | ❌ Missing |
Runtime guardrails | Desktop Commander (covert instruction detection, secrets redaction) | ❌ Missing |
Docker deployment | Most support it | ✅ Supported |
Hot-reload | Some support (UTCP bridge) | ❌ Missing |
Web UI | mcpknife can generate | ❌ Missing |
Enterprise security | Desktop Commander (RBAC, SBOM, signing) | ❌ Missing |
243 registered tools across 30+ domains | Fragmented across dozens of single-purpose servers | ✅ Single server, unified |
Cross-session memory | Few have it | ✅ BM25 + FTS5 + optional vector |
Engineering simulation | None | ✅ 36 tools (CFD, FEA, Mechanics, Math) |
Cognitive pipeline | None | ✅ DAG orchestration, compaction, focus management |
Stratum wins on breadth and integration. No other single MCP server covers memory, simulation, code analysis, art, audio, skill routing, and DAG orchestration in one package. It's missing production features like security sandbox, hot-reload, and web UI that Desktop Commander provides. Those are roadmap items.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ohmpatel3877/Stratum'
If you have feedback or need assistance with the MCP directory API, please join our Discord server