Skip to main content
Glama
Himan-D

Hystersis MCP Server

by Himan-D

npm version License: MIT Protocol: MCP

Hystersis MCP Server acts as the universal bridge connecting your local or cloud-hosted Hystersis backend to any MCP-compatible AI assistant (e.g., Claude Desktop, Cursor, Windsurf, Cline).

By attaching this server to your coding assistant, your AI instantly gains long-term, persistent memory, a Neo4j knowledge graph, and ProMem-style extraction across all your chats and workspaces.


✨ Features

  • Long-Term Context: AI assistants remember coding preferences, architecture rules, and past bugs across completely different chats and workspaces.

  • Graph Knowledge Base: Exposes tools for the AI to explicitly create entities and relationships, building an architectural map of your systems as it works.

  • Multi-Hop Spreading Activation: Search through memories not just by vector similarity, but through associative graph propagation (Neo4j + Qdrant).

  • Plug-and-Play: Installs globally via NPM and connects to Claude or Cursor with three lines of JSON.


Related MCP server: Neo4j Memory Server

🚀 Quick Start

1. Prerequisites

Ensure your core Hystersis engine is running. You can start it locally via Docker:

git clone https://github.com/Himan-D/agent-memory.git
cd agent-memory
docker-compose up -d

(By default, the Hystersis API runs on http://localhost:8080)

2. Client Integrations

You don't need to clone this repository to use the server. You can execute it directly via npx hystersis-mcp in your assistant's configuration.

🤖 Claude Desktop

Add the following to your claude_desktop_config.json (Mac: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "hystersis": {
      "command": "npx",
      "args": [
        "-y",
        "hystersis-mcp"
      ],
      "env": {
        "HYSTERSIS_API_URL": "http://localhost:8080",
        "HYSTERSIS_API_KEY": "default-key"
      }
    }
  }
}

💻 Cursor IDE

  1. Go to Cursor Settings > Features > MCP.

  2. Click + Add new MCP server.

  3. Set the name to Hystersis.

  4. Set the type to command.

  5. Set the command to: npx -y hystersis-mcp

  6. (If your API requires a specific key or URL, you may need to export it in your environment or wrap the command in a bash script).

🛠 Cline / RooCode (VS Code Extensions)

Add to your MCP settings file:

{
  "mcpServers": {
    "hystersis": {
      "command": "npx",
      "args": ["-y", "hystersis-mcp"],
      "env": {
        "HYSTERSIS_API_URL": "http://localhost:8080"
      }
    }
  }
}

🧰 Available Tools (Exposed to AI)

When connected, the AI assistant automatically discovers and can independently utilize the following tools:

Tool

Description

add_memory

Ingests a new fact, rule, or preference into the persistent database.

search_memories

Retrieves historical context. Supports semantic, hybrid, and spreading modes.

create_entity

Creates a strict named node in the Neo4j knowledge graph.

create_relation

Links two entities with a specific relationship type (e.g., DEPENDS_ON).

get_context

Fetches the aggregated agent state and active working memory.

compression_stats

Retrieves real-time telemetry on the ProMem engine's token reduction.


🛠 Local Development

If you wish to modify the MCP server or contribute:

  1. Clone & Install

    git clone https://github.com/Himan-D/hystersis-mcp.git
    cd hystersis-mcp
    npm install
  2. Build

    npm run build
  3. Test the MCP Output Manually

    echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | npm start

📝 License

This project is licensed under the MIT License.

Available Tools

6 tools
add_memoryA

Add a new persistent memory or fact to Hystersis. Use this when the user shares a preference, fact, or instruction that should be remembered across sessions.

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesThe content of the memory or fact
user_idNoOptional user ID to associate the memory with
categoryNoCategory of the memory (e.g., preference, fact, code_style)

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits but only mentions 'persistent.' It lacks information on side effects (e.g., overwrite behavior, idempotency), error handling, permissions, or rate limits. This is insufficient for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, consisting of two short sentences with no waste. The action and usage guideline are front-loaded, making it easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (3 parameters, no output schema, no annotations), the description covers purpose and usage adequately but omits what the tool returns or confirms success. More context on the response would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with clear descriptions for all three parameters. The tool description adds no additional parameter semantics, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Add') and resource ('persistent memory or fact') to clearly state the tool's purpose. It distinguishes from sibling tools like create_entity and search_memories, as adding memory is a distinct action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides an explicit usage scenario: 'Use this when the user shares a preference, fact, or instruction that should be remembered across sessions.' It does not include exclusions or alternatives, but the context is clear enough for typical use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

compression_statsA

Retrieve compression metrics and token savings from the Hystersis ProMem engine.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description indicates a safe read operation ('Retrieve'), but with no annotations, it carries the full burden. It does not disclose any potential side effects, rate limits, or dependencies beyond the basic retrieval nature.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that front-loads the key action and object. Every word contributes meaning, with no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no parameters and a straightforward retrieval purpose, the description provides sufficient context about the output (compression metrics and token savings). It lacks mention of whether it requires prior actions or if the data is real-time, but it is adequate for a simple stat tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so the description does not need to add parameter information. Schema coverage is 100%, and the description appropriately focuses on what the tool returns rather than parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves compression metrics and token savings from a specific engine. It distinguishes itself from siblings like add_memory and create_entity, which are about memory management operations, by focusing on statistical retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives is provided. While the purpose is clear, the description does not mention prerequisites, context, or exclusions. Usage is implied but not elaborated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_entityC

