Skip to main content
Glama
dazeb

Cline Memory Bank

by dazeb

Cline Memory Bank

Inspired by roo-code-memory-bank

This project is still in development but is mostly working.

A Model Context Protocol server that provides persistent project context management for AI-assisted development - specifically designed to work with Cline VSCode Extenson.

Table of Contents

Related MCP server: MCP Python Toolbox

Overview

The Memory Bank MCP server helps maintain consistent project context across development sessions by providing structured tools and resources for managing:

  • Project context and technical details

  • Current session state and tasks

  • Progress tracking and milestones

  • Technical decisions and rationale

graph LR
    VSCode[VS Code + Cline] --> MemBank[Memory Bank Server]
    MemBank --> Files[Markdown Files]
    Files --> Context[Project Context]
    Files --> Progress[Progress Tracking]
    Files --> Decisions[Decision Log]
    AI[AI Assistant] --> Files
    VSCode --> AI
    AI --> MemBank

Persistent Memory System

One of the most powerful features of this project is its ability to maintain context across different coding sessions. Think of it as giving your AI assistant a "memory" that doesn't forget what you've been working on, even when you close VSCode and come back later.

How It Works

Imagine you're working on a complex project that spans multiple days or weeks. Normally, each time you start a new coding session, you'd need to re-explain your project's context to the AI assistant. With the Memory Bank:

graph LR
    Session[New Session] --> Load[Load Context]
    Load --> Read[Read Files]
    Read --> Update[Update Context]
    Update --> Write[Write Changes]
    Write --> Track[Track Progress]
    Track --> Record[Record Decisions]
    Record --> Ready[Ready for Tasks]
  • Your AI assistant remembers previous discussions and decisions

  • Maintains understanding of your project's architecture and goals

  • Keeps track of ongoing tasks and progress

  • Remembers your coding preferences and project conventions

Key Benefits

  1. Continuity Across Sessions

    • No need to re-explain your project every time

    • Pick up exactly where you left off

    • Maintains consistent understanding of your codebase

  2. Smart Context Management

    • Automatically tracks important technical decisions

    • Records project progress and milestones

    • Maintains documentation of your development journey

  3. Enhanced Productivity

    • Faster project onboarding for each session

    • More consistent and contextual AI assistance

    • Reduces repetitive explanations

  4. Project History

    • Keeps track of why certain decisions were made

    • Maintains a log of completed features and changes

    • Helps new team members understand project evolution

The Memory Bank seamlessly integrates with the Cline VSCode Extension, requiring no additional setup from you once configured. It works quietly in the background, ensuring your AI assistant always has the context it needs to provide relevant and helpful assistance.

Installation

Prerequisites

  • Node.js (v16 or later)

  • VS Code with Cline extension installed

  • TypeScript (for development)

Setup Steps

  1. Clone and build the server:

# Clone the repository
git clone https://github.com/dazeb/cline-mcp-memory-bank
cd cline-mcp-memory-bank

# Install dependencies (using pnpm as recommended)
pnpm install

# Build the server
pnpm run build

# Make globally available (optional, requires pnpm setup for global linking)
# pnpm link --global 
  1. Configure Cline Extension (Recommended: Use Initialization Command):

    Recommended Method: After building, run the initialization command from the project root. This automatically creates the memory bank files and configures the Cline MCP settings for you:

    node build/index.js initialize_memory_bank . 

    Manual Method (If needed): Add the following to your Cline MCP settings file. The path varies by OS:

    • Linux: ~/.config/Code - Insiders/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

    • macOS: ~/Library/Application Support/Code - Insiders/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

    • Windows: %APPDATA%\Code - Insiders\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

    Add this JSON object:

{
  "mcpServers": {
    "memory-bank": {
      "command": "node",
      "args": [
        "/path/to/cline-memory-bank/build/index.js"
      ],
      "disabled": false,
      "autoApprove": []
    }
  }
}

Replace /path/to/cline-memory-bank with the actual, absolute path to your server installation (e.g., C:\Users\YourUser\Projects\cline-mcp-memory-bank on Windows). Note: Using the initialization command above handles this automatically.

Features

Tools

After installation and building, initialize the memory bank for your project by running this command in the project's root directory:

node /path/to/cline-mcp-memory-bank/build/index.js initialize_memory_bank .

(Replace /path/to/cline-mcp-memory-bank with the actual path where you cloned and built the server).

Alternatively, if the server is configured in Cline, you can ask Cline to run the tool: initialize the memory bank.

