MemKernel
Persistent, branchable project memory for coding agents.
Save a decision in one session and retrieve it in the next. Give cooperating agents working on the same project a shared place for decisions, findings, and blockers.
MemKernel runs locally with Python, SQLite, and MCP. Agents explicitly save and retrieve memory through tools; it does not automatically import their chat histories.
Install · Choose your agent · Try it · Integration guide · Technical reference
0.3.1 reliability review: 29 reproduced failure cases fixed, 30 regression cases added, and 189 tests passing in each of two local Python/MCP environments. Existing token savings are preserved. See the before/after scorecard and limits, changelog, and proposed capability roadmap.
Experimental: start with a disposable project. Keep secrets and personal data out of memory, and review what agents save. Memory is untrusted input, not authority.
Install
Python 3.11–3.14 is supported; 3.14 is recommended. Install the agent app you want to use and sign in to it first.
With uv, install MemKernel in its own isolated Python environment:
uv tool install --python 3.14 memkernel-mcp
Alternatively, use pipx install memkernel-mcp, or pip install memkernel-mcp
inside an existing virtual environment.
Use the package name memkernel-mcp. The separate memkernel package on PyPI
belongs to another author. Do not install both into the same environment.
Connect your agent
Run the command for your agent from your project's root directory. You can connect one agent or several; you do not need to install all of them.
Codex desktop, CLI, and IDE extension
memkernel attach codex
This updates ~/.codex/config.toml, shared by the local desktop app, CLI, and IDE
extension on the same computer. The connection is global; each project discovers
its own local memory database. Restart the desktop app or start a new CLI/IDE session
after attaching.
In the CLI, codex mcp list checks registration; /mcp in an interactive session
shows active servers. In a new project chat, ask Codex to call
memkernel_query_state to check the live connection.
Claude Code
memkernel attach claude-code
This writes the project's .mcp.json. Restart Claude Code in that project and
approve the MemKernel server if prompted. Use /mcp to check that it is connected.
Repeat the attach step for other projects.
Cursor
memkernel attach cursor
This writes .cursor/mcp.json in the project. Open that project in Cursor, enable
MemKernel in Cursor's MCP settings, and start a new agent chat. Repeat the attach
step for other projects.
Antigravity
memkernel attach antigravity
This updates Antigravity's MCP configuration under ~/.gemini/. Refresh its MCP
servers or restart the app. The configuration is global and discovers memory per
project. For config locations and headless permissions, see the
integration guide.
Several agents at once
memkernel attach claude-code cursor codex
Use memkernel attach all to include Antigravity. Each agent runs its own server;
agents pointed at the same project database share memory on that computer.
Other MCP clients and Python agents
Other clients that support local stdio MCP servers can launch
memkernel serve. Give each client a distinct MEMKERNEL_AGENT_ID, and ensure
its working directory is the project root or set an explicit MEMKERNEL_DB.
For JSON/TOML examples, absolute interpreter paths, and the in-process Python API, see manual configuration.
Check the connection
From the project root, run:
memkernel doctor
This checks the local database, its hash chain, a real MCP server startup, and agent configurations. Missing agents are reported as not attached; you only need the ones you use. Then inspect saved memory with:
memkernel status
attach preserves other MCP entries, backs up existing global configs, creates
.memkernel/, and adds it to .gitignore when the project root contains .git.
Preview changes with memkernel attach codex --dry-run.
Cold start troubleshooting: Codex gets a 120-second startup timeout from
attach. For a slow Claude Code startup, see the
timeout instructions.
Try it in two sessions
In a disposable project, ask your connected agent:
Use MemKernel to remember this project decision: our test fixtures use SQLite because they must run offline. Save it with the key
test.database.
Start a new chat in the same project and ask:
Query MemKernel. What database do our test fixtures use, and why?
The second session should retrieve the saved decision without the first chat's
history. Run memkernel status to inspect what was actually stored. A different
connected agent can query the same database on that computer too.
What it gives you
| Capability | What it means in practice |
|---|---|
| Persistent decisions | Keep a decision and its rationale available across sessions. |
| Memory branches | Explore an investigation separately and compare it with main. |
| Rollback | Undo an investigation's memory changes while retaining audit history. Your code files are unaffected. |
| Context compaction | Condense recorded history into bounded snapshots while preserving folded state. |
| Local coordination | Cooperating agents can lease resources and share blockers. Leases do not prevent direct file edits. |
How it works
flowchart LR
agents["Coding agents"] -->|"MCP tools"| servers["MemKernel server per agent"]
servers --> memory[("Project-local SQLite memory")]
memory --> recall["Decisions · branches · context"]
Memory lives at <project>/.memkernel/memkernel.db. With discovery enabled,
MemKernel finds the nearest parent containing .memkernel/ or .git.
Keep the database on a local disk and out of version control.
Coordination notices and signed folder exchange
Separate laptops keep separate databases. Optional signed folder exchange shares coordination notices, such as "I'm working on authentication", through an operator-managed folder. It is off unless configured and requires no hosted MemKernel service.
It does not sync full memories, decisions, branch history, leases, or fencing tokens. Direct LAN memory sync is not currently available. See team setup and recovery and the notice reference.
Safety and trust boundary
MemKernel is experimental software. Local agent identities are self-asserted, and agents with filesystem access can read or modify local data. Treat stored and imported text as untrusted input.
Leases coordinate cooperating agents; they do not lock source files. Signed notices authenticate configured peers but do not encrypt notice contents or enforce distributed locks. Use OS permissions, keep backups, and review sensitive actions independently.
Read the full trust boundary and read-only setup before using shared or sensitive projects.
Results
The repository includes recorded live-agent runs and reproducible benchmarks. The recorded workflow covers coordination, decisions, branching, rollback, and later recall.
See verified client versions for the distinction between live runs and configuration-only coverage.
Documentation
- Agent integrations and troubleshooting
- MCP tools, architecture, concepts, and benchmark details
- Signed team coordination, backups, and recovery
- Whitepaper
Development
From a source checkout, create a virtual environment and install development dependencies:
uv venv
uv pip install -e ".[dev]"
uv run pytest
See the examples for local simulations that need no agent subscription.
Limitations
- Local SQLite coordination runs on one host; network filesystems are unsupported.
- Cross-machine exchange covers signed notices, not complete memory.
- Branch conflicts need an agent or human decision; there is no automatic merge.
- Resource leases are advisory for filesystem edits.
- Experimental software with no enterprise security certification.
License
MIT.
Metadata
Release files for memkernel-mcp 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| memkernel_mcp-0.3.1.tar.gz | 67.1 kB | With provenance | Details for memkernel_mcp-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| memkernel_mcp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for memkernel_mcp-0.3.1-py3-none-any.whl |
Total release size: 139.5 kB
Release files / memkernel_mcp-0.3.1.tar.gz
| Download URL | memkernel_mcp-0.3.1.tar.gz |
|---|---|
| Size | 67.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd024e302c44a482e9cdc23693e2fd8cb6d685c4a735423579edf424635ba943
|
|
BLAKE2b-256 checksum How to use checksums |
25d8c73f36d4697b3358905492184543d88b1286939cb0b0463583536635efb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logRelease files / memkernel_mcp-0.3.1-py3-none-any.whl
| Download URL | memkernel_mcp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 72.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0aa3f7d7c80cd14582c642e6cf6663a96aa63f60a0c1bba29e07bec39470fbb
|
|
BLAKE2b-256 checksum How to use checksums |
50da59365aa665f8b912307868f25d0a8c47143541b5f46f116321fd61266127
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logSecurity for memkernel-mcp 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for memkernel_mcp-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.