Elasticsearch Knowledge Graph
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.
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
Maintainer
Works with
Installation
Manual Installation
npx elasticsearch-knowledge-graph-for-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 buildStart 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:9200Configure 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"
}
}
}
}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"
}
]
}
]
}
}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.
Elasticsearch Knowledge Graph Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Elasticsearch Knowledge Graph? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
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.
Set Up Elasticsearch Knowledge Graph in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.