Skip to main content
Glama
mcp-structured-memory
by nmeierpolys

Structured Memory MCP Server

A Model Context Protocol (MCP) server that provides structured, domain-specific memory management through markdown files. This is particularly useful for ongoing projects around a particular area of focus where you want to accumulate valuable context over time. Examples include focused domains like travel planning, research projects, real estate search, investment theses, product planning, and career development.

Why Structured Memory?

Traditional MCP memory servers use semantic search across scattered conversation snippets. This works well for general recall but fails for focused projects that need organized, categorical information.

Structured Memory instead maintains living documents with structured content that you can scan, update, and track over time - just like you would with a personal notebook, but with AI assistance.

Memory documents are stored as markdown files, primarily updated automatically by the LLM as it learns from your conversations to build rich context over time.

Related MCP server: CastPlan MCP

Typical usage

  1. Ask your LLM client to create a memory document for your focused project Create a new travel advisor memory document and tell me how to use it. This should start empty and grow over time.

  2. Create a new Project for conversations in that area. Add the provided usage instructions to your project context

    Note: LLMs will, against all tool advice, occasionally fail to show you the installation instructions. If that happens, follow up with a request to the LLM to show you the installation instructions and it should comply.

  3. New chat conversations start by checking the available info from the project's memory. Your LLM will update this memory over time to build up valuable context.

  4. Optionally prompt your LLM to add/adjust the memory file on demand. It's also helpful to ask the LLM to prompt you for relevant info (e.g. "Ask me some questions to learn about my travel preferences")

Installation

Option 1: Install from npm (when published)

npm install -g @nmeierpolys/mcp-structured-memory

Option 2: Install from source

git clone https://github.com/nmeierpolys/mcp-structured-memory.git
cd mcp-structured-memory
npm install
npm run build

Configuration

For Claude Desktop

Edit the claude_desktop_config.json file with the following entry:

{
  "mcpServers": {
    "mcp-structured-memory": {
      "command": "npx",
      "args": ["@nmeierpolys/mcp-structured-memory"]
    }
  }
}

Available Tools

  • create_memory - Create a new memory document with optional initial content

  • list_memories - List all available memory documents

  • get_memory_summary - Get a high-level summary of a memory document

  • get_section - Retrieve a specific section from a memory document

  • get_full_memory - Retrieve the complete content of a memory document

  • search_within_memory - Search for information within a memory document

  • update_section - Update an entire section of a memory document

  • add_to_list - Add an item to a list section

  • update_list_item - Update an existing item in a list

  • move_list_item - Move an item between list sections

Flexible Structure

Memory documents support any structure you need. The AI will help you organize sections based on your use case. Common examples:

  • Travel Planning: destinations, itinerary, accommodations, activities, restaurants, travel tips, budget tracker

  • Research Project: research questions, literature review, methodology, findings, data sources, next steps

  • Real Estate Search: search criteria, active listings, visited properties, rejected properties, market insights, agent contacts

Example: Automatic Memory Building

User: "Create a new Minnesota trip memory document and tell me how to use it. This should start empty and grow over time."

Claude: "I've created a travel memory document for your Minnesota trip. As we discuss your plans, I'll automatically update it with destinations, timing, preferences, and other details I learn about your trip."

User: "I want to see fall colors, go hiking, try local cuisine, and visit both the North Shore and the Twin Cities."

Claude: "I've noted your priorities in the memory: fall foliage viewing, hiking opportunities, local restaurants, North Shore destinations, and Twin Cities attractions. I'll keep track of specific recommendations as we explore options."

[Later conversation]
User: "What hiking trails have good fall colors?"

Claude: "Based on our previous discussions, I see you're focused on fall colors in Minnesota. Let me suggest some trails and I'll add the best ones to your travel memory..."

Backup and Version Control

The server automatically creates timestamped backups before major updates.

Storage Locations

Memory document files are stored as markdown files in:

  • macOS: ~/Library/Application Support/mcp-structured-memory/

  • Windows: %LOCALAPPDATA%\mcp-structured-memory\

  • Linux: ~/.local/share/mcp-structured-memory/

Available Tools

10 tools
add_to_listC

Add an item to a list section in a memory document

Inputs: item (required), section (required), memory_id (required).

create_memoryA

Create a new structured memory document with optional initial content. IMPORTANT: After using this tool, you MUST show the user the complete installation instructions returned by the tool - the memory will not work without proper MCP server setup and project context configuration.

Inputs: name (required), content.

get_full_memoryA

Retrieve the complete content of a memory document with all Markdown formatting preserved (headings, bold, italic, code, links, tables, lists, etc.)

Inputs: memory_id (required).

get_memory_summaryC

Get a high-level summary of a memory document

Inputs: memory_id (required).

get_sectionC

Retrieve a specific section from a memory document

Inputs: section (required), memory_id (required).

list_memoriesB

List all available memory documents

Inputs: no named parameters.

move_list_itemC

Move an item from one section to another

Inputs: memory_id (required), to_section (required), from_section (required), item_identifier (required), +1 more.

search_within_memoryC

Search for information within a memory document

Inputs: query (required), memory_id (required).

update_list_itemC

Update an existing item in a list section

Inputs: section (required), updates (required), memory_id (required), item_identifier (required).

update_sectionC

Update an entire section of a memory document. Content supports full Markdown formatting including headings, bold, italic, code blocks, links, lists, tables, and all standard Markdown syntax.

Inputs: content (required), section (required), memory_id (required), mode.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific operations on structured memory documents. For example, add_to_list, move_list_item, and update_list_item are all focused on list management but handle different actions (adding, moving, updating), while get_full_memory, get_memory_summary, and get_section provide different levels of retrieval detail. There is no ambiguity in tool selection.

    Naming Consistency5/5

    All tools follow a consistent verb_noun naming pattern (e.g., create_memory, list_memories, update_section). The verbs are clear and descriptive, and there are no deviations in style or convention throughout the set, making it predictable and easy to understand.

    Tool Count5/5

    With 10 tools, the count is well-scoped for managing structured memory documents. Each tool serves a specific function in the lifecycle (create, retrieve, update, search, list), and none feel redundant or unnecessary, fitting the domain appropriately without being overwhelming.

    Completeness5/5

    The tool set provides complete coverage for the structured memory domain, including creation (create_memory), listing (list_memories), retrieval at various levels (get_full_memory, get_memory_summary, get_section), updating (update_section, update_list_item), list management (add_to_list, move_list_item), and search (search_within_memory). There are no obvious gaps, and the tools support full CRUD and lifecycle operations.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers