What's Changed
Fixed
-
[#842 / #843]
memory_typeontology coercion was invisible to callers: When a user passed an unknownmemory_type(e.g."foo"),Memory.__post_init__silently rewrote it to"observation"and only logged a warning. The MCP/HTTP store responses still reportedsuccess, so the caller had no way to detect the rewrite — subsequentmemory_listqueries filtered on the original type returned 0 results and looked like a broken filter (#842). Fix: both the MCPmemory_storehandler and the HTTPPOST /memoriesendpoint now compare the requested vs. effectivememory_typeand append a visible warning to the response when they diverge, including a hint to register the type viaMCP_CUSTOM_MEMORY_TYPES. The default"note"(applied when the caller omitstype) does not trigger a warning. Tool description formemory_storeupdated to enumerate the built-in base types and link to the new ontology guide. Closes #843. -
uvx CI flake fix:
tests/web/test_middleware.pyand siblings usedimportlib.reload(middleware)which poisoned FastAPI route deps for subsequent tests, causingtest_harvest_requires_authto fail intermittently in theTest uvx compatibilityrun. Removed dead reloads intest_analytics_graph.py+test_memories_api.py, added teardown reload intest_middleware.py, and hardenedunauth_clientintest_harvest_api.pyviamonkeypatch.setattrof middleware globals.
Documentation
- New:
docs/memory-ontology.md: Documents the built-in memory-type taxonomy (12 base types, ~60 subtypes), the rationale for ontology validation, the coercion warning surfaced in store responses, and the JSON format forMCP_CUSTOM_MEMORY_TYPES. Linked from the README documentation index and from thememory_storeMCP tool description..env.exampleexpanded with concrete examples for the env var. (Issue #843)
Files Changed (12 files, 378 insertions, 33 deletions)
src/mcp_memory_service/server/handlers/memory.pysrc/mcp_memory_service/web/api/memories.pysrc/mcp_memory_service/server_impl.pytests/server/test_store_memory_handler.py(new, 5 tests)tests/web/test_middleware.pytests/web/api/test_harvest_api.pytests/web/api/test_memories_api.pytests/web/api/test_analytics_graph.pydocs/memory-ontology.md(new)README.md.env.exampleCHANGELOG.md
Full Changelog: https://github.com/doobidoo/mcp-memory-service/blob/main/CHANGELOG.md#10491---2026-05-05