npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

thinking-memory-bank

v0.1.2

Published

MCP server integrating RooCode Memory Bank pattern with Sequential Thinking

Readme

Thinking Memory Bank MCP Server

A custom MCP server that combines the 'RooCode Memory Bank' pattern with the 'Sequential Thinking' methodology to provide structured context persistence with dynamic reasoning capabilities.

Overview

The Thinking Memory Bank MCP server is a specialized implementation that integrates two powerful paradigms:

  1. RooCode Memory Bank: A structured approach to maintaining project context across sessions using specialized Markdown files organized in a consistent structure.

  2. Sequential Thinking: A step-by-step reasoning methodology that breaks down complex problems into manageable thoughts that can be revised, branched, and extended dynamically.

By combining these approaches, the server provides AI assistants with:

  • Persistent context storage organized in a structured format
  • Reasoning capabilities that can leverage and update this context
  • Specialized tools for initializing, updating, and querying memory
  • Integration of sequential thinking with memory operations

Installation

For Users

Once published to npm, install via npx (no installation required):

npx thinking-memory-bank

For Development

# Clone the repository
git clone https://github.com/herdeybayor/thinking-memory-bank.git
cd thinking-memory-bank

# Install dependencies
npm install

# Build the project
npm run build

Publishing to npm

If you want to publish your own version, see PUBLISHING.md for a complete guide.

Usage

Starting the Server

The MCP server can be started using the following command:

npm start

This will launch the server on stdio, ready to receive MCP protocol messages.

MCP Tool Usage

The server provides the following MCP tools:

Initialize Memory Bank

Creates the memory bank structure for a new project:

{
  "toolName": "initialize_memory_bank",
  "params": {
    "projectName": "My Project",
    "projectDescription": "A description of my project",
    "initialContext": "Additional context information"
  }
}

Update Memory

Updates a specific memory file with new information:

{
  "toolName": "update_memory",
  "params": {
    "memoryType": "activeContext",
    "content": "New information to add",
    "operation": "append",
    "reason": "Adding current session goals"
  }
}

Query Memory

Retrieves relevant information from memory:

{
  "toolName": "query_memory",
  "params": {
    "query": "What are the project goals?",
    "memoryTypes": ["productContext", "activeContext"]
  }
}

Sequential Thinking

Performs a step in a sequential thinking process with optional memory integration:

{
  "toolName": "sequential_thinking",
  "params": {
    "thought": "First, we need to understand the requirements...",
    "thoughtNumber": 1,
    "totalThoughts": 5,
    "nextThoughtNeeded": true,
    "contextQuery": "What are the current requirements?",
    "updateMemory": true
  }
}

Architecture

The Thinking Memory Bank combines several components:

┌─────────────────────────┐
│   MCP Server Interface  │
└───────────┬─────────────┘
            │
            ▼
┌─────────────────────────┐
│      Tool Handlers      │
└───────┬───────────┬─────┘
        │           │
        ▼           ▼
┌───────────┐  ┌───────────┐
│  Memory   │  │ Thinking  │
│  Manager  │  │  Engine   │
└───────────┘  └───────────┘

Memory Bank Structure

The memory bank is organized with the following files:

  • activeContext.md: Current session state and goals
  • productContext.md: Overall project knowledge and context
  • decisionLog.md: Record of decisions and their rationale
  • progress.md: Documentation of completed work and future tasks
  • systemPatterns.md: Recurring patterns and standards in the project

Memory Operations

Three operations are supported for memory updates:

  • Append: Add new content to the end of a file
  • Replace: Completely replace a file's content
  • Merge: Intelligently update specific sections of a file

Development

Project Structure

src/
├── index.ts              # Main entry point
├── memory/               # Memory management
│   ├── memory-manager.ts # Memory file operations
│   └── memory-manager.test.ts
├── thinking/             # Sequential thinking
│   └── thinking-engine.ts
├── tools/                # MCP tool definitions
│   ├── tool-definitions.ts
│   ├── tool-handlers.ts
│   └── tool-handlers.test.ts
├── types/                # Type definitions
│   └── memory.ts
└── mcp/                  # MCP server implementation
    └── mock-mcp-sdk.ts   # Mock SDK implementation

Testing

Run the test suite with:

npm test

References

This project is based on the following:

Using with Roo Code

The Thinking Memory Bank MCP server is designed to integrate smoothly with Roo Code. Here's how to set it up:

1. Configuration in VS Code

Add the following to your VS Code mcp.json configuration file:

Option A: Using Published npm Package (Recommended)

{
  "servers": {
    "thinking-memory-bank": {
      "command": "npx",
      "args": ["-y", "thinking-memory-bank"]
    }
  }
}

Option B: Using Local Development Version

{
  "servers": {
    "thinking-memory-bank": {
      "command": "node",
      "args": ["/absolute/path/to/thinking-memory-bank/dist/index.js"]
    }
  }
}

You can open this file through:

  • Command Palette (Ctrl+Shift+P) → "MCP: Open User Configuration"
  • Or add it to .vscode/mcp.json in your workspace

2. Interacting with Memory Bank in Roo Code

Once configured, you can use the Memory Bank tools within your Roo Code conversations:

Initializing a Memory Bank

When starting a new project:

I'd like to initialize a memory bank for this project. It's a React application for managing inventory.

Roo will use the initialize_memory_bank tool to create the memory structure.

Updating Memory

To explicitly update memory with specific information:

Please update our project context with this information: The application needs to support both desktop and mobile views, with responsive design principles.

Retrieving Context

To have Roo utilize previously stored knowledge:

What were our design decisions regarding the state management approach?

Roo will use the query_memory tool to retrieve this information.

Sequential Thinking with Memory

For complex problems requiring step-by-step analysis:

Let's work through how to implement the authentication flow, considering the security requirements we established earlier.

Roo will combine sequential thinking with memory queries to provide context-aware reasoning.

3. Memory Bank Maintenance

You can explicitly manage the memory bank with commands like:

UMB (Update Memory Bank) - Used to manually trigger memory updates
Review memory - View the contents of specific memory files

4. Best Practices

  • Initialize the memory bank at the start of a project
  • Periodically review memory contents to ensure accuracy
  • Use explicit memory update requests for crucial information
  • Let sequential thinking handle routine updates automatically

License

MIT