Once initialized, you can ask Cline to update the memory bank context, record decisions, or track progress using the tools below, or configure it via .clinerules or the system prompt.

  1. initialize_memory_bank

    • Creates Memory Bank structure for a new project

    • Creates required markdown files with initial templates

    use_mcp_tool('memory-bank', 'initialize_memory_bank', {
      projectPath: '/path/to/project'
    });
  2. update_context

    • Updates active context with current session information

    • Tracks mode, tasks, and session state

    use_mcp_tool('memory-bank', 'update_context', {
      projectPath: '/path/to/project',
      content: {
        currentSession: {
          date: '2025-03-13',
          mode: 'development',
          task: 'Implementing new feature'
        }
      }
    });
  3. record_decision

    • Records technical decisions with rationale

    • Maintains history of architectural choices

    use_mcp_tool('memory-bank', 'record_decision', {
      projectPath: '/path/to/project',
      decision: {
        title: 'Authentication System',
        description: 'Implementing JWT-based authentication',
        rationale: 'Better scalability and stateless operation',
        alternatives: [
          'Session-based auth',
          'OAuth only'
        ]
      }
    });
  4. track_progress

    • Updates project progress and milestones

    • Manages task status and blockers

    use_mcp_tool('memory-bank', 'track_progress', {
      projectPath: '/path/to/project',
      progress: {
        completed: ['Setup project', 'Initialize database'],
        inProgress: ['Implement auth', 'Create API routes'],
        blocked: ['Deploy to production']
      }
    });

Resources

  1. memory://project/context

    • Project overview and technical stack

    • Architecture principles and guidelines

  2. memory://active/context

    • Current session state and tasks

    • Active considerations and notes

  3. memory://progress

    • Project milestones and task tracking

    • Work status and blockers

  4. memory://decisions

    • Technical decisions and rationale

    • Architecture choices and alternatives

System Prompt Suggestion

Add to Cline system prompt or .clinerules file under settings.

Memory Bank Integration Rules:

CRITICAL: Before ANY task or response:
1. ALWAYS check active context (memory://active/context):
   - Current project state and mode
   - Ongoing tasks and their status
   - Recent decisions and updates
   - Open questions and concerns

2. ALWAYS review project context (memory://project/context):
   - Technical stack and dependencies
   - Project guidelines and standards
   - Architecture principles
   - Development workflow

3. ALWAYS consult decision log (memory://decisions) for:
   - Previous architectural choices
   - Established patterns
   - Technical rationales
   - Related decisions

4. ALWAYS check progress tracking (memory://progress):
   - Current phase and milestones
   - Completed work
   - In-progress tasks
   - Known blockers

After EVERY task:
1. Update active context with:
   - Task completion status
   - New information learned
   - Changes made

2. Record any technical decisions with:
   - Clear rationale
   - Considered alternatives
   - Impact assessment

3. Update progress tracking:
   - Mark completed items
   - Add new tasks identified
   - Note any blockers found

Key Guidelines:
- NEVER proceed without checking memory bank context
- ALWAYS maintain consistent project state
- Record ALL significant technical decisions
- Track progress in real-time
- Keep context updated with EVERY change

File Structure

When initialized, the Memory Bank creates the following structure in your project:

graph LR
    Root[Project Root] --> Bank[memory-bank]
    Bank --> PC[projectContext.md]
    Bank --> AC[activeContext.md]
    Bank --> P[progress.md]
    Bank --> DL[decisionLog.md]
    PC --> Stack[Technical Stack]
    AC --> Tasks[Active Tasks]
    P --> Status[Project Status]
    DL --> History[Decision History]

Initial File Contents

Upon initialization, each file is populated with structured content:

  1. activeContext.md:

    • Current session information with timestamp

    • Initial tasks (Project initialization, Environment setup)

    • Open questions about project goals and requirements

    • Recent updates section

  2. progress.md:

    • Current phase (Initialization)

    • Initial completed tasks (Repository setup, Basic structure)

    • In-progress tasks (Environment configuration, Documentation)

    • Upcoming tasks section

    • Blockers tracking

  3. decisionLog.md:

    • Initial project structure decisions

    • Development workflow choices with alternatives

    • Documentation strategy decisions

    • Section for pending decisions

  4. projectContext.md:

    • Project overview and version

    • Detected technical stack and dependencies

    • Configuration files listing

    • Architecture principles

    • Development setup instructions

    • Project workflow guidelines

Using with Cline

graph LR
    Start[Start] --> Init[Initialize]
    Init --> Context[Load Context]
    Context --> Update[Make Changes]
    Update --> Progress[Track Progress]
    Progress --> Record[Record Decisions]
    Record --> Sync[Auto Sync]
    Sync --> Context

Simply ask Cline to initialize the memory bank.

  1. Initialize a new Memory Bank:

    use_mcp_tool('memory-bank', 'initialize_memory_bank', {
      projectPath: process.cwd()  // or specific path
    });
  2. Access project context:

    access_mcp_resource('memory-bank', 'memory://project/context');
  3. Update session context:

    use_mcp_tool('memory-bank', 'update_context', {
      projectPath: process.cwd(),
      content: {
        currentSession: {
          date: new Date().toISOString().split('T')[0],
          mode: 'development',
          task: 'Current task description'
        }
      }
    });
  4. Record technical decisions:

    use_mcp_tool('memory-bank', 'record_decision', {
      projectPath: process.cwd(),
      decision: {
        title: 'Decision Title',
        description: 'What was decided',
        rationale: 'Why it was decided'
      }
    });

Development

To modify or enhance the server:

  1. Update source in src/index.ts

  2. Run tests: npm test

  3. Build: npm run build

  4. Restart Cline extension to load changes

Contributing

Contributions are welcome! Please:

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Submit a pull request

License

MIT © dazeb

Available Tools

4 tools
initialize_memory_bankB

Initialize Memory Bank structure for a project

ParametersJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to project root directory

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits. It only says 'Initialize', which implies a setup operation, but does not mention whether it is destructive (e.g., overwriting existing structures), idempotent, or what files or directories are created. This is insufficient for an agent to understand the side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that directly states the action. Every word adds value, with no unnecessary elaboration. It is appropriately concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description is minimally complete. It explains what the tool does but lacks details about the resulting structure or any constraints. Could benefit from mentioning what exactly is created (e.g., files, folders) to achieve full clarity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter 'projectPath', so the baseline is 3. The description does not add additional meaning beyond the schema, but the parameter is self-explanatory. No enhancement is provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Initialize') and resource ('Memory Bank structure'), making the purpose straightforward. However, it does not differentiate from sibling tools like 'record_decision' or 'update_context', which have distinct purposes, so the score is 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, such as when a project is first set up or after adding a new project root. There are no contextual clues about prerequisites or scenarios where initialization should be avoided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

record_decisionB

Add a new technical decision with rationale and metadata

ParametersJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to project root directory
decisionYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full behavioral disclosure burden. It only states 'Add...' without detailing side effects, permissions, idempotency, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, no fluff, action placed first. Every word serves purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with a nested object parameter and no output schema, the description is too brief. It omits what happens after adding (e.g., persistence, return value) and does not cover edge cases or side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning beyond the input schema. Although the nested 'decision' object has detailed subfield descriptions, the top-level parameter 'decision' lacks a description, and the tool description does not compensate for this gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add') and the resource ('technical decision') with specifics ('rationale and metadata'), distinguishing it from siblings like 'track_progress' or 'initialize_memory_bank'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for recording decisions but provides no explicit guidance on when to use this tool versus alternatives, nor any exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

track_progressC

Update project progress and milestones

ParametersJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to project root directory
progressYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It only says 'Update' but does not disclose whether updates are incremental or replace, side effects, or validation rules. Lacks key behavioral details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with verb and resource. No wasted words, though could be more informative while remaining concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given absence of output schema and annotations, the description should cover more context (e.g., return value, side effects). It is too brief for a tool with nested objects and required parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (only projectPath has a top-level description). The description adds no meaning to parameters; the progress object sub-fields have schema descriptions but not explained in the tool description. Fails to compensate for low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it updates project progress and milestones, which is a specific verb-resource pairing. It distinguishes from sibling tools (e.g., initialize_memory_bank, record_decision) as they target different aspects, but lacks explicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, no context about prerequisites or exclusions. Simply states action without usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_contextB

Update active context with current session information

ParametersJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to project root directory
contentYesCurrent session context to update

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the full burden of disclosing behavioral traits. It only says 'update' but does not explain whether it merges or replaces, what happens to existing context, or any side effects. This is insufficient for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that conveys the core action efficiently. No unnecessary words are present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the nested schema, no output schema, and no annotations, the description lacks completeness. It does not explain the update behavior (merge vs replace), return value, or error conditions, leaving important gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds little beyond what's already in the schema. It mentions 'current session information', which aligns with the content.currentSession object, but doesn't elaborate on parameter formats or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and the resource ('active context') with the specific information ('current session information'). It effectively communicates the tool's purpose and is distinguishable from sibling tools like initialize_memory_bank or record_decision.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like initialize_memory_bank or track_progress. There is no mention of prerequisites or scenarios where the tool should not be used.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a clear, distinct purpose: initialization, decision recording, progress tracking, and context updating with no overlaps.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in lowercase snake_case, making them predictable.

Tool Count5/5

Four tools are well-scoped for a memory bank server, covering essential operations without excess or deficiency.

Completeness4/5

Core memory bank operations are covered, but retrieval and search capabilities are missing, which is a minor gap.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server for Claude Desktop that provides structured memory management across chat sessions, allowing Claude to maintain context and build a knowledge base within project directories.
    22
    6
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.
    9
    MIT
  • F
    license
    B
    quality
    D
    maintenance
    A centralized Model Context Protocol server that provides common development tools (like formatting and translation) across all your Cline projects without needing to install them individually.
    8

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dazeb/cline-mcp-memory-bank'

If you have feedback or need assistance with the MCP directory API, please join our Discord server