# cognicore-env [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/cognicore-dev/cognicore-env  
**GitHub Stars:** 89  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/cognicore-env

## Description
Persistent memory, reflection & safety for AI agents. Zero dependencies — no vector DB, no embedding server. BM25 + multi-hop graph retrieval. MCP server with 10 tools.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "cognicore-env": {
    "command": "uvx",
    "args": ["--from","cognicore-env[mcp]==0.13.0","cognicore-mcp"]
  }
}
```

## Documentation

## What cognicore-env does

cognicore-env provides local-first session memory for AI coding agents. It records structured handoffs containing a session goal, current state, unresolved tasks, decisions, facts, exact values, and edited file paths. A later session can use that information to reconstruct what happened and identify the next action.

The server is designed for handoffs between Claude Code and Codex, while its MCP interface can also be used from Cursor, VS Code, Cline, Windsurf, and other compatible clients. It does not require a vector database, an embedding service, or a model API key for its default operation. Retrieval combines BM25 text search with multi-hop graph retrieval.

## How it works

Claude Code and Codex can install CogniCore hooks that capture relevant information when a coding session ends. At the next startup, a hook creates a brief from the saved project memory, with a default budget of 700 tokens. The agent can then call `cognicore_recall` to retrieve details that were not included in that brief.

Local memory is stored in SQLite below `~/.cognicore/mcp`. Sessions are grouped by Git repository, including repository subfolders and linked worktrees. Outside a repository, the session's starting directory determines the group. Detected secrets are redacted before handoffs are stored or synchronized.

Project-level context can be maintained in `.cognicore/context.md`. The CLI supports recording goals, decisions, and rules there, reviewing captured project suggestions, and accepting selected suggestions into the file. Historical ChatGPT exports can also be imported into a local archive for searching, timeline views, and tracing decisions to source messages.

## Setup and configuration

Install Python 3.10 or newer, then install the package with:

```bash
pipx install "cognicore-env[mcp]"
cognicore install
```

The installer configures the hooks for Claude Code or Codex. Use `cognicore install --agent codex` for a Codex-only setup, or `cognicore install --dry-run` to preview changes. A `uv` installation is also supported with `uv tool install "cognicore-env[mcp]"`.

For MCP-only use in Claude Code, register the local process with `uvx` and `cognicore-mcp`. Cursor, VS Code, Cline, and Windsurf require client-specific MCP configuration; those local configurations use `uvx` and keep memory on the machine. The hosted connector is available at `https://mcp.cognicoree.tech/mcp/stream` for compatible clients.

Optional account login enables synchronization with the hosted service. `cognicore sync status` reports the connection, while `cognicore sync` performs a manual sync. Optional AI compression can be enabled with `COGNICORE_AI_COMPRESS=auto`; it sends the handoff to Anthropic using the user's credentials.

## Tools and capabilities

- Capture session handoffs through Claude Code or Codex hooks.
- Generate startup briefs for resumed project work.
- Recall omitted session details with `cognicore_recall`.
- Search imported ChatGPT conversations and view project timelines.
- Store project goals, decisions, and rules in `.cognicore/context.md`.
- Synchronize redacted handoffs and imported history through the hosted account.

## Limitations and notes

Local mode stores memory on the current machine and sends nothing off-device. Hosted MCP usage sends requests to the hosted connector, while optional local synchronization sends redacted handoffs and the project path to the hosted service. Conversation transcripts, tool output, file contents, and model reasoning are not included in the local session store.

The automatic capture and resume workflow depends on installing the Claude Code or Codex hooks. Connecting only the MCP server provides the memory tools but not that automatic workflow. The hosted connector and history synchronization are optional and require account sign-in or explicit consent where indicated. A read-only session viewer can be opened with `python -m cognicore.memory.viewer` from an environment where CogniCore is installed.

_Full upstream README: https://allmcps.com/mcp/cognicore-env/readme_

