Used for running tests for the Memory MCP Server during development
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 entitiesconcept
: Abstract ideas or principlesproject
: Work initiatives or tasksdocument
: Any form of documentationtool
: Software tools or utilitiesorganization
: Companies or groupslocation
: Physical or virtual placesevent
: 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 connectioncontains
: Parent/child relationshipuses
: Entity utilizing another entitycreated
: Authorship/creation relationshipbelongs-to
: Membership/ownershipdepends-on
: Dependency relationshiprelated-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:
Get Entity
Get Graph
Create Entities
Add Observation
Create Relation
Search Memory
The search functionality supports:
- Temporal queries (e.g., "most recent", "last", "latest")
- Activity queries (e.g., "workout", "exercise")
- General entity searches
- Fuzzy matching with 80% similarity threshold
- Weighted search across:
- Entity names (weight: 1.0)
- Entity types (weight: 0.8)
- Observations (weight: 0.6)
Delete Entities
Delete Relation
Flush Memory
Error Types
The server uses the following error types:
NOT_FOUND
: Entity or resource not foundVALIDATION_ERROR
: Invalid input dataINTERNAL_ERROR
: Server-side errorALREADY_EXISTS
: Resource already existsINVALID_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
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Provides knowledge graph functionality for managing entities, relations, and observations in memory with strict validation rules to maintain data consistency.
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityProvides tools for managing project knowledge graphs, enabling structured representation of projects, tasks, milestones, resources, and team members.Last updated 4 months ago67TypeScript
- AsecurityFlicenseAqualityProvides tools for managing quantitative research knowledge graphs, enabling structured representation of research projects, datasets, variables, hypotheses, statistical tests, models, and results.Last updated 4 months ago66TypeScript
- -securityFlicense-qualityProvides tools for managing qualitative research knowledge graphs, enabling structured representation of research projects, participants, interviews, observations, codes, themes, and findings.Last updated 4 months ago4TypeScript
- AsecurityFlicenseAqualityProvides tools for managing student knowledge graphs, enabling structured representation of courses, assignments, exams, concepts, and study resources.Last updated 4 months ago6TypeScript