Provides shared memory for AI agent fleets by consolidating session data into a knowledge graph and injecting relevant context into every prompt.
Also known as gamaze-labs/hicortex, hicortex, @gamaze/hicortex
- Stars
- 3
- Tools
- —
- Downloads, 30 days
- 2,444
- Latest version
- 0.27.1
- Last commit
- Nov 13, 2026
- License
- —
What is Hicortex MCP?
Hicortex provides shared memory for AI agent fleets by consolidating session data into a knowledge graph and injecting relevant context into every prompt.
Summary generated from the project's README
About Hicortex MCP server
Hicortex provides a shared memory layer for AI agent fleets, allowing different tools to access a unified knowledge graph. It is designed for developers using MCP-compatible agents like Claude Code, Hermes, OpenClaw, Pi, and OpenCode. By consolidating session data into a central brain, the system ensures that what one agent learns is immediately available to the entire fleet across different projects and machines.
The server operates with a local-first approach where raw sessions stay on the machine, while only distilled memory is stored. It uses a nightly process to denoise sessions, extract learnings, and update the knowledge graph. Users can set up a local daemon using npx @gamaze/hicortex init or connect multiple thin clients to a shared remote server. The system requires one configurable LLM, such as Ollama, the Claude CLI, or an OpenAI-compatible API, to handle nightly consolidation.
Instead of requiring manual retrieval, the server pushes a compact recall index into every prompt. This method avoids extra LLM calls or API costs during active turns. It utilizes nine specific MCP tools, including hicortex_search, hicortex_get, and hicortex_lessons, to manage and query the memory store.
What you can do with it
- 1Synchronize knowledge across agent fleetsEnsure that multiple different AI agents share the same learned context and decisions.
- 2Automate context injection for coding agentsProvide relevant session history and corrections to an agent without manual copy-pasting.
- 3Maintain a clean long-term memoryAutomatically remove stale facts and merge duplicate information during nightly updates.
- 4Visualize memory relationshipsExamine how different memories and domains are connected through a knowledge graph.
Written from the project's README. Every use case is checked against a quote from it.
How to install Hicortex MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Hicortex MCP in Claude Code
$ claude mcp add --env 'HICORTEX_AUTH_TOKEN=<YOUR_HICORTEX_AUTH_TOKEN>' hicortex -- npx -y @gamaze/hicortexInstall Hicortex MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"hicortex": {
"command": "npx",
"args": [
"-y",
"@gamaze/hicortex"
],
"env": {
"HICORTEX_AUTH_TOKEN": "<YOUR_HICORTEX_AUTH_TOKEN>"
}
}
}
}Install Hicortex MCP in VS Code
.vscode/mcp.json
{
"servers": {
"hicortex": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@gamaze/hicortex"
],
"env": {
"HICORTEX_AUTH_TOKEN": "<YOUR_HICORTEX_AUTH_TOKEN>"
}
}
}
}Install Hicortex MCP in VS Code CLI
$ code --add-mcp '{"name":"hicortex","type":"stdio","command":"npx","args":["-y","@gamaze/hicortex"],"env":{"HICORTEX_AUTH_TOKEN":"<YOUR_HICORTEX_AUTH_TOKEN>"}}'Install Hicortex MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"hicortex": {
"command": "npx",
"args": [
"-y",
"@gamaze/hicortex"
],
"env": {
"HICORTEX_AUTH_TOKEN": "<YOUR_HICORTEX_AUTH_TOKEN>"
}
}
}
}Install Hicortex MCP in Codex
$ codex mcp add hicortex --env 'HICORTEX_AUTH_TOKEN=<YOUR_HICORTEX_AUTH_TOKEN>' -- npx -y @gamaze/hicortexInstall Hicortex MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.hicortex] command = "npx" args = ["-y", "@gamaze/hicortex"] [mcp_servers.hicortex.env] HICORTEX_AUTH_TOKEN = "<YOUR_HICORTEX_AUTH_TOKEN>"
Install Hicortex MCP in Gemini CLI
$ gemini mcp add -s user -e 'HICORTEX_AUTH_TOKEN=<YOUR_HICORTEX_AUTH_TOKEN>' hicortex npx -- -y @gamaze/hicortexInstall Hicortex MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"hicortex": {
"command": "npx",
"args": [
"-y",
"@gamaze/hicortex"
],
"env": {
"HICORTEX_AUTH_TOKEN": "<YOUR_HICORTEX_AUTH_TOKEN>"
}
}
}
}Configuration
HICORTEX_AUTH_TOKENSecretBearer token for a remote Hicortex server (server prints it via `hicortex status`). Optional — a local server needs no token.
HICORTEX_SERVER_URLURL of a remote Hicortex server (e.g. https://your-server:8787). Optional — omit for a local server on this machine.
| Name | Description | |
|---|---|---|
| HICORTEX_AUTH_TOKEN | Bearer token for a remote Hicortex server (server prints it via `hicortex status`). Optional — a local server needs no token. | Secret |
| HICORTEX_SERVER_URL | URL of a remote Hicortex server (e.g. https://your-server:8787). Optional — omit for a local server on this machine. |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work · What to fix for more points
- Source repository linked and reachablegamaze-labs/hicortex is public and reachablegithub.com/gamaze-labs/hicortex ↗Pass
- Package names this repository as its source@gamaze/hicortex names gamaze-labs/hicortex as sourcenpmjs.com/package/@gamaze/hicortex ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)No licenseFinding
- Commit or release in the last yearLast commit or release 2026-11-13github.com/gamaze-labs/hicortex ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @gamaze/hicortexPass
- No critical advisory in the package or its dependenciesthe package checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubHicortex — AI Fleet Memory
Shared memory for AI agents — it corrects itself overnight, and what one agent learns, the whole fleet knows. One memory across every agent, every project, every machine — they stop assuming and start knowing.
- One brain, every harness — Claude Code, Hermes, OpenClaw, Pi, OpenCode, and any MCP-compatible agent share the same memory.
- Pushed, not pulled — in every supported coding agent, a compact recall index is injected on every prompt, so the decisions, corrections, and context an agent needs are already in front of it. No re-explaining, no copy-paste, nothing to maintain. Zero LLM calls per turn — no API cost or rate-limit hit from recall.
- Consolidates overnight — each night it reads the day's sessions, distills what matters, and turns it into Learnings, links, and a knowledge graph.
- Local-first — raw sessions never leave the machine; only distilled memory is stored.
Install
npx @gamaze/hicortex init
Claude Desktop: one "yes" during init.
Auto-detects your environment, configures one LLM (Ollama, the Claude CLI, or an API key), installs a local daemon (launchd on macOS, systemd on Linux), and registers MCP tools with Claude Code.
For multi-machine setups, point thin clients at a shared server — no local DB or LLM on the clients:
npx @gamaze/hicortex init --server https://your-server.example.com
init auto-detects the other harnesses and installs their clients: a Pi extension (~/.pi/agent/extensions/hicortex.ts — pushed recall, identity + lessons, the ten tools; or copy pi-extension/hicortex/index.ts there manually), an OpenCode plugin (~/.config/opencode/plugins/hicortex.ts — the same trio; or copy opencode-plugin/hicortex/index.ts there manually), the Hermes plugin, and the OpenClaw plugin. pi-mcp-adapter remains a generic MCP escape hatch for any harness (verified against the SSE endpoint) — Pi no longer needs it. See the install docs.
How it works
CAPTURE (nightly) CONSOLIDATE (nightly) RECALL (every prompt)
sessions → denoise score · reflect · link a compact index of
→ POST /distill decay · dedup · supersede relevant memories is
(one model, all phases) pushed into the prompt
→ full text lazy-loaded
Memories strengthen when agents use them, fade when they don't, and link to related ones automatically. Retrieval is hybrid BM25 + vector search — zero-LLM at query time.
The first nightly run captures the last 7 days of sessions by default (not your entire history) — run hicortex nightly --recapture-window <days> once to import more.
Features
- Per-prompt recall push — relevant memory lands in context every turn; the agent fetches full content with
hicortex_getonly when it needs it. - Memory analytics at
/dashboard— growth, recall adoption, and a nightly digest of what was learned. - Knowledge graph at
/viz— memories clustered by domain, connected by relationship edges. - Domains & tags — multi-tag classification with a configurable vocabulary; your categories drift with your data.
- Learnings from reflection — nightly reflection extracts general, reusable Learnings, not just Experience logs.
- Self-correcting store — every night, stale facts are rewritten in place with dated provenance; near-duplicates resolve into one (verbatim copies kept free, merges recoverable); superseded decisions are demoted, never re-surfaced. No zombie memory.
- Unprompted by design — coding agents get recall injected via hooks; instruction-capable clients (Claude Desktop, Cursor-class) get standing instructions, so memory is used without being asked. Plain MCP clients keep full search.
- Self-calibrating — recall, decay and merge boundaries report their own statistics; tuning is measured, never guessed.
- Standing context layer — hand-edited "who you are / how to work" Markdown, injected every session, never decayed.
MCP
Nine MCP tools — hicortex_search, hicortex_get, hicortex_recent, hicortex_ingest, hicortex_lessons, hicortex_index, hicortex_graph, hicortex_update, hicortex_delete — plus a /learn skill to save explicit learnings. Full reference →
Stack
TypeScript · Node.js 20+ · SQLite + sqlite-vec + FTS5 (semantic + full-text in one DB) · ONNX embeddings (bge-small-en, CPU) · MCP over HTTP/SSE · one configurable LLM (Ollama, Claude CLI, or any OpenAI-compatible endpoint).
Development
git clone https://github.com/gamaze-labs/hicortex.git
cd hicortex
AGENTS.md at the repository root defines the machine-checkable verification contract. "Done" means the full command chain exits with code 0. The contract mirrors what CI runs. Contributors — human or agent — run it before claiming work complete.
Contributions welcome — see CONTRIBUTING.md.
Links
- Website: hicortex.gamaze.com
- Docs: hicortex.gamaze.com/docs
- Changelog: CHANGELOG.md
- npm: @gamaze/hicortex
- Issues: gamaze-labs/hicortex/issues
- Security: SECURITY.md
License
Personal and noncommercial use is free under the PolyForm Noncommercial License 1.0.0. Commercial use requires a per-seat license — see hicortex.gamaze.com.
Hicortex MCP questions
How do I add Hicortex MCP to Claude Code?
Run claude mcp add --env 'HICORTEX_AUTH_TOKEN=<YOUR_HICORTEX_AUTH_TOKEN>' hicortex -- npx -y @gamaze/hicortex in your terminal. Add --scope user to make it available in every project.
How do I add Hicortex MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
Does using Hicortex increase my LLM API costs?
No, the recall mechanism is designed to require zero LLM calls per turn, avoiding extra API costs or rate limits.
Is my data kept private?
Yes, the system is local-first, meaning raw sessions never leave your machine; only distilled memory is stored.
What AI agents are supported?
It supports Claude Code, Hermes, OpenClaw, Pi, OpenCode, and any other MCP-compatible agent.