cortex
Ingests and enriches AdGuard syslog messages, recognizing useful signals from AdGuard for log investigation.
Ingests and enriches Authelia syslog messages, recognizing authentication-related signals for log investigation.
Collects Docker logs and events, supervises Docker ingest, and enriches Docker lifecycle events for investigation.
Enriches Linux kernel and OOM events from syslog for investigation.
Accepts OpenTelemetry log exports over OTLP/HTTP at /v1/logs and ingests them into Cortex.
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., "@cortexfind errors in syslog and docker logs from the last hour and show a timeline"
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.
Cortex
Self-hosted homelab log intelligence over MCP, CLI, and REST with SQLite/FTS.
It collects logs and operational evidence, stores them in SQLite with FTS5 search, and exposes one shared intelligence layer through CLI, REST, MCP, and a bundled browser workspace.
Cortex began as a syslog receiver. It now covers network logs, Docker, managed files, OpenTelemetry logs, host heartbeats, fleet inventory, shell and agent activity, and Claude, Codex, and Gemini transcripts. It correlates those sources into timelines, incidents, and an evidence-backed topology graph without making the graph a second source of truth.
At a glance
Area | What Cortex provides |
Ingest | UDP/TCP syslog, OTLP/HTTP logs, Docker logs and events, managed file tails, host heartbeats, AI transcripts, shell history, agent command records, and fleet inventory |
Storage | SQLite in WAL mode, FTS5 full-text search, bounded metadata, retention, storage budgets, maintenance jobs, checkpoints, and 50 sequential schema migrations |
Investigation | Search, filtering, context, timelines, patterns, anomaly comparison, cross-source correlation, recurring error signatures, deterministic incident bundles, and graph explanations |
Fleet intelligence | SSH and API inventory collectors, host state, service topology, container and route relationships, redacted evidence, and rebuildable graph projections |
AI operations | Claude, Codex, and Gemini session indexing; skill, MCP, and hook event extraction; incident clustering; and guarded local LLM assessments |
Interfaces | Native CLI, one action-dispatched MCP tool, authenticated REST APIs, MCP prompts and resources, an MCP Apps search widget, and a bundled investigation workspace |
Operations | Setup and repair, diagnostics, Compose control, backup, integrity checks, WAL checkpoints, vacuum, update workflows, agents, and health endpoints |
Cortex is designed for a trusted homelab or small private fleet. It is not a clustered log warehouse, a general-purpose SIEM, or a safe place to expose unauthenticated administrative surfaces to the public internet.
Related MCP server: AgentWatch
Contents
Quick start
Install the CLI
The npm launcher is the fastest path for local CLI and stdio MCP use:
npx -y @dinglebear/cortex --help
npx -y @dinglebear/cortex mcpInstall it permanently with:
npm install --global @dinglebear/cortex
cortex --versionThe launcher requires Node.js 18 or newer. It downloads a checksum-verified native release binary and currently supports Linux x64 and Windows x64.
Build from source with the current stable Rust toolchain:
git clone https://github.com/dinglebear-ai/cortex.git
cd cortex
mise install # optional, but pins the repository tools
just build
./.cache/cargo/debug/cortex --versionStart a local server
The full daemon starts UDP and TCP syslog receivers plus the shared HTTP server. Use separate MCP and REST tokens:
mkdir -p "$HOME/.cortex/data"
export CORTEX_DB_PATH="$HOME/.cortex/data/cortex.db"
export CORTEX_TOKEN="$(openssl rand -hex 32)"
export CORTEX_API_TOKEN="$(openssl rand -hex 32)"
cortex serve mcpDefaults:
Syslog:
0.0.0.0:1514over UDP and TCPHTTP:
127.0.0.1:3100MCP:
http://127.0.0.1:3100/mcpREST:
http://127.0.0.1:3100/api/*Investigation workspace:
http://127.0.0.1:3100/app
Verify it from another terminal:
curl -fsS http://127.0.0.1:3100/health
logger -n 127.0.0.1 -P 1514 --tcp "cortex quickstart from $(hostname)"
export CORTEX_API_TOKEN="the-same-api-token"
cortex tail --limit 10For a managed local deployment, cortex setup repair creates or repairs the Cortex home, Compose assets, data paths, and missing 64-character MCP and REST tokens without replacing existing token values.
Connect an MCP client
Query-only stdio mode reads the configured local database and starts no network listeners:
{
"mcpServers": {
"cortex": {
"command": "npx",
"args": ["-y", "cortex-rmcp", "mcp"],
"env": {
"CORTEX_DB_PATH": "/absolute/path/to/cortex.db"
}
}
}
}Streamable HTTP mode connects to the persistent daemon:
{
"mcpServers": {
"cortex": {
"url": "http://127.0.0.1:3100/mcp",
"headers": {
"Authorization": "Bearer your-cortex-token"
}
}
}
}A useful first call is:
{"action":"status"}Then narrow the investigation with tail, errors, search, timeline, or context before using broader analysis operations.
How Cortex is built
Cortex is one Rust binary with multiple operating modes. The same application and service layer backs the CLI, REST handlers, and MCP handlers, so validation, limits, identity resolution, redaction, and business rules do not belong to one transport alone.
INGESTION
Syslog UDP/TCP OTLP logs Docker agent / pull
Managed file tails Heartbeats Claude / Codex / Gemini
Shell history Agent commands Fleet inventory
\ | /
\ | /
+---- bounded parsing and enrichment ----+
|
scrub, normalize, batch
|
SQLite WAL + FTS5
|
+----------------+----------------+
| |
authoritative records derived accelerators
logs, heartbeats, rollups, signatures,
inventory, sessions graph projections
| |
+----------------+----------------+
|
shared service layer
|
CLI REST MCP Web workspaceThe daemon supervises its receivers and background services with cooperative cancellation. Shutdown drains HTTP requests, gives maintenance tasks 10 seconds to finish before abort-and-join, gives ingest 5 seconds to flush, and then attempts a WAL checkpoint. Already-running blocking SQLite calls cannot be cancelled by Tokio.
Background services include:
Retention and storage-budget enforcement
WAL and FTS maintenance
Docker ingest supervision
File-tail supervision
Error-signature scanning
Notification evaluation, dispatch, and digest scheduling
Inventory refresh and backfill
Graph projection refresh
AI-session and timeline rollups
Database optimization and maintenance jobs
Heavy analytical reads and maintenance jobs have separate concurrency controls so one expensive investigation cannot starve the ingest path.
Ingestion
All log-like sources are normalized into the same durable log model, enriched where safe, scrubbed where configured, and written through bounded batch paths.
Syslog over UDP and TCP
Cortex listens on the same configurable port for UDP and TCP syslog. It parses common RFC 3164 and RFC 5424 shapes, preserves the raw frame, records sender identity, normalizes severity and facility, and enriches known application formats.
Relevant defaults:
Bind:
0.0.0.0:1514Maximum message: 8 KiB
Maximum concurrent TCP connections: 512
TCP idle timeout: 300 seconds
Writer batch: 100 records or 500 ms
Write queue capacity: 10,000 records
Syslog has no application-layer authentication. Restrict senders with network controls and CORTEX_ALLOWED_SOURCE_CIDRS when the listener is reachable beyond a trusted network.
Built-in enrichment recognizes useful signals from AdGuard, Authelia, Docker lifecycle events, fail2ban, Linux kernel and OOM events, SWAG, reverse-proxy logs, and host-local Cortex Docker agent metadata. Source gates can restrict enrichment that would otherwise trust a marker inside an unauthenticated syslog body.
OpenTelemetry logs
Cortex accepts OTLP/HTTP log export requests at POST /v1/logs on the shared HTTP listener. Requests are bounded to 4 MiB and flow into the normal Cortex writer.
Current OTLP scope is intentionally narrow:
Logs over HTTP are supported.
OTLP traces are not accepted.
OTLP metrics are not accepted.
OTLP/gRPC is not implemented.
POST /v1/logs authenticates with CORTEX_TOKEN — the same static MCP bearer token that guards POST /mcp, read from the managed ~/.cortex/.env on a deployed host. It is not CORTEX_API_TOKEN (REST /api/*) and not CORTEX_API_ADMIN_TOKEN. Loopback and trusted-gateway policies skip the check. An OAuth-only deployment with no static token denies OTLP outright, because machine exporters have no OAuth flow — so a non-loopback OAuth-only /v1/logs exposure is rejected at startup unless CORTEX_TOKEN is set.
Docker logs and events
Cortex supports two Docker collection paths:
Host-local agent, the preferred multi-host path. The host-local cortex agent reads the local Docker socket, converts logs and lifecycle events into bounded records, and forwards them to the server without changing Docker's daemon logging driver.
Central pull compatibility mode, an optional server-side collector for explicitly configured Docker Engine or docker-socket-proxy HTTP endpoints. It records per-container checkpoints and reconnects with bounded exponential backoff.
Central pull is disabled by default. The CORTEX_DOCKER_HOSTS shorthand expands hosts into insecure http://host:2375 endpoints and should only be used on a tightly controlled private network. A hosts file supports explicit base URLs and safer endpoint configuration.
Managed file tails
Managed file-tail sources are persisted in a registry and supervised by the daemon. Add, remove, list, and inspect sources through the CLI, REST, or the file_tails MCP admin action.
The path policy rejects unsafe targets, including paths outside configured roots, symlink escapes, non-regular files, and sensitive mounts. Container deployments expose an explicit read-only file-tail root rather than the entire host filesystem.
Host heartbeats
The host agent can post bounded JSON snapshots to POST /v1/heartbeats. Heartbeats include host state such as load, memory, disks, networking, processes, and container summaries. They power host_state, fleet_state, and correlate_state.
Heartbeat request bodies are capped at 256 KiB. Heartbeat data has short operational retention separate from the main log-retention policy.
AI transcripts
Cortex indexes local and forwarded transcript data from:
Claude Code projects under
~/.claude/projectsCodex sessions and worktrees under
~/.codex/sessionsand~/.codex/worktreesGemini chat data under
~/.gemini/tmp
The scanner supports incremental checkpoints, parse-error records, bounded chunks, broad-path rejection, and safe recovery from changed files. It extracts normalized transcript rows plus dedicated skill, MCP tool-call, and hook events.
A satellite agent can send already-parsed records to POST /v1/ai-transcripts, which prevents transcript collection from depending on the database living on the same host as the AI client.
Shell and agent activity
Satellite agents can forward additional operational evidence to the shared server:
POST /v1/agent-commandsfor deduplicated agent command-spool recordsPOST /v1/shell-historyfor parsed Bash, Zsh extended-history, and Atuin records
These records use the same storage and correlation model as the rest of Cortex, which makes an agent change or shell command visible beside the service failure that followed it.
Fleet inventory
Inventory collection builds a redacted fleet snapshot from local files, SSH probes, Docker endpoints, and optional service APIs, then projects safe relationships into the investigation graph.
Investigation and intelligence
Cortex exposes bounded workflows rather than a raw SQL console.
Search and context
FTS5 full-text search with host, app, severity, source, project, session, and time filters
Structured filter-only retrieval for indexed fields
Recent tails and single-row retrieval with raw-frame evidence
Surrounding context around a log ID or timestamp
Host, app, and source-IP inventories
Clock-skew measurement using event and receive timestamps
Time and volume analysis
Bucketed timelines
Ingest-rate and queue-pressure state
Near-duplicate message pattern clustering
Recent-versus-baseline anomaly detection
Side-by-side time-range comparison
Silent-host and silent-stream detection
Database, storage, and runtime statistics
Correlation
Cross-host correlation around a timestamp
AI-session anchor correlation against infrastructure logs
Topic resolution through the entity graph before timeline construction
Host-state correlation across logs, heartbeats, and inventory
Historical incident similarity using FTS5
Deterministic incident context bundles with bounded evidence
Recurring errors
An optional background scanner groups repeating error signatures into durable records. Operators can inspect unaddressed signatures, acknowledge them, revoke acknowledgements, and correlate a signature with logs and graph evidence.
Error detection is disabled by default. When enabled, it scans bounded batches, records lower-severity recurrences without paging, and can notify only above a configured severity floor.
Fleet inventory and graph
Inventory collectors
The native inventory subsystem can collect and normalize evidence from:
Local and remote Compose, reverse-proxy, and AdGuard Home configuration
Local process, storage, project, and raw configuration inventories
SSH sessions to remote fleet hosts
Local and remote Docker endpoints
Tailscale
UniFi
Unraid
Media-stack services and related APIs
SSH collection uses strict host-key verification, bounded concurrency, timeouts, and retry backoff. Sensitive fields are redacted before persistence.
The cache lives under ~/.cortex/inventory by default and includes:
normalized/homelab.json: the typed normalized fleet snapshotcollection-state.json: collector health, timing, and warning stateraw/<run-id>/...: raw-but-redacted supporting artifacts
The map action reads the normalized cache. It does not trigger a collection run and does not return raw config bodies or credential-bearing URLs.
Derived investigation graph
The graph connects canonical entities such as:
Hosts and source identities
Logical services and concrete service instances
Applications and containers
Domains, routes, and endpoints
AI projects and sessions
Error signatures and operational findings
Relationships carry confidence, trust, reason codes, timestamps, and bounded evidence references. The graph supports entity resolution, neighborhoods, topology questions, evidence lookup, and explanation paths.
The graph is a rebuildable projection. Raw logs, heartbeats, inventory records, error signatures, and AI session data remain authoritative. Projection rebuilds use staging tables and a short serialized swap, record watermarks and metrics, and preserve explicit degraded state when refresh fails.
AI session intelligence
Cortex treats AI transcripts as operational evidence, not merely chat archives.
Deterministic session analysis
The shared service layer can:
List and search sessions by project
Measure activity in five-hour usage blocks
Summarize project context
List observed tools and projects
Detect frustration or abuse signals
Group those signals into scored incidents
Correlate AI activity with non-AI infrastructure logs
Extract skill invocations
Extract MCP server and tool-call events
Extract hook configuration and runtime events
Build skill-first, MCP-first, and hook-first investigation bundles
The deterministic query and incident workflows are available through CLI, REST, and MCP.
Guarded local assessments
LLM-backed assessments are deliberately local-only. They run through cortex assess and are not exposed as MCP actions or REST routes because they spawn a local Gemini subprocess.
The shared LLM runner enforces:
A global kill switch
Global and per-action concurrency limits
Per-minute and per-hour rate limits
Per-action circuit breakers and cooldowns
Invocation timeouts
Prompt and output byte caps
An explicit background-enrichment gate, disabled by default
Durable audit records for successes, failures, timeouts, and policy denials
Default guard values allow one concurrent invocation, three per minute and thirty per hour per action, a 120-second timeout, a 1 MiB prompt cap, and a 256 KiB output cap.
Prompt scrubbing is enabled by default. Skill, MCP, and hook event extraction happens before scrubbed transcript text is persisted, so structured operational signals are retained without requiring raw prompt storage.
Alerts and notifications
Notifications are optional and disabled by default. When enabled, Cortex uses Apprise as the delivery bridge and a durable SQLite outbox for retry, deduplication, and dead-letter handling.
Built-in evaluators cover:
OOM kills
Containers exiting nonzero
fail2ban bans
Authelia MFA failures
Disk-fill and storage guardrail pressure
Ingest queue pressure
Complete ingest silence
Heartbeat silence
Silence from previously active continuous streams
The notification subsystem includes:
Configurable evaluator cadence
Per-rule toggles and thresholds
Deduplication windows
Outage-scoped silence keys
Bounded retry with dead-letter state
Recent-firing history
Test notifications
A scheduled daily digest
By default, continuous stream-silence tracking covers UDP/TCP syslog, agent Docker, Docker stream and event records, and managed file tails. Sporadic sources such as transcripts and shell history are intentionally excluded.
Interfaces
CLI
Run cortex --help and command-specific --help for the generated command tree.
Group | Purpose |
| Log retrieval |
| Discovery and topology |
| Investigation and analytics |
| AI-session queries and local guarded assessments |
| Error signatures, acknowledgements, and notification history |
| Collectors, agents, file tails, inventory, and heartbeats |
| Full daemon and query-only stdio MCP modes |
| Diagnostics and maintenance |
| Lifecycle and operator tooling |
Examples:
cortex search "oom killer" --host devhost --since 1h
cortex filter --severity err --since 6h
cortex timeline --since 24h
cortex sessions search "migration failure"
cortex graph explain --help
cortex alerts errors list
cortex ingest inventory refresh --json
cortex ingest filetail list
cortex status
cortex doctorThe CLI supports direct/local operation and HTTP operation. REST-backed mode is the normal remote path and uses CORTEX_URL plus CORTEX_API_TOKEN.
MCP
Cortex exposes one MCP tool named cortex. Its required action field selects an action from a single authoritative Rust registry. The mechanically generated current count is published in the live coverage inventory.
The current scope split is:
50 read actions requiring
cortex:read5 admin actions requiring
cortex:admin:ack_error,unack_error,file_tails,notifications_test, andllm_invocations1 informational action,
help, which requires an authenticated context when authentication is mounted but no read/admin scope
Complete MCP action catalog
Domain | Actions |
Log retrieval |
|
Discovery and health |
|
Analytics and correlation |
|
Fleet and topology |
|
AI sessions |
|
AI operational events |
|
Errors and administration |
|
Reference |
|
The runtime schema contains per-action flags, defaults, examples, relative cost metadata, and validation. See docs/mcp/SCHEMA.md for the parameter reference.
MCP prompts
Cortex ships twelve reusable infrastructure prompts:
infra.incident-triageinfra.host-healthinfra.service-outageinfra.security-auth-reviewinfra.noise-reductioninfra.agent-change-correlationinfra.docker-container-regressioninfra.network-dns-failureinfra.storage-pressureinfra.auth-bruteforceinfra.syslog-forwarding-gapinfra.after-deploy-check
See docs/mcp/PROMPTS.md for arguments and output expectations.
MCP resources and UI
The MCP server exposes:
URI | Purpose |
| Live JSON schema for the action-dispatched tool |
| Schema for structured incident-style prompt output |
| Self-contained MCP Apps search widget |
The query widget is progressive enhancement. UI-capable MCP hosts can render it; ordinary MCP clients continue receiving the normal text and structured JSON result.
REST
Authenticated JSON routes live under /api/* on the shared HTTP listener. They cover the same major query domains as MCP and add operator workflows for session checkpoints, parse errors, database integrity jobs, backup, checkpoint, and vacuum.
The versioned investigation API lives under /api/v1/* and provides Ask Cortex plus graph entity, neighborhood, explanation, and evidence endpoints for the bundled browser workspace.
REST requires CORTEX_API_TOKEN. Privileged maintenance and file-tail workflows can also require CORTEX_API_ADMIN_TOKEN.
See docs/api.md for the route and response reference.
Browser investigation workspace
The daemon serves a bundled workspace at /app and /app/investigate. It includes:
Runtime and schema status
Fleet and ingest summaries
Ask Cortex investigation requests
An interactive Cytoscape graph canvas
Evidence inspection
A recent-log timeline
The app is embedded into the Rust binary, has no external runtime dependency, uses a restrictive Content Security Policy, and keeps the entered REST bearer token in memory only. The current UI identifies itself as an investigation preview rather than a full general-purpose dashboard.
Claude Code plugin
.claude-plugin/plugin.json packages Cortex as a Claude Code plugin. It declares exactly three surfaces plus configuration:
Key | Points at |
|
|
|
|
| Server-vs-client mode, |
The twelve skills are cortex, frustration-assessment, hook-friction-assessment, incidents, logs, mcp-friction-assessment, report, searching-sessions, skill-improvement-assessment, topology, troubleshoot, and version-check.
The plugin registers no Claude Code lifecycle hooks — there is no hooks key and no hooks.json. Setup is explicit: run cortex setup pluginhook (or the plugins/cortex/scripts/plugin-setup.sh adapter) after installing, upgrading, or reconfiguring. just validate-plugin and scripts/validate-marketplace.sh assert the hooks key stays absent, and cargo xtask check-version-sync asserts the manifest carries no top-level version.
See docs/plugin/HOOKS.md for the setup lifecycle and docs/plugin/PLUGINS.md for the manifest reference.
Health endpoints
GET /health: minimal unauthenticated liveness response for containers and proxiesGET /health/full: authenticated detailed health and ingest observability
Configuration
Cortex loads configuration in this order, with later layers winning:
Built-in defaults
A partial
config.tomlin the current working directoryThe managed
$CORTEX_HOME/.envfile, normally~/.cortex/.envProcess environment variables
Important defaults
Setting | Default |
Syslog bind |
|
HTTP bind |
|
Database path |
|
SQLite pool size | 8 connections |
SQLite page cache budget | 128 MiB total |
SQLite mmap target | 256 MiB |
Heavy-read concurrency | 1 |
WAL checkpoint threshold | 256 MiB |
Log retention | 90 days |
Logical database limit | 1,024 MiB |
Recovery threshold | 900 MiB, auto-adjusted when the limit is raised substantially |
Cleanup cadence | 60 seconds |
Notifications | Disabled |
Recurring-error scanner | Disabled |
Central Docker pull | Disabled |
Prompt scrubbing | Enabled |
Background LLM enrichment | Disabled |
Useful environment variables include:
Variable | Purpose |
| Managed configuration and operational home |
| SQLite database path |
| Syslog listener |
| Optional syslog sender allowlist |
| Shared HTTP listener |
| Static MCP, OTLP, heartbeat, and forwarding bearer token |
| REST bearer token |
| Additional REST admin token where required |
| Static-token or OAuth authentication mode |
| Public URL used for OAuth and exposure validation |
| Host-header and CORS policy |
| Log retention |
| Logical database storage budget |
| Optional external free-space write guard |
| Managed file-tail root allowlist |
| Enable central Docker pull compatibility mode |
| Best-effort AI prompt credential scrubbing |
| Enable notification services |
| Global local-assessment kill switch |
| Tracing filter |
See docs/CONFIG.md for the complete reference and validation rules.
Authentication and trust boundaries
Cortex intentionally separates transport credentials and capabilities.
MCP
CORTEX_TOKENauthenticates static-token HTTP MCP calls.Static-token callers receive
cortex:readby default.Set
CORTEX_STATIC_TOKEN_ADMIN=trueonly when the token should also receivecortex:admin.OAuth mode supports explicit read and admin scopes through the shared authentication layer.
Non-loopback unauthenticated binds are rejected unless an explicit trusted-gateway mode is configured.
REST
CORTEX_API_TOKENis separate fromCORTEX_TOKEN.REST refuses to mount without an API token.
Sensitive maintenance and file-tail operations can require
CORTEX_API_ADMIN_TOKENin addition to the normal REST bearer token.
Ingest endpoints
Syslog itself is unauthenticated. Use CIDR and network controls.
OTLP logs, heartbeats, AI transcripts, shell history, and agent-command forwarding use the Cortex bearer-token policy when configured.
Unauthenticated forwarding endpoints are loopback-only unless the operator explicitly establishes another trusted boundary.
Data handling
AI prompt scrubbing is enabled by default.
Inventory is redacted before it reaches the normalized cache.
MCP and REST return bounded evidence instead of raw credential-bearing config artifacts.
File tails are constrained to configured roots and reject path escapes.
Docker endpoints and SSH keys are treated as privileged infrastructure access.
Container examples mount a dedicated least-privilege SSH directory rather than a user's complete
~/.ssh.
Read docs/SECURITY.md, docs/GUARDRAILS.md, and docs/OAUTH.md before exposing Cortex beyond loopback or a trusted gateway.
Storage and maintenance
SQLite model
Cortex uses SQLite with:
WAL mode
A bounded r2d2 connection pool
FTS5 external-content indexing for log messages
Covering and composite indexes for common filters and timelines
Transactional batch writes
Durable source checkpoints and parse errors
Maintenance job tracking
Online backup support
Integrity checks, checkpoints, and vacuum workflows
The current schema history contains 50 sequential migrations. CI derives this denominator from KNOWN_SCHEMA_VERSION and the migration registry.
Authoritative and derived data
Authoritative records include:
Normalized logs and raw frames
Hosts and source identities
Transcript source, checkpoint, import, and parse-error records
Heartbeats and component snapshots
Inventory snapshots and collector state
Error signatures and acknowledgement events
Skill, MCP, and hook events
Notification outbox and firing history
LLM invocation audit records
Derived accelerators include:
AI session rollups
Hourly timeline rollups
Inventory statistics
Stream-last-seen state
Entity graph tables and evidence relationships
Derived data can be refreshed or rebuilt from authoritative evidence.
Storage guardrails
The daemon enforces retention and a logical database budget in chunks. It can enter a write-block state before uncontrolled growth damages the host, then resume after recovery thresholds are met. An optional minimum-free-disk guard protects against pressure caused by data outside the Cortex database without deleting Cortex data merely because another application filled the filesystem.
Operational commands:
cortex db status
cortex db integrity
cortex db checkpoint
cortex db backup --help
cortex db vacuum --helpMaintenance operations, including synchronous and background integrity checks, share one process-wide single-flight gate and are separately limited from heavy read queries. Concurrent attempts return a retryable busy response.
Deployment and distribution
Current identities
Artifact | Current identity |
Canonical source repository |
|
Native binary and CLI |
|
npm launcher |
|
MCP Registry server name |
|
Published OCI image |
|
The source repository and its published artifacts both live under the dinglebear-ai organization. The legacy jmagar namespace is retired: scripts/check-public-identity.sh fails the build on any tracked file that reintroduces it, and the release workflow derives the MCP Registry OCI identifier from the same REGISTRY/IMAGE_NAME it pushes to, so the two cannot drift apart again.
Container images published before the move remain readable under the legacy namespace for older pinned deployments, but nothing new is pushed there.
Native and npm
The repository ships Linux x86_64 and Windows x86_64 release installers.
The npm launcher supports
linux/x64andwin32/x64and verifies release checksums.Source builds use Rust edition 2024 and the current stable toolchain in CI.
Docker Compose
The repository includes:
docker-compose.ymlfor a local build from the checkoutdocker-compose.prod.ymlfor the published imageconfig/Dockerfilefor a non-root Debian runtime image
Manual Compose deployment expects an external Docker network named cortex unless DOCKER_NETWORK overrides it:
docker network inspect cortex >/dev/null 2>&1 || docker network create cortex
cp .env.example .env
bash scripts/prepare-compose-dirs.sh
docker compose up -d
curl -fsS http://127.0.0.1:3100/healthThe preflight resolves the /backups bind with Docker Compose's own parser and
creates the default or CORTEX_BACKUP_DIR override at mode 0700. Compose is
configured not to create this host path implicitly, preventing root-owned or
overly permissive backup directories.
The Compose files:
Publish syslog on UDP/TCP 1514
Publish HTTP to host loopback by default
Persist the database in a stable named volume or configured bind mount
Run as a non-root UID/GID
Mount inventory SSH credentials and workspace data read-only
Mount a dedicated file-tail root read-only
Use a 2 GiB default memory limit, configurable per host
Include a health check and bounded container logs
For managed installation and repair:
cortex setup check
cortex setup repairHost agents
Cortex includes setup and runtime support for satellite collection, including:
Heartbeat agents
Docker stream agents
AI-session watch services and timers
Shell-history forwarding
Agent-command forwarding
Completion and debug wrappers
Use cortex setup --help, cortex ingest --help, and cortex heartbeat --help for the exact platform-specific command tree.
Operations
Common operator commands:
# Health and diagnostics
cortex status
cortex doctor
cortex doctor binary
# Managed setup
cortex setup check
cortex setup repair
# Database operations
cortex db status
cortex db integrity
cortex db checkpoint
cortex db backup --help
cortex db vacuum --help
# Compose lifecycle
cortex compose status
cortex compose doctor
cortex compose pull
cortex compose up
cortex compose restart
cortex compose logs
# Collection and inventory
cortex ingest inventory status --json
cortex ingest inventory refresh --json
cortex ingest filetail list
cortex sessions doctor
# Updates and configuration
cortex update --help
cortex config list
cortex completions zshThe daemon exposes minimal and full health responses, records database maintenance jobs, reports projection and collector degradation, and surfaces ingest queue and write-block state through CLI, REST, and MCP.
Development and verification
Tooling
The repository uses:
Rust edition 2024
misefor pinned development toolsjustfor common workflowscargo-nextestfor the hermetic Rust suitecargo-llvm-covfor coveragecargo-denyfor dependency policyLefthook and
cargo xtaskfor local release and pre-push checksA custom soldr-backed Rust compiler wrapper for fast local and CI builds
Common commands
mise install
just dev
just build
just check
just lint
just fmt
just test
just test-doc
just coverage
just coverage-html
just test-live
just validate-plugin
cargo xtask pre-pushjust test-live (also just live-smoke) is the canonical fail-closed pull-request subset. It exercises real HTTP JSON-RPC, UDP and TCP syslog ingest, CLI/REST behavior, browser routes, and managed file-tail behavior in a run-owned topology. Run just live-mcp for every registered MCP action; the scheduled aggregate combines all authoritative owner profiles. Specialist profiles are documented in the live qualification guide. Docker collection has separate agent-deployment tests and a mocked Docker HTTP fixture for central pull.
CI gates include:
Formatting
Clippy with warnings denied
Nextest and doctests
Version and distribution identity synchronization
MCP integration
npm launcher checks
Secret scanning
cargo-denyCoverage generation
Repository module-size policy
See tests/TEST_COVERAGE.md and docs/RELEASE.md for the split between hermetic CI and live-fleet verification.
Documentation
The code-owned registries and runtime schemas are authoritative for command names, actions, routes, scopes, defaults, and validation. Human documentation explains how to operate those surfaces.
Document | Purpose |
Documentation index and authority map | |
Installation and deployment walkthrough | |
Complete configuration reference | |
CLI reference | |
REST API reference | |
Runtime and data-flow architecture | |
MCP action and parameter schema | |
Prompt catalog | |
Consolidated trust model | |
OAuth configuration | |
Component and surface inventory | |
Release and verification gates | |
Release history |
Design plans, runbooks, and session logs under docs/plans, docs/runbooks, and docs/sessions are valuable engineering history, but they are not the source of truth for the current public interface.
Current boundaries
Cortex is intentionally opinionated:
It is a single-node SQLite service, not a distributed ingestion cluster.
OTLP support is logs-over-HTTP only. Traces, metrics, and OTLP/gRPC are outside the current implementation.
Syslog does not authenticate senders. Network and CIDR controls matter.
The graph is derived evidence, not authoritative configuration state.
MCP and REST expose bounded operations, not arbitrary SQL or unaudited log mutation.
LLM-backed assessments are local-only and require an operator-controlled Gemini environment.
Central Docker pull requires privileged read access to Docker endpoints and is disabled by default.
Inventory quality depends on collector access, SSH trust, optional API credentials, and cache freshness.
The bundled browser app is an investigation workspace preview, not a full monitoring dashboard.
Cortex is built for a homelab or small trusted fleet. Internet-facing or multi-tenant deployment requires additional isolation and policy outside the binary.
License
Original Dinglebear-authored portions of this project are licensed under AGPL-3.0-only. Separate commercial licensing is available for organizations that need terms outside the AGPL. Third-party material remains under its original license. See LICENSING.md.
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.
Related MCP Connectors
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
Monitoring for small teams. Logs, traces, metrics, live issue tracking, API/MCP uptime.
Define, ship & query your analytics tracking from one source of truth, trusted by humans and agents.
Privacy-first work tracking with summaries, reports, coaching, and AI-ready long-term memory.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceCaptures and stores console output from any process in SQLite with full-text search, enabling AI assistants to search logs, monitor errors, and analyze multi-process activity through natural language queries.
- AlicenseNot gradedqualityAmaintenanceA terminal live-tail and a browser dashboard — one process, one event stream, served from localhost. Unified timeline across Claude Code, Codex, Gemini CLI, Cursor, Hermes, and OpenClaw. Token + cost accounting, compaction + anomaly detection, hybrid search, SVG call graphs, monaco-style diff attribution, agent-aware replay ("what would the agent say if I edited the prompt?"), policy editor, MCP s1314MIT
- AlicenseNot gradedqualityDmaintenanceAnalyzes log files locally using Ollama and files structured GitHub Issues automatically, with all processing kept on your machine.1MIT
- AlicenseNot gradedqualityBmaintenanceIndexes and searches agent conversation logs from Antigravity and Cursor workspaces, enabling semantic search, token analysis, and benchmarking over local SQLite storage.19MIT
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/dinglebear-ai/cortex'
If you have feedback or need assistance with the MCP directory API, please join our Discord server