Skip to main content

DevMemory

PyPI version License: MIT Python 3.11+ MCP

Persistent memory for AI agents. Every session starts where the last one ended.

What is DevMemory?

DevMemory is a long-term memory layer for AI coding agents, delivered via MCP. It lets Claude Code, Cursor, Windsurf, Codex, and any MCP-compatible agent remember decisions, lessons, and context across sessions — so they never start from zero.

Your AI agent stores memories as it works. Next session — same agent or a different one — it recalls what matters. No copy-pasting, no re-explaining.

The Killer Scenario

Session 1 — Claude Code, Monday afternoon:

You: "Let's use Qdrant for vector storage in this project."

Agent calls memory_store:
  content: "Architecture decision: using Qdrant for vector storage.
            Reason: cloud migration path + strong Python SDK."
  memory_type: "decision"

Session 2 — Cursor, Tuesday morning:

You: "What vector DB are we using?"

Agent calls memory_recall:
  query: "vector database choice"

→ Returns: "[DECISION] Architecture decision: using Qdrant for vector storage.
   Reason: cloud migration path + strong Python SDK.
   Project: my-app | Date: 2026-04-02"

Cross-agent, cross-session, zero friction.

Quick Start

# Install
pip install devmemory

# Initialize
devmemory init

# Set up your API key (for embeddings)
export PORTKEY_API_KEY=pk-...

# Auto-configure Claude Code (one command)
devmemory setup claude-code --write

# Done. Your agent now has persistent memory.

For other tools:

devmemory setup cursor --write
devmemory setup windsurf --write
devmemory setup codex --write

MCP Tools Reference

DevMemory exposes 6 tools via MCP that AI agents call automatically:

Agent Memory (Tier 1)

Tool Description
memory_store Store a memory — decisions, lessons, preferences, TODOs, notes. Accepts content, memory_type, tags, importance.
memory_recall Recall relevant memories via semantic search. Filter by project, memory_type, date range.
memory_forget Find and archive outdated memories. Preview first, then confirm to remove.

Project Context (Tier 2)

Tool Description
context_get Get a structured summary of everything DevMemory knows about the current project. Call at session start.
context_handoff Create a handoff note before ending a session — what was done, what's left, warnings for next session.

Knowledge Base (Tier 3)

Tool Description
knowledge_search Search ingested documents and code. Returns raw entries with source paths and relevance scores.

CLI Reference

Command Description
devmemory init Initialize config and data directory
devmemory memory store <content> Store a memory from the command line
devmemory memory list List stored memories
devmemory memory recall <query> Recall memories matching a query
devmemory memory forget <query> Find and remove outdated memories
devmemory context show Show project context summary
devmemory context handoff <summary> Create a session handoff note
devmemory setup claude-code Generate MCP config for Claude Code
devmemory setup cursor Generate MCP config for Cursor
devmemory setup windsurf Generate MCP config for Windsurf
devmemory setup codex Generate MCP config for Codex CLI
devmemory ingest <path> Ingest files into the knowledge base
devmemory ask <query> Ask a question (AI-synthesized answer)
devmemory search <query> Search the knowledge base
devmemory serve Start the MCP server

How It Works

┌─────────────────────────────────────────────────────────┐
│                   AI Agent Layer                        │
│                                                         │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌────────┐ │
│  │ Claude   │  │ Cursor   │  │ Windsurf │  │ Codex  │ │
│  │ Code     │  │          │  │          │  │        │ │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘  └───┬────┘ │
│       └──────────────┴──────────────┴──────────────┘    │
│                          │ MCP                          │
├──────────────────────────┴──────────────────────────────┤
│                  DevMemory MCP Server                   │
│                                                         │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────┐ │
│  │  Memory     │  │  Context    │  │  Knowledge      │ │
│  │  store      │  │  get        │  │  search         │ │
│  │  recall     │  │  handoff    │  │  ingest         │ │
│  │  forget     │  │             │  │                 │ │
│  └──────┬──────┘  └──────┬──────┘  └────────┬────────┘ │
│         └────────────────┴──────────────────┘           │
│                          │                              │
├──────────────────────────┴──────────────────────────────┤
│                    Storage Layer                        │
│                                                         │
│  ┌─────────────┐  ┌──────────────┐  ┌───────────────┐  │
│  │  Qdrant     │  │  SQLite      │  │  Git-aware    │  │
│  │  (semantic  │  │  (metadata,  │  │  project      │  │
│  │   vectors)  │  │   temporal)  │  │  scoping      │  │
│  └─────────────┘  └──────────────┘  └───────────────┘  │
└─────────────────────────────────────────────────────────┘

All data is stored locally in ~/.devmemory/. Memories are embedded for semantic search (Qdrant) and indexed temporally (SQLite). Projects are auto-detected from git.

Why DevMemory?

Without DevMemory With DevMemory
Every AI session starts from scratch Sessions resume where they left off
You re-explain decisions every time Agent recalls past decisions automatically
Context lost when switching tools Claude Code and Cursor share the same memory
No continuity between sessions Handoff notes ensure nothing is forgotten
Manual CLAUDE.md / .cursorrules maintenance Agent writes its own memories as it works

Pricing

Tier Price Includes
Free $0 3 projects, 1,000 memories, local storage
Pro $12/mo Unlimited projects & memories, cloud sync, cross-device
Team $29/mo/seat Shared team memory, permissions, onboarding

Documentation

License

MIT

Metadata

Release files for devmemory-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for devmemory-mcp 0.2.0
File Size Uploaded Provenance Actions
devmemory_mcp-0.2.0.tar.gz 263.2 kB Without provenance Details for devmemory_mcp-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for devmemory-mcp 0.2.0
File Interpreter ABI Platform Actions
devmemory_mcp-0.2.0-py3-none-any.whl Python 3 none any Details for devmemory_mcp-0.2.0-py3-none-any.whl

Total release size: 337.8 kB

Release files / devmemory_mcp-0.2.0.tar.gz

Download URL devmemory_mcp-0.2.0.tar.gz
Size 263.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a78114c70102543b8ea1be8770894fd3077a23564458d85d703e8723acb1e2b5
BLAKE2b-256 checksum
How to use checksums
0a9a451a27647a005335c8bae75e9aa6559c9e1b7787ecc71b649267040fc6be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / devmemory_mcp-0.2.0-py3-none-any.whl

Download URL devmemory_mcp-0.2.0-py3-none-any.whl
Size 74.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5994ef4b95ff120d0caad7e5a4f9f9518ea2de37ee8511c6d9c54925c2a33875
BLAKE2b-256 checksum
How to use checksums
c9967fa856d480746f995fe681784b7271cce4dac170d9705bda2e38c6a46e60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for devmemory-mcp 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page