mcpField
C
Category-based Memory Server

Category-based Memory Server

Local
github.com/mkusakaMemory & Knowledge1Updated 2d ago

About Category-based Memory Server

Category-based Memory Server is an MCP server for storing persistent, categorized memories that Claude can use across chats. It distinguishes global from project-local storage and keeps entries in plain text.

Key features

  1. 01Store memories by category
  2. 02Add tags to memories
  3. 03Use global or local storage
  4. 04Retrieve or remove memory entries

Use cases

  1. 01Retain user preferences across chats
  2. 02Separate general and project-specific notes

MCP support

It exposes tools for MCP clients to save, retrieve, and remove memory categories or individual entries.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"memory-mkusaka": {
"command": "npx",
"args": [
"-y",
"@mkusaka/mcp-server-memory"
]
}
}
}
Run commandnpx -y @mkusaka/mcp-server-memory

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@mkusaka/mcp-server-memory

Tools

4

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
categorystringYesThe category to store the memory in
datastringYesThe data to store in memory
tagsarrayNoOptional tags for categorizing the memory
is_globalbooleanYesWhether to store in global or local memory

Details

From the project README

Category-based Memory Server

A basic implementation of persistent memory using a category-based memory system. This lets Claude remember information across chats by storing it in categorized memory entries.

Core Concepts

Categories

Categories are the primary organizational units in the memory system. Each category contains a collection of memories (pieces of information).

Example:

"development": [
  "Uses pnpm for package management",
  "Prefers 2-space indentation"
]
Tags

Tags provide additional context and grouping for memories within a category. They can be used to filter and find related memories.

Example:

# formatting style
Uses 2-space indentation
Prefers camelCase for variables
Global vs Local Memories

The memory system supports two storage locations:

  • Global Memories: Stored in the user's home directory (~/.config/mcp-memory) and persist across all projects.
  • Local Memories: Stored in the current project directory (.mcp-memory) and are specific to the current project.
Memory Storage

Memories are stored as text entries, with the following characteristics:

  • Organized by categories (stored in separate files)
  • Can be tagged for easier retrieval
  • Stored in plain text files
  • Can be added or removed independently
  • Should be atomic (one piece of information per memory)

Example Memory File (development.txt):

# formatting style
Uses 2-space indentation
Prefers camelCase for variables

# tools
Uses eslint for linting
Uses prettier for formatting

API

Tools
  • remember_memory

    • Stores a memory with optional tags in a specified category
    • Input:
      • category (string): The category to store the memory in
      • data (string): The data to store in memory
      • tags (string[], optional): Optional tags for categorizing the memory
      • is_global (boolean): Whether to store in global or local memory
    • Stores the memory entry in the specified category with optional tags
  • retrieve_memories

    • Retrieves all memories from a specified category
    • Input:
      • category (string): The category to retrieve memories from, use '*' for all categories
      • is_global (boolean): Whether to retrieve from global or local memory
    • Returns memories from the specified category, grouped by tags
    • Returns empty object if category doesn't exist
  • remove_memory_category

    • Removes all memories within a specified category
    • Input:
      • category (string): The category to remove, use '*' for all categories
      • is_global (boolean): Whether to remove from global or local memory
    • Removes the entire category file
    • Silent operation if category doesn't exist
  • remove_specific_memory

    • Removes a specific memory within a specified category
    • Input:
      • category (string): The category containing the memory to remove
      • memory_content (string): Content of the memory to remove (partial match)
      • is_global (boolean): Whether to remove from global or local memory
    • Removes memories containing the specified content
    • Silent operation if memory doesn't exist

Usage with Claude Desktop

Setup

Add this to your claude_desktop_config.json:

npx
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@mkusaka/mcp-server-memory"
      ]
    }
  }
}
npx with custom setting

The server can be configured using the following environment variables:

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@mkusaka/mcp-server-memory"
      ],
      "env": {
        "MEMORY_FILE_PATH": "/path/to/custom/memory.json"
      }
    }
  }
}
  • MEMORY_FILE_PATH: Path to the memory storage JSON file (default: memory.json in the server directory)

VS Code Installation Instructions

For quick installation, use one of the one-click installation buttons below:

For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open Settings (JSON).

Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

Note that the mcp key is not needed in the .vscode/mcp.json file.

npx
{
  "mcp": {
    "servers": {
      "memory": {
        "command": "npx",
        "args": [
          "-y",
          "@mkusaka/mcp-server-memory"
        ]
      }
    }
  }
}

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.