feat(mcp): add temporal graph support to MCP tools#108
Merged
nullure merged 1 commit intoCaviraOSS:mainfrom Jan 3, 2026
Merged
feat(mcp): add temporal graph support to MCP tools#108nullure merged 1 commit intoCaviraOSS:mainfrom
nullure merged 1 commit intoCaviraOSS:mainfrom
Conversation
Add Postgres support for temporal facts and enhance MCP tools with type-based routing for unified contextual + temporal memory queries. BREAKING CHANGE: None (backward compatible via optional parameters) Changes: - Add temporal_facts and temporal_edges tables for Postgres - Add temporal indexes for efficient queries - Enhance openmemory_store with type parameter (contextual|factual|both) - Enhance openmemory_query with type parameter (contextual|factual|unified) - Add fact_pattern parameter for structured temporal queries - Add comprehensive MCP temporal integration documentation
Contributor
Author
|
@nullure, can we release a new version in the npm package? |
Member
Definatly |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Temporal Graph Support to MCP Tools
🎯 Summary
Exposes OpenMemory's temporal graph capabilities through MCP, enabling agents to store and query structured facts that change over time alongside contextual/HSG memories.
💡 Motivation
While OpenMemory has powerful temporal graph features for tracking facts over time (like Zep's Graphiti), these capabilities were only accessible via HTTP API. This PR brings temporal graph support to the MCP interface, allowing Claude, Cursor, Windsurf, and other MCP clients to leverage both:
This enables agents to handle evolving information like:
🔧 Changes
1. Database (Postgres Support for Temporal Graph)
File:
packages/openmemory-js/src/core/db.tstemporal_factstable creation for Postgrestemporal_edgestable creation for Postgres2. Enhanced MCP Tools
File:
packages/openmemory-js/src/ai/mcp.tsopenmemory_storeenhancements:typeparameter:"contextual"(default),"factual","both"factsarray parameter for structured fact storagetypedefault to HSG (contextual)openmemory_queryenhancements:typeparameter:"contextual"(default),"factual","unified"fact_patternparameter for temporal queries (subject/predicate/object with wildcards)atparameter for point-in-time historical queriestypeuse HSG semantic search3. Documentation
File:
docs/mcp.md📋 API Examples
Storage
Queries
✅ Backward Compatibility
typedefaults to existing behaviorBenefits
For Users:
For Developers:
Migration Notes
No migration needed. This is additive - existing HSG functionality unchanged.
To use new features, agents should:
typeparameter toopenmemory_storecalls when storing factsfactsarray with subject-predicate-object triplestype="factual"ortype="unified"for temporal queriesfact_patternfor targeted fact retrievalExample Output
Memory/Facts Creation
Memory/Facts Retrieval