Skip to main content

devmcp-context

PyPI version Python License: MIT

devmcp-context logo

Structured AI memory layer. A single source of truth for what your agent knows across conversations.

devmcp-context is a Model Context Protocol (MCP) server that provides persistent, organized memory for AI agents. Your agent's memory is now visible, editable, and searchable - without retraining.

Published on PyPI: https://pypi.org/project/devmcp-context/

The Problem

AI agents are black boxes. You can't see what they remember. When they forget something important or remembers something wrong, you're stuck.

devmcp-context changes this. Your agent's memory is now:

  • Visible - Plain text files in your project folder
  • Editable - Change any entry, agent sees it immediately
  • Structured - Organized into 5 categories with automatic cleanup
  • Persistent - Survives across agent sessions and restarts
  • Recall-first - Memory loads automatically at session start

Installation

pip install devmcp-context

Or with uv:

uv add devmcp-context

Quick Start

cd your-project
devmcp-context init

That's it. This scaffolds ai-context/ and configures your MCP client automatically. Supports opencode, Cursor, and Claude Desktop - auto-detected from your project.

For multiple projects, run init in each project directory. Each gets its own config entry:

cd ~/projects/todo-app && devmcp-context init
cd ~/projects/blog && devmcp-context init

Manual setup (if auto-detection doesn't work):

devmcp-context init --client opencode   # or cursor, claude
devmcp-context init --name my-context   # custom entry name

Features

  • Auto-recall at session start - project + decisions memory loaded automatically, compact index of everything else
  • 5 memory categories (project, decisions, errors, tasks, ephemeral)
  • Outcome tracking - what_worked and what_failed fields for decisions and errors
  • Superseded entries - redirect recall to newer entries instead of deleting history
  • Key fact first - entry summaries lead with the most important line
  • Automatic expiration (TTL) - errors expire in 30 days, tasks in 14
  • Full-text search across all entries
  • Tagging system for organization
  • Persistent file-based storage (no database)
  • Session recall metric - tracks whether memory was used before edits
  • MCP-compliant server

Documentation

Full docs: https://kushal1o1.github.io/devmcp-context/

  • Getting Started guide
  • Installation instructions
  • API Reference (8 tools)
  • Memory categories explained
  • Architecture diagrams (Mermaid)
  • Deployment guide
  • Development guide

Usage Example

In your agent prompt:

Agent calls context_session_start first to load memory.

Use context_save to remember insights:
- save("decisions", "auth_strategy", "Use JWT with refresh tokens",
       tags=["security"],
       what_worked="Stateless, scales horizontally",
       what_failed="Token refresh is complex")

Use context_load to retrieve memories:
- load("decisions")

Use context_search to find specific memories:
- search("JWT")

Use superseded_by to redirect old entries:
- save("decisions", "new-auth", "Switched to OAuth2",
       superseded_by="old-auth")

License

MIT - See LICENSE for details.

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

Metadata

Release files for devmcp-context 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 devmcp-context 0.2.0
File Size Uploaded
devmcp_context-0.2.0.tar.gz 237.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for devmcp-context 0.2.0
File Interpreter ABI Platform
devmcp_context-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 256.5 kB

Release files / devmcp_context-0.2.0.tar.gz

Download URL devmcp_context-0.2.0.tar.gz
Size 237.9 kB
Tags Source
SHA-256 checksum
How to use checksums
aa746d3dc265bd40d7ae2487ef4d4955caba7d96f65bb24cfb02ccf14d2f5494
BLAKE2b-256 checksum
How to use checksums
54c7434b26101ab46db04638b0c51284c0d732ec73ef37ff7fcc4824e8b5e508
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 Sep 11, 2026.

Transparency log

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

Download URL devmcp_context-0.2.0-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f51dc3f8605fde0b6429850ebc43188a2bfa86af70fe3801433cd3e25311a68
BLAKE2b-256 checksum
How to use checksums
b82ee56b2045fa870efa75cd525f2d7d368da33e0a614501fcd561d1d5819e92
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 Sep 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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