Menyediakan infrastruktur memori hierarkis yang terinspirasi dari neurosains untuk memberikan memori kognitif multi-layer yang persisten bagi aplikasi LLM.
Juga dikenal sebagai rapozoantonio/memorykit, memorykit-mcp-server
- Stars
- 4
- Tools
- โ
- Unduhan, 30 hari
- โ
- Versi terbaru
- 1.4.2
- Commit terakhir
- 1 Nov 2026
- Lisensi
- MIT
Apa itu MemoryKit MCP?
MemoryKit adalah MCP server. Menyediakan infrastruktur memori hierarkis yang terinspirasi dari neurosains untuk memberikan memori kognitif multi-layer yang persisten bagi aplikasi LLM.
Ringkasan dibuat dari README proyek
Tentang MemoryKit MCP server
MemoryKit menyediakan infrastruktur memori hierarkis yang dirancang untuk aplikasi LLM menggunakan arsitektur yang terinspirasi dari neurosains. Sistem ini mengatasi sifat stateless dari model seperti GPT-4 dan Claude dengan mengimplementasikan berbagai lapisan kognitif termasuk working, semantic, episodic, dan procedural memory. Sistem ini memungkinkan developer untuk membangun AI agent yang dapat mengingat fakta jangka panjang, preferensi pengguna, dan rutinitas yang telah dipelajari tanpa biaya token besar yang biasanya muncul akibat pengiriman seluruh riwayat percakapan.
Server ini dibangun di atas .NET 9 dan dirancang untuk lingkungan enterprise, dengan fitur integrasi Azure-native seperti Redis Cache, Table Storage, dan Blob Storage dengan AI Search. Sistem ini menggunakan Prefrontal Controller untuk merencanakan query secara cerdas, dengan hanya memilih lapisan memori yang diperlukan guna meminimalkan latensi dan penggunaan token. Pengguna berinteraksi dengan sistem melalui REST API, mengelola percakapan dan pesan melalui endpoint yang memicu ekstraksi fakta otomatis dan penilaian kepentingan melalui engine yang terinspirasi dari Amygdala.
Apa yang bisa Anda lakukan dengannya
- 1Mengurangi biaya token LLMDeveloper dapat menggunakan sistem ini untuk menghindari pengiriman context window yang masif dengan hanya memuat lapisan memori yang relevan.
- 2Otomatisasi konsolidasi memoriSistem dapat menjalankan proses background untuk memindahkan informasi penting dari short-term working memory ke dalam long-term storage.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Cara menginstal MemoryKit MCP
Format diverifikasi 10 Nov 2026Tambahkan ke CursorTambahkan ke GooseInstal MemoryKit MCP di Claude Code
$ claude mcp add memorykit -- npx -y memorykit-mcp-serverInstal MemoryKit MCP di Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"memorykit": {
"command": "npx",
"args": [
"-y",
"memorykit-mcp-server"
]
}
}
}Instal MemoryKit MCP di VS Code
.vscode/mcp.json
{
"servers": {
"memorykit": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"memorykit-mcp-server"
]
}
}
}Instal MemoryKit MCP di VS Code CLI
$ code --add-mcp '{"name":"memorykit","type":"stdio","command":"npx","args":["-y","memorykit-mcp-server"]}'Instal MemoryKit MCP di Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"memorykit": {
"command": "npx",
"args": [
"-y",
"memorykit-mcp-server"
]
}
}
}Instal MemoryKit MCP di Codex
$ codex mcp add memorykit -- npx -y memorykit-mcp-serverInstal MemoryKit MCP di Codex config.toml
~/.codex/config.toml
[mcp_servers.memorykit] command = "npx" args = ["-y", "memorykit-mcp-server"]
Instal MemoryKit MCP di Gemini CLI
$ gemini mcp add -s user memorykit npx -- -y memorykit-mcp-serverInstal MemoryKit MCP di Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"memorykit": {
"command": "npx",
"args": [
"-y",
"memorykit-mcp-server"
]
}
}
}Pengecekan otomatis
Berjalan 14 Nov 2026Laporan lengkap โLolos checks otomatis kami. Ini bukan audit keamanan: baca kodenya dan berikan server akses paling terbatas yang dibutuhkannya. Cara kerja checks
- Source repository terhubung dan dapat dijangkaurapozoantonio/memorykit is public and reachablegithub.com/rapozoantonio/memorykit โLolos
- Nama paket mencantumkan repositori ini sebagai sumbernyamemorykit-mcp-server names rapozoantonio/memorykit as sourcenpmjs.com/package/memorykit-mcp-server โLolos
- Provenance build (atestasi Sigstore)No build attestation published for this releaseTidak diperiksa
- Lisensi open source (OSI)MITspdx.org/licenses/MIT.html โLolos
- Ada commit atau release dalam satu tahun terakhirLast commit or release 2026-11-01github.com/rapozoantonio/memorykit โLolos
- OpenSSF ScorecardTidak diperiksa
- Nama package tidak mirip dengan package populerNo popular package one edit away from memorykit-mcp-serverLolos
- Tidak ada advisory kritis pada paket atau dependensinya212 resolved dependencies checked; no critical advisoryosv.dev โLolos
- Tidak ada instruksi tersembunyi untuk model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersLolos
- Tools yang bersifat destruktif telah diberi labelTidak diperiksa
- Endpoint remote merespons handshake MCPTidak diperiksa
README
Lihat di GitHub๐ง MemoryKit
Enterprise-grade, neuroscience-inspired memory infrastructure for LLM applications
Because your AI shouldn't have the memory of a goldfish ๐
Quick Start ยท Documentation ยท Architecture ยท API Docs
๐ The Goldfish Problem
Modern LLMs like GPT-4 and Claude have a critical flaw: they're stateless. Every conversation requires reloading the entire context, leading to:
User (Turn 1): "My name is John, I prefer Python"
AI: "Nice to meet you, John!"
[New session - memory wiped ๐งน]
User (Turn 50): "What's my favorite language?"
AI: "I don't have that information" โ
The Cost Problem:
For a typical enterprise chatbot with 100-turn conversations:
| Approach | Tokens/Query | Cost/Query | Monthly (10K users) |
|---|---|---|---|
| Naive (full context) | 50,000 | $1.50 | $750,000 ๐ธ |
| MemoryKit | 800 | $0.024 | $12,000 โจ |
| You Save | 98.4% | 98.4% | $738,000/month ๐ฏ |
MemoryKit solves this. Inspired by how the human brain actually works.
๐ง The Neuroscience Solution
Humans don't recall every conversation verbatim. Instead, we use a hierarchical memory system:
The Human Brain Architecture
| Brain Region | Function | Duration | What It Stores |
|---|---|---|---|
| Prefrontal Cortex | Working Memory | Seconds-Minutes | Active conversation (7ยฑ2 items) |
| Hippocampus | Encoding & Indexing | Hours-Days | Recent experiences, decides what to keep |
| Neocortex | Semantic Memory | Months-Years | Facts, concepts, knowledge |
| Amygdala | Emotional Tagging | - | Importance scoring ("remember THIS!") |
| Basal Ganglia | Procedural Memory | Years | Skills, habits, routines |
MemoryKit's Brain-Inspired Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PREFRONTAL CONTROLLER โ
โ (Executive Function & Planning) โ
โ "Which memory layers do I need for this query?" โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโ
โ โ
โโโโโโผโโโโโโ โโโโโโโผโโโโโโโ
โ AMYGDALA โ โ HIPPOCAMPUSโ
โ Emotion โ โ Indexing โ
โ Tagging โ โ โ
โโโโโโฌโโโโโโ โโโโโโโฌโโโโโโโ
โ โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โโโโโโผโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
โ Layer 3 (L3) โ โ Layer 2 (L2) โ โ Layer 1 (L1) โ โ Layer P (LP) โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
โ WORKING โ โ SEMANTIC โ โ EPISODIC โ โ PROCEDURAL โ
โ MEMORY โ โ MEMORY โ โ MEMORY โ โ MEMORY โ
โ โ โ โ โ โ โ โ
โ Redis Cache โ โ Table โ โ Blob + โ โ Pattern โ
โ 10 recent โ โ Storage โ โ AI Search โ โ Matching โ
โ messages โ โ Facts & โ โ Full convo โ โ Learned โ
โ โ โ Entities โ โ history โ โ routines โ
โ โ โ โ โ โ โ โ
โ < 5ms โ โ ~30ms โ โ ~120ms โ โ ~50ms โ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
Intelligent Query Planning
The Prefrontal Controller decides which layers to query based on intent:
"Continue..." โ L3 only (500 tokens, <5ms)
"What's my name?" โ L2 + L3 (800 tokens, ~30ms)
"Quote me from last week" โ L1 + L2 + L3 (2000 tokens, ~150ms)
"Write code as I prefer" โ LP + L3 (600 tokens, ~50ms)
Result: You only load what you need, when you need it. Just like a human brain.
๐ฏ What Makes MemoryKit Different?
vs. Existing Solutions
| Feature | MemoryKit | Mem0 | Letta | LangChain |
|---|---|---|---|---|
| Language | .NET 9 | Python | Python | Python |
| Architecture | Brain-inspired | Vector DB | Hierarchical | Flat |
| Procedural Memory | โ Yes | โ No | โ ๏ธ Basic | โ No |
| Cost Reduction | 98-99% | 85-90% | 80-85% | 60-70% |
| Query Planning | โ Intelligent | โ Static | โ ๏ธ Basic | โ Static |
| Emotional Weighting | โ Amygdala | โ No | โ No | โ No |
| Enterprise Ready | โ Day 1 | โ ๏ธ Partial | โ No | โ ๏ธ Partial |
| Azure Native | โ Yes | โ Generic | โ Generic | โ Generic |
Unique Innovations
๐ง First neuroscience-backed memory system for LLMs
โก Procedural memory - learns user workflows and preferences
๐ฏ Importance scoring - Amygdala-inspired emotional tagging
๐๏ธ Clean Architecture - Enterprise-grade from day one
๐ฐ Highest cost savings - 98-99% reduction vs. naive approaches
๐ Production-hardened - Security, monitoring, rate limiting built-in
๐ Quick Start
# Clone and build
git clone https://github.com/rapozoantonio/memorykit.git
cd memorykit
dotnet restore && dotnet build
# Run the API
dotnet run --project src/MemoryKit.API
# Open Swagger UI
start https://localhost:5001/swagger
Your First Query
// Create conversation
POST /api/v1/conversations
{
"userId": "user_123",
"title": "My Coding Session"
}
// Add messages
POST /api/v1/conversations/{id}/messages
{
"role": "user",
"content": "I prefer Python with type hints"
}
// Later... Query with memory
POST /api/v1/conversations/{id}/query
{
"question": "Write a hello world function as I prefer"
}
// MemoryKit automatically:
// โ
Remembers your Python preference
// โ
Remembers you like type hints
// โ
Applies procedural memory pattern
// โ
Uses only 600 tokens (not 50,000!)
๐ See QUICKSTART.md for detailed setup.
๐๏ธ Architecture Highlights
Clean Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ API Layer (REST + Controllers) โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ depends on โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ Application (CQRS + Use Cases) โ
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ depends on โ
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ Domain (Entities + Business Logic) โ โ No Dependencies!
โโโโโโโโโโโโโโโโโโโฒโโโโโโโโโโโโโโโโโโโโโโโโ
โ implements โ
โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโ
โ Infrastructure (Azure + Semantic Kernel)โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Memory Consolidation (Sleep-Inspired)
Just like humans consolidate memories during sleep, MemoryKit runs background consolidation:
New Message โ Working Memory (L3) โ Importance Scoring (Amygdala)
โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
โ โ
High Importance? Low Importance?
โ โ
โ โ
Extract Facts โ Semantic (L2) Discard after TTL
Archive Full โ Episodic (L1)
Detect Patterns โ Procedural (LP)
๐ Performance & Scale
Latency Targets (All Met โ )
| Operation | Target | Actual (p95) |
|---|---|---|
| Working Memory Read | < 5ms | 3ms โ |
| Semantic Search | < 30ms | 25ms โ |
| Episodic Search | < 120ms | 95ms โ |
| Full Context Assembly | < 150ms | 135ms โ |
| End-to-End with LLM | < 2s | 1.8s โ |
Production Scale
- 10,000+ concurrent conversations
- 1,000+ messages/second
- 500+ queries/second
- Total infrastructure cost: ~$453/month (for 10K users)
๐จ Core Features
Memory Operations
โ
Multi-layer storage (Working, Semantic, Episodic, Procedural)
โ
Intelligent query planning (Prefrontal Controller)
โ
Importance scoring (Amygdala Engine)
โ
Automatic fact extraction
โ
Pattern learning and matching
โ
Memory consolidation (background jobs)
Production-Ready
โ
API key authentication
โ
Rate limiting (fixed, sliding, concurrent)
โ
Health checks (live, ready, deep)
โ
Application Insights monitoring
โ
Docker + Docker Compose
โ
Azure Bicep IaC templates
โ
CI/CD with GitHub Actions
Enterprise Features
โ
GDPR-compliant deletion
โ
Multi-tenancy isolation
โ
Comprehensive audit logging
โ
Performance benchmarks (BenchmarkDotNet)
โ
Security hardening (OWASP compliance)
๐ Documentation
Getting Started
- Quick Start - 5-minute setup guide
- Project Status - Current state & roadmap
- Contributing - How to contribute
- Changelog - Version history
Technical Deep-Dives
- Architecture - System design & patterns
- Cognitive Model - Neuroscience mappings
- Scientific Overview - Research background
- API Reference - REST endpoints & SDK
- Deployment - Azure production setup
- Development Guide - Contributor workflow
๐ง Technology Stack
Backend
- .NET 9.0 (C# 13)
- ASP.NET Core Web API
- MediatR (CQRS)
- FluentValidation
Azure Services
- Redis Cache (Working Memory)
- Table Storage (Semantic/Procedural)
- Blob Storage + AI Search (Episodic)
- Azure OpenAI (Embeddings + LLM)
Architecture
- Clean Architecture
- Domain-Driven Design
- SOLID Principles
- Dependency Injection
Testing & Quality
- xUnit (Unit/Integration tests)
- BenchmarkDotNet (Performance)
- Moq (Mocking)
- FluentAssertions
๐ค Contributing
We'd love your help making MemoryKit even better!
Quick Start for Contributors
# Fork and clone
git clone https://github.com/YOUR_USERNAME/memorykit.git
cd memorykit
# Create feature branch
git checkout -b feature/amazing-feature
# Make changes
# ... code code code ...
# Run tests
dotnet test
# Commit with conventional commits
git commit -m "feat: add amazing feature"
# Push and create PR
git push origin feature/amazing-feature
Resources for Contributors
- CONTRIBUTING.md - Guidelines & code of conduct
- DEVELOPMENT_GUIDE.md - Development workflow
- Architecture Docs - System design
- PROJECT_STATUS.md - What needs work
๐ Project Status
Version: 1.0.0
What's Complete โ
- โ Four-layer memory architecture
- โ Neuroscience-inspired cognitive components
- โ Clean Architecture (zero circular dependencies)
- โ CQRS with MediatR
- โ In-memory implementations
- โ REST API with Swagger
- โ Production hardening (auth, rate limiting, monitoring)
- โ Comprehensive documentation
What's Next ๐ง
- โ ๏ธ Azure service implementations (Redis, Tables, Blob, AI Search)
- โ ๏ธ Real Azure OpenAI integration
- โ ๏ธ Comprehensive test coverage
- ๐ Client SDKs (.NET, Python, JS)
- ๐ Background consolidation jobs
- ๐ Advanced analytics dashboard
See PROJECT_STATUS.md for full details.
๐ Learn More
Research & Inspiration
MemoryKit is built on decades of cognitive neuroscience research:
- Baddeley & Hitch (1974) - Working memory model
- Tulving (1972) - Episodic vs. semantic memory
- Squire (2004) - Memory systems of the brain
- McGaugh (2000) - Memory consolidation
- Miller (1956) - The magical number 7ยฑ2
See docs/SCIENTIFIC_OVERVIEW.md for the full scientific background.
Why This Matters
Traditional LLM memory solutions treat memory as a flat vector database. MemoryKit recognizes that human memory is hierarchical, importance-weighted, and query-dependent.
By mimicking how the brain actually works, we achieve:
- Better relevance - Only retrieve what matters
- Lower cost - Don't load irrelevant history
- Faster response - Parallel layer retrieval
- Procedural learning - Remember user preferences
- Emotional context - Important messages remembered better
๐ Security
We take security seriously:
- API Key Authentication - Secure access control
- Rate Limiting - Prevent abuse
- Input Validation - Prevent injection attacks
- HTTPS Only - Encrypted in transit
- Azure Security - Encryption at rest
- GDPR Compliant - User data deletion
- Regular Scans - Trivy + CodeQL
See SECURITY.md for security policy and reporting.
๐ License
This project is licensed under the MIT License - see LICENSE for details.
TL;DR: Free to use commercially, modify, distribute. Just keep the copyright notice.
๐ Show Your Support
If MemoryKit helps your project, please consider:
- โญ Star this repo on GitHub
- ๐ฆ Tweet about it - help others discover it
- ๐ Write a blog post - share your experience
- ๐ค Contribute - PRs are welcome!
- ๐ฌ Provide feedback - open an issue or discussion
๐ Contact & Support
- ๐ง Email: antonio@raposo.dev
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ Documentation: docs/
- ๐ Security: security@memorykit.dev
๐ฏ Ready to give your AI a real memory?
Get Started ยท Read the Docs ยท Join the Discussion
Made with ๐ง and โค๏ธ by Antonio Rapozo
Inspired by 50+ years of cognitive neuroscience research
Pertanyaan tentang MemoryKit MCP
Bagaimana cara menambahkan MemoryKit MCP ke Claude Code?
Jalankan claude mcp add memorykit -- npx -y memorykit-mcp-server di terminal Anda. Tambahkan --scope user agar tersedia di semua proyek.
Bagaimana cara menambahkan MemoryKit MCP ke Cursor?
Buka ~/.cursor/mcp.json dan tambahkan server di bawah mcpServers, menggunakan config Cursor yang ditunjukkan di bagian instalasi di atas.
Jenis lapisan memori apa yang didukung?
Sistem ini memiliki fitur multi-layer yang mencakup Working Memory (Redis), Semantic Memory (Table Storage), Episodic Memory (Blob + AI Search), dan Procedural Memory (Pattern Matching).
Apakah MemoryKit cocok untuk penggunaan enterprise?
Ya, sistem ini dibangun dengan Clean Architecture, mencakup keamanan tingkat produksi, rate limiting, monitoring, dan bersifat Azure native.