Elasticsearch Knowledge Graph

v1.0.0Knowledge & Memorystable

Provides a scalable knowledge graph implementation for Model Context Protocol using Elasticsearch, enabling AI models to store and query information with advanced search capabilities, memory-like behavior, and multi-zone architecture.

elasticsearch-knowledge-graph-for-mcpmcpai-integration
Share:
19
Stars
0
Downloads
0
Weekly
0/5

What is Elasticsearch Knowledge Graph?

Elasticsearch Knowledge Graph is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides a scalable knowledge graph implementation for model context protocol using elasticsearch, enabling ai models to store and query information with advanced search capabilities, memory-like beha...

Provides a scalable knowledge graph implementation for Model Context Protocol using Elasticsearch, enabling AI models to store and query information with advanced search capabilities, memory-like behavior, and multi-zone architecture.

This server falls under the Knowledge & Memory and Search & Data Extraction categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Provides a scalable knowledge graph implementation for Model

Use Cases

Build scalable knowledge graphs using Elasticsearch for AI models. Store and query information with advanced search capabilities. Implement multi-zone architecture for distributed memory.
j3k0

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedApr 1, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx elasticsearch-knowledge-graph-for-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Elasticsearch Knowledge Graph

The Elasticsearch Knowledge Graph MCP server (mcp-brain-tools) gives AI agents persistent, searchable memory backed by Elasticsearch, going far beyond simple key-value stores with spaced repetition freshness tracking and progressive search. Each stored entity tracks when it was last verified and when it should be reviewed next, so agents can distinguish fresh facts from stale ones and surface only what's still relevant. Memory is organized into isolated zones by project or domain, and an optional Groq integration enables AI-powered relevance scoring over search results. Developers use this to build agents that remember architectural decisions, past mistakes, and project context across sessions without re-reading codebases every time.

Prerequisites

  • Node.js 18 or higher
  • Docker (to run Elasticsearch locally) or access to an existing Elasticsearch instance
  • A Groq API key (optional, enables AI-powered search filtering)
  • An MCP client such as Claude Desktop or Claude Code
1

Clone the repository and install dependencies

Clone the mcp-brain-tools repository and install Node.js dependencies, then build the TypeScript source.

git clone https://github.com/j3k0/mcp-brain-tools.git
cd mcp-brain-tools
npm install
npm run build
2

Start Elasticsearch with Docker

Use the built-in npm script to start an Elasticsearch container. Alternatively, point the ES_NODE env var at an existing Elasticsearch instance.

npm run es:start
# Or use your own instance:
export ES_NODE=http://your-elasticsearch-host:9200
3

Configure your MCP client

Add the server to your MCP client's config. The command is 'node' pointing at the compiled index.js. ES_NODE is required; GROQ_API_KEY is optional but enables AI-powered search scoring.

{
  "mcpServers": {
    "memory": {
      "command": "node",
      "args": ["/path/to/mcp-brain-tools/dist/index.js"],
      "env": {
        "ES_NODE": "http://localhost:9200",
        "GROQ_API_KEY": "gsk_your_groq_key_here"
      }
    }
  }
}
4

Install the auto-memory hook (Claude Code only)

The optional UserPromptSubmit hook automatically injects relevant memory context before every message — no agent cooperation needed. Add it to ~/.claude/settings.json.

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "node /path/to/mcp-brain-tools/dist/memory-hook.js"
          }
        ]
      }
    ]
  }
}
5

Add agent instructions to CLAUDE.md

For agents to actively save and retrieve memory, add explicit trigger-based instructions to your CLAUDE.md file. Tell the agent when to search (before non-trivial tasks) and when to save (after decisions, errors, corrections).

Elasticsearch Knowledge Graph Examples

Client configuration

Register the mcp-brain-tools knowledge graph server in Claude Desktop or Claude Code, pointing at a local Elasticsearch instance.

{
  "mcpServers": {
    "memory": {
      "command": "node",
      "args": ["/path/to/mcp-brain-tools/dist/index.js"],
      "env": {
        "ES_NODE": "http://localhost:9200",
        "GROQ_API_KEY": "gsk_your_groq_key_here",
        "KG_DEFAULT_ZONE": "default",
        "DEBUG": "false"
      }
    }
  }
}

Prompts to try

Example prompts for storing and retrieving information through the knowledge graph.

- "Remember that the auth service uses JWT tokens with a 24-hour expiry"
- "Search memory for anything related to the database migration we discussed last week"
- "Create a memory zone for the 'payments-service' project and store that we use Stripe's v2 API"
- "What do I know about the deployment process? Search your memory before answering"
- "Verify and refresh the entity about our CI/CD pipeline configuration"

Troubleshooting Elasticsearch Knowledge Graph

Elasticsearch connection refused on localhost:9200

Ensure Docker is running and the container started successfully with 'npm run es:start'. Check container status with 'docker ps' and logs with 'docker logs mcp-brain-tools-es'. If port 9200 is in use, start Elasticsearch on a different port and set ES_NODE accordingly.

Search returns no results even after storing entities

Elasticsearch indexes may need a moment to refresh. Wait a few seconds after storing entities before searching. Also verify the memory zone — entities stored in a specific zone (e.g., 'payments-service') won't appear in searches of the 'default' zone unless cross-zone search is used.

GROQ_API_KEY errors or AI filtering not working

GROQ_API_KEY is optional — the server works without it, just without AI-powered relevance scoring. If you want AI filtering, get a free key at console.groq.com and set it in the env block. You can also set AI_API_BASE to any OpenAI-compatible endpoint to use a different model.

Frequently Asked Questions about Elasticsearch Knowledge Graph

What is Elasticsearch Knowledge Graph?

Elasticsearch Knowledge Graph is a Model Context Protocol (MCP) server that provides a scalable knowledge graph implementation for model context protocol using elasticsearch, enabling ai models to store and query information with advanced search capabilities, memory-like behavior, and multi-zone architecture. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Elasticsearch Knowledge Graph?

Follow the installation instructions on the Elasticsearch Knowledge Graph GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Elasticsearch Knowledge Graph?

Elasticsearch Knowledge Graph works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Elasticsearch Knowledge Graph free to use?

Yes, Elasticsearch Knowledge Graph is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "elasticsearch-knowledge-graph-for-mcp": { "command": "npx", "args": ["-y", "elasticsearch-knowledge-graph-for-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Elasticsearch Knowledge Graph?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides