惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
WordPress大学
WordPress大学
爱范儿
爱范儿
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
罗磊的独立博客
博客园_首页
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
MyScale Blog
MyScale Blog
IT之家
IT之家
H
Help Net Security
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
人人都是产品经理
人人都是产品经理

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I Built Persistent Memory for AI Coding Assistants — Here...
Nikhil tiwar · 2026-05-11 · via DEV Community

Every time you open a new AI chat, your assistant forgets everything. I fixed that.

The Problem

If you use Cursor, Claude Code, or Amazon Q regularly, you've probably hit this wall:

You explain your project architecture in Monday's chat. On Tuesday, you open a new session and start from scratch. You paste the same context, re-explain the same patterns, and re-describe the same service boundaries — every single time.

This isn't a minor inconvenience.

For large codebases, every AI interaction starts with 10 minutes of context-loading before you can ask anything useful. For teams, every developer builds their own mental model of the codebase in isolation, while the AI assistant knows none of it.

I've been building production systems on Azure for several years — .NET microservices, KEDA autoscaling, Azure Service Bus pipelines. Our codebase has 40+ services, clean architecture patterns, vendor integration handlers, and years of architectural decisions that live entirely in people's heads.

Every time I opened a new AI chat, I was manually transferring that knowledge into a chat window.

So I built Mnemo.


What Mnemo Does

Mnemo is a local MCP (Model Context Protocol) server that gives AI coding assistants persistent, structured knowledge about your codebase.

One command initializes it.

After that, every AI chat automatically knows:

  • Your project's architecture and patterns
  • Your API endpoints
  • Your engineering decisions
  • Who owns which part of the codebase
  • Errors you've already debugged and how you fixed them
  • Incidents, code reviews, and team knowledge

It works with Cursor, Claude Code, Amazon Q, and any MCP-compatible AI client.

The moment a new AI chat session starts, Mnemo automatically loads your project context.

You never paste architecture descriptions again.


How It Works Technically

When you run:

mnemo init

Enter fullscreen mode Exit fullscreen mode

inside your project, several things happen.

1. AST-Based Codebase Parsing

Mnemo parses your codebase using real language parsers — not regex or grep.

  • C# → Roslyn
  • Pythonast
  • TypeScript → TypeScript Compiler API

This allows Mnemo to understand:

  • Method signatures
  • Class hierarchies
  • Interface implementations
  • Dependency relationships

From this, it builds a compact repo map — a structured representation of your codebase shape.

Not the full source code.

Just the architecture-level understanding required for AI context.


2. Architecture Detection

Mnemo scans the codebase for structural signals:

  • Common handler inheritance
  • IRepository<T> patterns
  • Command/query separation
  • Event-driven conventions
  • DI registration styles

Using these signals, it classifies your architecture automatically:

  • Clean Architecture
  • CQRS
  • Event-Driven
  • Hexagonal
  • Repository Pattern
  • Handler Pattern

This becomes part of the persistent project memory.


3. MCP Server Initialization

Mnemo launches a local MCP server process that exposes tools AI assistants can call.

At the start of each AI chat session, the assistant calls:

mnemo_recall

Enter fullscreen mode Exit fullscreen mode

Mnemo then returns a structured context payload containing:

  • Repo map
  • Architecture profile
  • Recent engineering decisions
  • Error/debug history
  • Current task context

Everything is stored locally inside:

.mnemo/

Enter fullscreen mode Exit fullscreen mode

Currently:

  • JSON files store structured memory
  • A vector store powers semantic search

No source code leaves your machine.


Why MCP Matters

MCP (Model Context Protocol) is an open protocol from Anthropic that standardizes how AI assistants connect to tools and external context.

Think of it like USB for AI tooling.

Instead of every AI platform building proprietary integrations:

  • Any MCP server can provide tools
  • Any MCP-compatible AI client can consume them

Mnemo implements MCP, meaning it works across:

  • Cursor
  • Claude Code
  • Amazon Q
  • Kiro
  • Other MCP-compatible tools

Mnemo isn't tied to a single AI assistant.

It's an intelligence layer that upgrades all of them.


What the AI Actually Sees

When the assistant calls mnemo_recall, it receives structured project context like this:

## Project Context
Architecture: Clean Architecture + CQRS
Patterns: Repository (9 interfaces), Handler pattern (12 handlers), DI container

## Decisions
- Use handler pattern for vendor-specific logic
- Auth service uses cache-aside with 5min TTL

## Repo Map
PaymentService/Handlers/
  - StripeHandler
  - PayPalHandler
  - SquareHandler

AuthService/Services/
  - TokenService : ITokenService

Enter fullscreen mode Exit fullscreen mode

With this context loaded, the AI understands:

  • How the codebase is structured
  • Which patterns are expected
  • Existing architectural conventions
  • Historical engineering decisions

So when you ask:

"Add a new payment handler"

The generated implementation:

  • Inherits from BasePaymentHandler
  • Follows existing conventions
  • Registers correctly in DI
  • Matches existing architecture

Without Mnemo, most assistants generate generic code that doesn't fit the system design at all.


Installation

Option A: VS Code Extension (Easiest)

  1. Install the Mnemo extension from the VS Code Marketplace
  2. Open a project
  3. Click "Initialize Mnemo?"

Done.

The extension automatically:

  • Downloads the Mnemo binary
  • Initializes the repository
  • Configures MCP

No Python required.


Option B: Homebrew (macOS/Linux)

brew tap Mnemo-mcp/tap
brew install mnemo

Enter fullscreen mode Exit fullscreen mode

Then:

cd your-project
mnemo init

Enter fullscreen mode Exit fullscreen mode


Option C: pip (All Platforms)

pip install mnemo

Enter fullscreen mode Exit fullscreen mode

Or from source:

git clone https://github.com/Mnemo-mcp/Mnemo.git
cd Mnemo
pip install -e .

Enter fullscreen mode Exit fullscreen mode

Then:

cd your-project
mnemo init

Enter fullscreen mode Exit fullscreen mode


Final Thoughts

Mnemo started as a solution to a frustrating problem:

AI assistants forget everything between sessions.

For small projects, that's annoying.

For large production systems, it's a major productivity bottleneck.

Mnemo gives AI coding assistants persistent architectural memory, allowing them to operate with real understanding of your codebase instead of stateless guesses.

I'd love feedback — especially from teams managing large, distributed systems.

What project context do you find yourself re-explaining most often?