Provides a knowledge graph management system for storing, retrieving, and querying information to build and maintain lon...
Created byApr 23, 2025
Memory MCP Server
A Model Context Protocol (MCP) server that provides knowledge graph functionality for managing entities, relations, and observations in memory, with strict validation rules to maintain data consistency.
Installation
Install the server in Claude Desktop:
Data Validation Rules
Entity Names
Must start with a lowercase letter
Can contain lowercase letters, numbers, and hyphens
Maximum length of 100 characters
Must be unique within the graph
Example valid names: python-project, meeting-notes-2024, user-john
Entity Types
The following entity types are supported:
person: Human entities
concept: Abstract ideas or principles
project: Work initiatives or tasks
document: Any form of documentation
tool: Software tools or utilities
organization: Companies or groups
location: Physical or virtual places
event: Time-bound occurrences
Observations
Non-empty strings
Maximum length of 500 characters
Must be unique per entity
Should be factual and objective statements
Include timestamp when relevant
Relations
The following relation types are supported:
knows: Person to person connection
contains: Parent/child relationship
uses: Entity utilizing another entity
created: Authorship/creation relationship
belongs-to: Membership/ownership
depends-on: Dependency relationship
related-to: Generic relationship
Additional relation rules:
Both source and target entities must exist
Self-referential relations not allowed
No circular dependencies allowed
Must use predefined relation types
Usage
The server provides tools for managing a knowledge graph:
INVALID_RELATION: Invalid relation between entities
Response Models
All tools return typed responses using these models:
EntityResponse
GraphResponse
OperationResponse
Development
Running Tests
Adding New Features
Update validation rules in validation.py
Add tests in tests/test_validation.py
Implement changes in knowledge_graph_manager.py
Memory MCP Server
A Model Context Protocol (MCP) server that provides knowledge graph functionality for managing entities, relations, and observations in memory, with strict validation rules to maintain data consistency.
Installation
Install the server in Claude Desktop:
Data Validation Rules
Entity Names
Must start with a lowercase letter
Can contain lowercase letters, numbers, and hyphens
Maximum length of 100 characters
Must be unique within the graph
Example valid names: python-project, meeting-notes-2024, user-john
Entity Types
The following entity types are supported:
person: Human entities
concept: Abstract ideas or principles
project: Work initiatives or tasks
document: Any form of documentation
tool: Software tools or utilities
organization: Companies or groups
location: Physical or virtual places
event: Time-bound occurrences
Observations
Non-empty strings
Maximum length of 500 characters
Must be unique per entity
Should be factual and objective statements
Include timestamp when relevant
Relations
The following relation types are supported:
knows: Person to person connection
contains: Parent/child relationship
uses: Entity utilizing another entity
created: Authorship/creation relationship
belongs-to: Membership/ownership
depends-on: Dependency relationship
related-to: Generic relationship
Additional relation rules:
Both source and target entities must exist
Self-referential relations not allowed
No circular dependencies allowed
Must use predefined relation types
Usage
The server provides tools for managing a knowledge graph: