github doobidoo/mcp-memory-service v8.22.2
v8.22.2 - Complete Tag Parsing Fix

latest releases: v10.31.1, v10.31.0, v10.30.0...
4 months ago

Complete Tag Parsing Fix

This is a follow-up hotfix to v8.22.1 that completes the tag parsing bug fix across all code paths.

What Was Fixed

The character-split tags bug from v8.22.1 was discovered to exist in 3 additional files beyond documents.py:

  1. src/mcp_memory_service/server.py (lines 3345-3354, 3489-3503)

    • MCP ingest_document tool handler
    • MCP ingest_directory tool handler
  2. src/mcp_memory_service/cli/ingestion.py (lines 101-110, 277-291)

    • CLI ingest_file command
    • CLI ingest_directory command

Root Cause

Same issue as v8.22.1: When tag metadata contained comma-separated strings (e.g., "claude-code-hooks,update-investigation"), using .extend() treated the string as a character iterable, resulting in tags being stored as individual characters.

Database Repairs

  • Previous v8.22.1: 13 memories repaired
  • This release: 6 additional memories repaired
  • Total: 19 memories with corrected tags across both releases

Impact

  • MCP tools: ingest_document and ingest_directory now correctly parse comma-separated tags
  • CLI commands: ingest_file and ingest_directory now correctly parse comma-separated tags
  • Comprehensive fix: All 4 files with tag parsing now include isinstance() type checking

Technical Details

Before (buggy code):

tags.extend(chunk.metadata.get("tags", []))  # Treats "tag1,tag2" as ['t','a','g','1',',',...]

After (fixed code):

chunk_tags = chunk.metadata.get("tags", [])
if isinstance(chunk_tags, str):
    tags.extend([t.strip() for t in chunk_tags.split(",") if t.strip()])
else:
    tags.extend(chunk_tags)

Verification

All tag parsing code paths now include type checking to prevent future occurrences of this bug.


Full Changelog: CHANGELOG.md

Don't miss a new mcp-memory-service release

NewReleases is sending notifications on new releases.