MCP Tools Reference
Complete reference for the neo4j-agent-memory MCP server tools, resources, and prompts.
Overview
The MCP server exposes memory capabilities via the Model Context Protocol for Claude Desktop, Claude Code, Cursor, and other MCP-compatible hosts.
Tools are organized into two profiles:
-
Core (6 tools): Essential read/write cycle for memory operations
-
Extended (16 tools): Full surface including reasoning traces, entity management, graph export, and Cypher queries
Start the server with a specific profile:
neo4j-agent-memory mcp serve --profile core # 6 tools
neo4j-agent-memory mcp serve --profile extended # 16 tools (default)
Core Profile Tools
memory_search
Hybrid vector + graph search across all memory types.
| Parameter | Description |
|---|---|
|
Natural language search query. |
|
Maximum results per memory type (default: 10). |
|
Types to search: |
|
Filter message search to a specific session. |
|
Similarity threshold 0.0-1.0 (default: 0.7). |
memory_get_context
Assembled context from all memory types for the current session.
| Parameter | Description |
|---|---|
|
Session to get context for (uses current session if not set). |
|
Optional search query to focus context retrieval. |
|
Maximum items per memory type (default: 10). |
|
Include conversation history (default: true). |
|
Include entities and preferences (default: true). |
|
Include similar reasoning traces (default: true). |
memory_store_message
Store a message with automatic entity extraction and preference detection.
| Parameter | Description |
|---|---|
|
The message text content. |
|
Message role: |
|
Session ID (uses current session if not set). |
|
Optional metadata dict to attach. |
memory_add_entity
Create or update an entity in the knowledge graph with POLE+O typing.
| Parameter | Description |
|---|---|
|
Entity name (e.g., "John Smith", "Acme Corp"). |
|
POLE+O type: |
|
Optional subtype (e.g., |
|
Entity description. |
|
Alternative names for the entity. |
|
Additional metadata. |
memory_add_preference
Record a user preference for personalization.
| Parameter | Description |
|---|---|
|
Preference category (e.g., |
|
The preference text (e.g., "Prefers dark mode"). |
|
Optional context about when/why the preference was expressed. |
|
Confidence score 0.0-1.0 (default: 1.0). |
memory_add_fact
Store a subject-predicate-object fact triple.
| Parameter | Description |
|---|---|
|
The subject of the fact. |
|
The relationship. |
|
The object/value. |
|
Confidence score 0.0-1.0 (default: 1.0). |
|
ISO date for when this fact becomes valid. |
|
ISO date for when this fact expires. |
Extended Profile Additional Tools
memory_get_conversation
Retrieve full conversation history for a session.
| Parameter | Description |
|---|---|
|
The session ID to retrieve. |
|
Maximum messages to return (default: 50). |
|
Include message metadata (default: true). |
memory_list_sessions
List available conversation sessions with previews.
| Parameter | Description |
|---|---|
|
Maximum sessions to return (default: 20). |
|
Offset for pagination (default: 0). |
memory_get_entity
Get detailed entity information with graph relationships.
| Parameter | Description |
|---|---|
|
Entity name to look up. |
|
Filter by POLE+O type (optional). |
|
Traverse graph for related entities (default: true). |
|
Relationship traversal depth, 1-3 (default: 1). |
memory_export_graph
Export a subgraph as JSON for visualization or debugging.
| Parameter | Description |
|---|---|
|
Filter to a specific session (optional). |
|
Types to include: |
|
Maximum nodes per memory type (default: 500). |
memory_create_relationship
Create a typed relationship between two entities.
| Parameter | Description |
|---|---|
|
Name of the source entity. |
|
Name of the target entity. |
|
Relationship type in |
|
Optional description of the relationship. |
|
Confidence score 0.0-1.0 (default: 1.0). |
memory_start_trace
Begin recording a reasoning trace for a complex task.
| Parameter | Description |
|---|---|
|
Session ID for the trace. |
|
Description of the task being solved. |
|
Optional metadata (e.g., model name). |
memory_record_step
Record a reasoning step within a trace.
| Parameter | Description |
|---|---|
|
ID of the trace to add the step to. |
|
The reasoning for this step. |
|
The action taken. |
|
The result or observation. |
|
Name of tool called in this step (optional). |
|
Arguments passed to the tool (optional). |
|
Result from the tool call (optional). |
memory_complete_trace
Complete a reasoning trace with the final outcome.
| Parameter | Description |
|---|---|
|
ID of the trace to complete. |
|
Final outcome or result description. |
|
Whether the task completed successfully (default: true). |
Resources
| URI | Profile | Description |
|---|---|---|
|
Core |
Assembled context for a session (conversation + entities + preferences). |
|
Extended |
Catalog of all entities with names, types, and descriptions. |
|
Extended |
All stored user preferences. |
|
Extended |
Knowledge graph node/relationship counts. |
Prompts
| Name | Profile | Description |
|---|---|---|
|
Core |
Initialize a memory-aware conversation. Loads context and guides memory tool usage. |
|
Extended |
Record a reasoning trace for a complex task with step-by-step guidance. |
|
Extended |
Review stored knowledge and flag contradictions or outdated information. |
Server Instructions
The server sends behavioral instructions during MCP initialization that teach Claude:
-
To call
memory_get_contextat conversation start -
To call
memory_store_messagefor important user messages -
To call
memory_searchwhen asked about past interactions -
To use POLE+O entity types and
UPPER_SNAKE_CASErelationship types -
(Extended) To record reasoning traces for complex tasks
CLI Reference
neo4j-agent-memory mcp serve [OPTIONS]
| Option | Default | Description |
|---|---|---|
|
|
Neo4j connection URI. Env: |
|
|
Neo4j username. Env: |
|
(required) |
Neo4j password. Env: |
|
|
Neo4j database name. |
|
|
Transport: |
|
|
Host for SSE/HTTP transports. |
|
|
Port for SSE/HTTP transports. |
|
|
Tool profile: |
|
|
Session ID strategy: |
|
(none) |
User ID for |
|
|
Token threshold for observational memory compression. |
|
|
Disable automatic preference detection. |