Automatically scans for FastAPI to extract API signatures and validate code patterns, helping prevent the reinvention of existing functionality.
Scans for Flask in the environment to extract API signatures and validate code against existing library patterns.
Supports exporting thinking sessions and project indexes to Markdown format for documentation and team collaboration.
Discovers Pydantic in the development environment to extract API signatures and validate data model usage patterns.
Analyzes the Python environment to discover installed packages, extract API signatures, and validate code against existing libraries.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Memory Bank MCPstart a coding session for the payment API and check for existing packages"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ง Memory Bank MCP
A Model Context Protocol (MCP) server for Claude Code that enables persistent memory, structured thinking, team collaboration, and project-based knowledge management โ with full export, revision, and analysis capabilities. Now featuring comprehensive coding integration to prevent package reinvention and enforce existing API usage.
๐ Features
๐ง Core Memory Management
Session-Based Thinking: Start with a problem and track related insights
Persistent Storage: Store and retrieve memories across sessions
Collections: Group related memories with clear purposes
Revision & Dependencies: Refine ideas, track changes and links
๐ป Coding Integration (NEW)
Package Discovery: Auto-scan installed packages and extract API signatures
Reinvention Prevention: Validate code against existing libraries before implementation
Code Pattern Storage: Store and retrieve proven code templates and examples
Coding Sessions: Specialized session types for development workflows
Validation Gates: Catch potential issues and suggest existing solutions
๐ฆ Project & Export System
Export to Markdown/JSON: Full or filtered memory exports
Project Structure Generation: Standardized folders for teams
Project Indexing: Maintain status updates and documentation
Context Loading: Load ongoing work for seamless continuation
๐ Search & Analytics
Tag-Based Search: Find insights by topics or keywords
Importance Scores: Prioritize content using confidence metrics
Session Analysis: Detect contradictions, gaps, and themes
โก Quick Start
Requires Python 3.10+ and uv
๐ Installation Options
Direct run:
uv run main.pyGlobal install:
uv tool install .Development mode:
uv pip install -e .
๐งช Test
๐ง Session Workflow (API Example)
Basic Memory Session
Coding Session with Validation
โ ๏ธ Must start with
create_memory_session()before storing anything.
๐งฉ Session Tools
Core Memory Tools
Tool | Description |
| Start a new thinking session (now supports |
| Save insights with tags and confidence (now supports |
| Update previous memories |
| Group insights |
| Combine collections |
| Run quality checks |
| Export full sessions |
| Export filtered memories |
| Resume prior sessions |
| Document team progress |
๐ป Coding Integration Tools (NEW)
Tool | Description |
| Auto-scan installed packages and extract APIs |
| Validate code against existing packages |
| Find existing APIs for needed functionality |
| Comprehensive reinvention prevention warning |
| Store code patterns with metadata |
| Load project structure into memory |
Enhanced Tools
create_memory_session(): Now acceptssession_typeparameter forcoding_session,debugging_session,architecture_sessionstore_memory(): Now acceptscode_snippet,language,pattern_typeparameters for code integration
๐ป Coding Session Types & Workflows
Session Types
coding_session: General development work with package discovery and validationdebugging_session: Problem-solving focused with enhanced error pattern storagearchitecture_session: System design with emphasis on integration patterns
Validation Workflow
๐ MCP Resources for Coding
Access coding data through these resources:
Resource | Description |
| View discovered packages in session |
| View stored code patterns |
| View validation check history |
Example Usage
๐ Project Structure
Initialize with:
๐งโ๐คโ๐ง Collaboration Patterns
Developer A - Research Phase
Developer B - Implementation Phase
Developer C - Debugging Phase
๐ฅ Error Recovery
Safe export:
๐งโ๐ผ Role-Based Usage
Role | Actions |
Lead |
|
Developer |
|
New Teammate |
|
๐๏ธ Database Schema Extensions
The coding integration adds 4 new tables to the SQLite database:
New Tables
Migration & Compatibility
Automatic Migration: New tables created automatically when first used
Backwards Compatible: Existing sessions continue to work unchanged
Schema Evolution: Database adapts seamlessly to new features
Data Isolation: Coding features are project-specific via session isolation
๐ Best Practices
General Memory Management
Always start with
create_memory_session()Use specific tags for search/export
Run
analyze_memories()before final exportUse collections for structure
Track everything under version control
Coding Integration Best Practices
Start coding sessions with package discovery:
discover_packages()firstCheck for reinvention before coding: Use
prevent_reinvention_check()earlyValidate code patterns: Run
validate_package_usage()before implementationStore proven patterns: Use
store_codebase_pattern()for team knowledge sharingLoad project context: Always
load_codebase_context()when joining existing projectsUse appropriate session types:
coding_sessionfor general developmentdebugging_sessionfor problem-solvingarchitecture_sessionfor system design
Team Workflow
๐งฉ Claude Desktop Integration
๐ License
MIT License
๐ Support
Open an issue on GitHub
Read the usage examples above