openapi-mcp-server/docs/memory.md
Tom Foster 6db4ea8e96
All checks were successful
CI / Build and push Docker image (push) Successful in 1m29s
Initial commit
2025-06-16 19:17:09 +01:00

2.9 KiB

Memory Tool

A structured knowledge graph memory system that provides persistent storage for entities, relationships, and observations.

Overview

The Memory tool provides a comprehensive knowledge graph system within the OpenAPI MCP Server framework. It allows you to store entities (people, places, concepts), create relationships between them, and add observations or facts about each entity.

Endpoints

Method Endpoint Description
POST /memory/create_entities Store new entities (people, places, concepts) with their properties and observations. Each entity has a name, type, and list of observations.
POST /memory/create_relations Connect entities with srelationships (works_at, lives_in, knows, etc). Creates typed relationships between existing entities.
POST /memory/add_observations Add new facts or observations to entities you've already stored. Extends existing entity knowledge without duplication.
POST /memory/delete_entities Remove entities and all their connections from memory. Cleans up both the entity and any relationships involving it.
POST /memory/delete_observations Remove specific facts or observations from entities. Allows selective cleanup of entity information.
POST /memory/delete_relations Remove specific relationships between entities. Maintains entities while removing their connections.
GET /memory/read_graph Retrieve all stored entities and relationships from memory. Returns the complete knowledge graph.
POST /memory/search_nodes Find entities by searching names, types, or observations. Performs fuzzy search across all entity data.
POST /memory/open_nodes Retrieve specific entities and their connections by exact name. Returns requested entities with their relationships.

Key Features

  • Knowledge Graph Structure: Entities connected by typed relationships
  • Flexible Entity Types: Store people, places, concepts, or any custom entity types
  • Rich Observations: Each entity can have multiple observations or facts
  • Relationship Management: Create, query, and delete relationships between entities
  • Search Capabilities: Find entities by name, type, or observation content
  • Persistent Storage: All data persisted to file system with atomic operations
  • Duplicate Prevention: Automatic deduplication of entities and relationships

Data Model

  • Entity: Has name, entity_type, and list of observations
  • Relationship: Connects two entities with a relationship type (from, to, relation_type)
  • Knowledge Graph: Collection of entities and their relationships

Usage

The Memory tool is automatically loaded by the OpenAPI MCP Server framework. All endpoints are available under the /memory prefix when the server is running. Visit /docs for interactive API documentation.