ElasticMind-MCP
Provides tools to manage and query a knowledge base within Elastic, including document ingestion, text chunking, and semantic search retrieval.
Allows indexing documentation, extracting text from PDFs, and performing semantic search queries against an Elasticsearch knowledge base.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ElasticMind-MCPsearch the documentation for our company's security protocols"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SME Knowledge Base — MCP Server
This repository provides an MCP (Model Context Protocol) server that indexes documentation into Elasticsearch and exposes tools to query it from MCP-compatible clients such as Claude Desktop, Cursor, and GitHub Copilot.
📌 Features
Smart Indexing: Uses deterministic IDs to prevent duplicate entries in Elasticsearch.
Semantic Search: Query the knowledge base using Elasticsearch's matching capabilities.
Dynamic Updates: Add new text content directly via MCP tools.
Robustness: Gracefully handles database connection failures.
Related MCP server: local-document-rag-agent
Prerequisites
Before running the server, ensure the following are installed:
Python 3.11+
Docker (for running Elasticsearch)
uv (Python package and project manager)
📦 Setup
1. Start Elasticsearch
The server requires a running Elasticsearch instance. You can start one easily using Docker:
docker run -d --name elasticsearch \
-p 9200:9200 -p 9300:9300 \
-e "discovery.type=single-node" \
-e "xpack.security.enabled=false" \
-e ES_JAVA_OPTS="-Xms1g -Xmx1g" \
docker.elastic.co/elasticsearch/elasticsearch:9.1.5(Note: Ensure the version tag matches your requirements. Version 8.11.0 is used here as a stable default.)
2. Install Dependencies
Navigate to the project directory and install the required Python packages:
uv sync
# OR
pip install -e .3. Ingest Data
Place your PDF documents in the input/ folder and run the extraction script to generate the data/docs.json index file:
uv run extraction.py🧩 Configuration
To use this server with Claude Desktop, Cursor, or GitHub Copilot, you need to configure the MCP settings.
1. Locate Paths
You will need the absolute paths for both the uv executable and your cloned repository.
Find
uvpath:which uvFind Repository path:
pwd
2. Edit Configuration File
A template configuration file is provided in mcp.json. You can copy its content, but remember to update the paths to be absolute.
Open Claude Desktop.
Go to Settings > Developer > Edit Config.
Add the following configuration to the
mcpServersobject in the JSON file:
{
"mcpServers": {
"sme-knowledge-base": {
"command": "/absolute/path/to/uv",
"args": [
"run",
"--directory",
"/absolute/path/to/my_server_sme",
"elastic_server.py"
],
"env": {
"ES_HOST": "http://localhost:9200"
}
}
}
}Replace /absolute/path/to/uv and /absolute/path/to/my_server_sme with the actual paths identified in Step 1.
🔧 Available Tools
The server exposes the following tools to the LLM:
Tool Name | Description |
| Scans the |
| Manually triggers the indexing process from |
| Adds a new text document to the knowledge base. Features: • Updates both persistent storage ( |
| Accepts a search query string and returns the top 2 most relevant document sections (Heading + Content). |
📖 Example Workflow
Start Elasticsearch: Ensure your Docker container is running.
docker start elasticsearchAdd Documents: Drop any PDF files you want to index into the
input/folder.Start Server: When you open Claude Desktop or Cursor, the server starts automatically.
It will scan
input/, extract text from new PDFs, and index them into Elasticsearch.
Interact:
"What does the document say about [topic]?" (Uses
query_knowledge_base)"Add this meeting note to the knowledge base: [content]" (Uses
add_text_to_index)
Troubleshooting
Connection Refused: Ensure the Docker container is running (
docker ps) and port 9200 is accessible.Path Errors: Double-check that the paths in your config JSON are absolute (start with
/) and point to the correct locations.
Available Tools
4 toolsadd_text_to_indexA
Adds a new text document to the knowledge base.
If the content exceeds 1000 words, it will be chunked into smaller documents.
Updates both the persistent JSON storage and the Elasticsearch index.
Args:
title: A descriptive title for the text.
content: The actual text content to index.
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| content | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it adds documents to the knowledge base, handles content chunking for documents over 1000 words, and updates both JSON storage and Elasticsearch index. This covers mutation effects, processing logic, and data persistence, though it could mention permissions or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with the core purpose stated first, followed by behavioral details and parameter explanations. Every sentence adds value, though the 'Args' section could be integrated more smoothly. It avoids redundancy and is efficient for a tool with two parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (mutation with data processing), no annotations, and an output schema present (which handles return values), the description is largely complete. It covers purpose, behavior, and parameters, but could improve by mentioning prerequisites or error cases. The output schema reduces the need to explain return values, making this adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaningful semantics beyond the input schema, which has 0% description coverage. It explains that 'title' is a descriptive title for the text and 'content' is the actual text content to index, providing clear context for both parameters. This compensates well for the lack of schema descriptions, though it doesn't detail constraints like length or format.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Adds') and resource ('new text document to the knowledge base'), distinguishing it from siblings like 'index_documents' (which might handle multiple documents or different formats) and 'ingest_pdfs' (which handles PDFs specifically). It specifies the exact action and target resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for adding text documents to the knowledge base, but does not explicitly state when to use this tool versus alternatives like 'index_documents' or 'ingest_pdfs'. It provides context (adding text documents) but lacks explicit guidance on exclusions or comparisons to sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
index_documentsA
Reads documents from data/docs.json and indexes them into Elasticsearch. Call this tool to initialize or update the knowledge base.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the action ('reads documents' and 'indexes them'), source ('data/docs.json'), and purpose ('initialize or update the knowledge base'), but lacks details on potential side effects (e.g., overwriting existing data), error handling, or performance characteristics. This is adequate but has gaps for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise and well-structured: two sentences that directly state the tool's function and usage without any redundant or unnecessary information. It is front-loaded with the core action, making it easy to understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (0 parameters, no annotations, but with an output schema), the description is reasonably complete. It explains what the tool does and when to use it. Since an output schema exists, the description doesn't need to detail return values. However, it could benefit from more behavioral context (e.g., idempotency, error cases) to be fully comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics beyond what the schema provides. A baseline score of 4 is appropriate as it doesn't introduce confusion or omissions regarding parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Reads documents from data/docs.json and indexes them into Elasticsearch.' It specifies the verb ('reads' and 'indexes'), resource ('documents'), and target system ('Elasticsearch'), making it unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'add_text_to_index' or 'ingest_pdfs', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear usage context: 'Call this tool to initialize or update the knowledge base.' This indicates when to use it (for initialization or updates) and implies a broader knowledge base context. However, it doesn't explicitly state when not to use it or name alternatives among the sibling tools, such as 'add_text_to_index' for incremental additions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ingest_pdfsB
Takes all documents currently in input folder and creates output.json to process them add them to index to enable knowledge base powered querying.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes a write operation (creating output.json and adding to an index) but lacks details on permissions, side effects, error handling, or rate limits. This is a significant gap for a tool that modifies data without safety annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and structured into two sentences that efficiently convey the tool's action and purpose. However, it could be slightly more front-loaded by starting with the primary goal (enabling knowledge base querying) rather than the procedural steps.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has an output schema (which handles return values) and no parameters, the description is minimally adequate. However, as a write operation with no annotations, it lacks completeness in explaining behavioral traits like data mutation effects or integration with sibling tools, leaving gaps for safe agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description adds context by implying the tool operates on documents in an input folder, which is useful semantic information beyond the empty schema. Baseline is 4 for zero parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: it processes documents from an input folder to create an output.json file and adds them to an index for knowledge base querying. It specifies the verb ('takes', 'creates', 'adds') and resource ('documents', 'output.json', 'index'), but does not explicitly differentiate from sibling tools like 'add_text_to_index' or 'index_documents', which may have overlapping functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as 'add_text_to_index' or 'index_documents'. It mentions the tool's action but does not specify prerequisites, exclusions, or comparative contexts, leaving the agent to infer usage based on tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_knowledge_baseA
Query the knowledge base for relevant documents.
Returns the top-2 documents' content and heading to be used as context.
Args:
query: The search query string.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses key behavioral traits: it returns 'the top-2 documents' content and heading', indicating a limit and format. However, it lacks details on permissions, rate limits, error handling, or how relevance is determined. This provides basic but incomplete 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded: the first sentence states the purpose, the second specifies the return behavior, and the 'Args' section efficiently explains the parameter. Every sentence adds value with zero waste, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (a query operation with one parameter) and the presence of an output schema (which handles return values), the description is reasonably complete. It covers purpose, return format, and parameter semantics. However, it lacks details on behavioral aspects like error cases or performance, leaving minor gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaningful semantics beyond the input schema. The schema has 0% description coverage (only a title 'Query'), but the description explains that 'query' is 'The search query string', clarifying its purpose and usage. Since there's only one parameter, this adequately compensates for the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Query the knowledge base for relevant documents.' It specifies the verb ('query') and resource ('knowledge base'), distinguishing it from sibling tools like 'add_text_to_index' or 'ingest_pdfs'. However, it doesn't explicitly differentiate from potential similar query tools, which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by stating it returns documents 'to be used as context', suggesting it's for retrieving background information. However, it provides no explicit guidance on when to use this tool versus alternatives (e.g., if other query tools exist) or any prerequisites. This leaves usage context somewhat vague.
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. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
add_text_to_index - First observed
index_documents - First observed
ingest_pdfs - First observed
query_knowledge_base
TDQS
The tools have some overlap in purpose that could cause confusion. Both 'add_text_to_index' and 'ingest_pdfs' add documents to the knowledge base, though from different sources. 'index_documents' also indexes documents but from a specific JSON file, creating potential ambiguity about when to use each ingestion method. The descriptions help clarify the differences, but the boundaries between these three tools are not perfectly distinct.
The naming follows a mostly consistent pattern with three tools using verb_noun format ('add_text_to_index', 'index_documents', 'ingest_pdfs') and one using verb_noun_noun ('query_knowledge_base'). All use snake_case consistently. The minor deviation is that 'query_knowledge_base' has an extra noun component, but the pattern remains readable and predictable.
Four tools is well-scoped for a knowledge base server. Each tool appears to earn its place with distinct functions: document ingestion from different sources, indexing initialization, and querying. This count provides complete coverage without being overwhelming for the apparent scope of managing and querying a knowledge base.
The tool surface has notable gaps in the document lifecycle. While it covers ingestion from multiple sources and querying, there are no tools for updating, deleting, or managing existing documents in the knowledge base. The server appears focused on building and querying the knowledge base, but lacks maintenance operations that would be needed for a complete CRUD lifecycle.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for querying Forkast documentation
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA local-first MCP server that enables semantic search over PDF and DOCX documents using structure-aware parsing and vector storage. It allows users to query their local knowledge base through Claude Code without cloud dependencies or GPU requirements.-
- FlicenseNot gradedqualityCmaintenanceMCP server enabling Claude Desktop to answer questions from local Word and PDF documents by searching a vector index built from their contents.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to directly interact with Elasticsearch for searching, aggregating, and retrieving documents from indices, supporting full-text search, semantic search, and various query modes.38MIT
- AlicenseAqualityBmaintenanceA local document search MCP server that indexes folders and provides hybrid keyword+semantic search, enabling users to chat with their documents via MCP clients like Claude Desktop or Claude Code.8MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ViratGarg2/ElasticMind-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server