cortex-engine MCP
A persistent memory MCP server for agents: observations, beliefs, goals and dream consolidation across 60 tools.
- 51 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The server stores everything the agent writes and talks to embedding providers.
- REST mode exposes an API, protected by `CORTEX_API_TOKEN` when checks are enabled.
Install
- Works in
Manual install
npm install @fozikio/cortex-engineThe first README command. Then `npx fozikio init my-agent` and `npx fozikio serve`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The server stores everything the agent writes and talks to embedding providers.
- REST mode exposes an API, protected by `CORTEX_API_TOKEN` when checks are enabled.
This is third-party code. Review the repository files before installing.
What it does
cortex-engine gives agents memory that survives sessions, models and runtimes. Knowledge is stored as linked nodes: observations, beliefs, questions and hypotheses. Beliefs update when new evidence contradicts them. A goal set through `goal_set` creates a desired state and biases consolidation and retrieval toward what matters. Consolidation runs in two phases modeled on sleep stages: NREM compression clusters and refines nodes, and REM integration connects, scores and abstracts. Retrieval uses spreading activation over the graph. It includes FSRS spaced repetition, pluggable embedding providers and graph health metrics. The server speaks MCP to any client, supports several agents with isolated namespaces and ships as an npm package and a cloud service.
Who it is for. Agent developers who need long-term memory with a knowledge structure instead of a message log.
Good fit when
- An agent must remember conclusions across sessions and update beliefs on new evidence.
- Several agents need separate memory namespaces on one server.
- You need background consolidation of accumulated observations.
- An agent needs a goal that guides retrieval and remembering.
Not a fit when
- You need a plain notes file with no server.
- Data cannot be stored in an external store.
- You need a ready dashboard, which the package does not include.
Example request
Set up a cortex workspace for my agent, start the server and store a first observation about the project in memory.MCP
- Transport
- stdio, http
- Authentication
- not required
Environment variables
CORTEX_API_TOKENsecret- Token that protects requests in REST mode.
Limitations
The package installs 60 memory tools and the server uses embedding providers that may need external keys. No dashboard ships: it was bundled through 1.2.1 and then stopped, and the REST server serves any built page when `public/index.html` exists. With checks enabled through `CORTEX_API_TOKEN` API requests need a token. Memory holds whatever the agent writes, so restrict access to storage and do not record secrets. Part of the description relies on neuroscience analogies, and behavior and metrics matter in practice.
How to disable. Remove the server entry from the client MCP configuration and stop `npx fozikio serve`. Uninstall the package through your package manager and clear the memory store separately.
FAQ
How do I start the server?
Run `npm install @fozikio/cortex-engine`, `npx fozikio init my-agent`, change into the directory and start `npx fozikio serve`.
How do I add a second agent?
Run `npx fozikio agent add researcher --description "Research agent"`, then `npx fozikio agent generate-mcp`. Each agent gets isolated memory.
Can the agent set it up?
Yes. Open an agent in an empty directory and ask it to set up a cortex workspace: it runs `npx fozikio init` itself.
Is there a dashboard?
No. It was bundled through 1.2.1 and is no longer published. The REST server serves any page of yours from `public/index.html`.
What is consolidation?
A two-phase background pass: NREM compresses nodes into clusters and REM connects them and extracts abstractions.
Discussion
No questions or reviews yet.
Related
MCP serversSelf-hosted long-term memory for agents: semantic search, a knowledge graph and autonomous consolidation over MCP and a REST API
A self-hosted MCP server for long-term agent memory: structured records, versioned rollback and a visual dashboard
An MCP server and API of shared memory for several agents: facts, decisions and events live in one database with semantic search.
A self-hosted MCP memory server that keeps preferences and decisions across conversations in Claude Code, Cursor and other clients
An MCP server for long-term agent memory: compresses dialogues into atomic facts, resolves pronouns and anchors relative time to absolute dates
BrainAPI turns text into a knowledge graph on your server and serves agents over MCP, REST and a console with fact-path answers
README in short
The project describes the memory layer, beliefs, consolidation and graph metrics, plus quick start, multi-agent mode and REST. The server is not tied to one model.