Create a named entity in the Hystersis knowledge graph.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName of the entity (e.g., 'React', 'Alice')
typeYesType of the entity (e.g., 'Framework', 'Person')
propertiesNoAdditional key-value properties

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description only indicates 'create' without detailing side effects, permissions, or return behavior. For a creation tool, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence. It could include more detail but remains concise and clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Missing output schema, behavioral details, and handling of nested objects. The description is too brief for a creation tool with multiple parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the description does not add extra meaning beyond the schema. Baseline at 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool creates a named entity in the Hystersis knowledge graph, with a clear verb and resource. However, it does not distinguish from siblings like 'create_relation' or 'add_memory'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No usage guidelines are provided; the description does not indicate when to use this tool versus alternatives or any prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_relationB

Create a relationship between two entities in the Hystersis knowledge graph.

ParametersJSON Schema
NameRequiredDescriptionDefault
from_entityYesSource entity ID or name
to_entityYesTarget entity ID or name
relation_typeYesRelationship type (e.g., 'USES', 'KNOWS', 'DEPENDS_ON')

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description does not disclose side effects, idempotency, permissions, or error cases (e.g., duplicate relationship). Mutation tool needs more behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, no extraneous words, clearly communicates the tool's core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a simple create operation with clear parameters, but lacks usage guidelines and behavioral notes. Could be improved with idempotency or prerequisite info.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all 3 parameters with descriptions (source entity, target entity, relation type). Description adds no extra param info beyond schema. Baseline 3 as schema coverage is 100%.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states verb 'Create', resource 'relationship between two entities', and context 'Hystersis knowledge graph'. Differentiates from sibling create_entity which creates entities, not relationships.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs alternatives. Implies usage for connecting entities, but no exclusions or when-not-to-use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_contextA

Retrieve aggregated agent context from Hystersis including relevant memories for the current state.

ParametersJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent identifier

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It implies read-only retrieval but doesn't explicitly state that the tool is non-destructive or require special permissions. Minimal context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence with no wasted words, fully front-loading the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter and no output schema, the description is sufficient to understand the tool's basic function. However, it could elaborate on what 'aggregated agent context' includes to improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter 'agent_id', and the tool description adds no additional meaning beyond the schema's 'Agent identifier' label.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('retrieve') and resource ('aggregated agent context'), clearly distinguishing it from sibling tools like 'search_memories' which focus on searching rather than aggregation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states what the tool does but provides no guidance on when to use it versus alternatives like 'search_memories', nor any prerequisites or context for invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_memoriesC

Search for existing memories in Hystersis using semantic or graph spreading activation.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query
modeNoSearch mode: semantic (default vector), hybrid (vector+keyword), spreading (graph multi-hop)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of disclosing behavioral traits. It only mentions search modes but does not explain what the tool returns, whether it has side effects, performance implications, or authentication needs. The description is insufficient for an AI agent to understand the tool's full behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence (12 words) that communicates the core purpose. It is appropriately front-loaded with the verb 'Search.' However, it could be slightly more informative without becoming verbose, hence a 4 rather than a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (two parameters, no output schema, no annotations) and the presence of sibling tools, the description is incomplete. It does not clarify what the output looks like, how to interpret results, or how this tool fits among siblings like get_context. An AI agent would lack key context to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents both parameters adequately. The description adds no additional meaning beyond what is in the schema. Per guidelines, baseline is 3 when coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: searching for existing memories. It mentions the specific techniques (semantic or graph spreading activation), which helps clarify the scope. However, it does not differentiate this tool from siblings like get_context, which might also involve retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives is provided. The description simply says 'search for existing memories,' which implies its use case, but fails to address when to choose this over get_context or other search-like operations. No exclusion criteria or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv1.0.0
    • First observedadd_memory
    • First observedcompression_stats
    • First observedcreate_entity
    • First observedcreate_relation
    • First observedget_context
    • First observedsearch_memories

TDQS

A3.6/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a distinct purpose: adding memories, searching, retrieving context, creating entities/relations, and getting stats. No overlap.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (e.g., add_memory, create_entity, get_context).

Tool Count5/5

With 6 tools, the server is well-scoped, covering core memory and knowledge graph operations without being overly sparse or bloated.

Completeness3/5

Missing update/delete operations for memories and entities, and no read entity/relation tools, creating gaps in lifecycle coverage.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides persistent memory capabilities through Neo4j graph database integration, allowing storage and retrieval of interconnected knowledge with complex relationships between entities. Enables long-term retention and querying of information across multiple conversations through graph-based memory management.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides AI assistants with persistent graph database memory using Neo4j, enabling task management, relationship understanding, semantic search with embeddings, file indexing, and multi-agent coordination through the Model Context Protocol.
    18 npm
    285
    MIT