MCP ExplorerExplorer

Es Knowledge Base Mcp

@strawgateon a year ago
3 MIT
FreeCommunity
AI Systems
Seamlessly load documentation from the web into Elasticsearch and immediately allow your LLM or AI Assistant to vector search documentation.

Overview

What is Es Knowledge Base Mcp

es-knowledge-base-mcp is an MCP server designed to seamlessly load documentation from the web into Elasticsearch, enabling AI Assistants to perform vector searches on the documentation.

Use cases

Use cases include querying specific programming documentation, automating the retrieval of information for software testing, and maintaining a knowledge base for user preferences in AI Assistants.

How to use

To use es-knowledge-base-mcp, you can load documentation from various sources such as the web, git repositories, or local files. Once loaded, you can query the knowledge base using plain language questions, and the server will retrieve relevant information.

Key features

Key features include the ability to ask questions in natural language, learn from extensive documentation stores, and remember user preferences and rules. It utilizes Elasticsearch for inference and vector search, and Elastic Crawler for documentation crawling and indexing.

Where to use

es-knowledge-base-mcp can be used in various fields such as software development, technical support, and any domain requiring access to extensive documentation for quick information retrieval.

Content

Elasticsearch Knowledge Base MCP Server

Overview

This MCP server empowers your AI Assistant to ASK, LEARN, and REMEMBER:

  • ASK: Ask questions of the gathered knowledge bases, in plain language like, “What’s the best way to use local_example in ruby Rspec tests?”.
  • LEARN: Obtain and index entire documentation stores (e.x. every word of every page of https://docs.pytest.org/en/stable/contents.html) from the Web, git repositories, or the local filesystem.
  • REMEMBER: Store working information, user preferences, and rules as “memories” for future reference.

This MCP Server is powered by Elasticsearch Serverless Search (Start a free trial) for inference, and vector search, and Elastic Crawler for crawling, parsing, and indexing.

Benefits

This MCP Server significantly reduces token usage of the AI Assistant by allowing it to reference specific documentation for the task at hand instead of relying on the AI model’s internal knowledge. This allows the AI Assistant to one-shot complex tasks because it doesn’t need to guess parameter names, types, or usage. It also allows the AI Assistant to reference documentation as needed without needing to be trained on it.

Demo

Searching Documentation

See how you can autonomously search documentation stored in a knowledge base to gather details needed for a task:

https://github.com/user-attachments/assets/64b5fee1-a983-4a92-9485-bfc54f879374

Crawling Documentation

Watch how you can identify project dependencies and automatically crawl relevant web documentation to build a knowledge base:

https://github.com/user-attachments/assets/c7226aa9-9b40-45fb-877b-8721550e0576

Configuration

To use this server, the MCP host (e.g., Roo VS Code extension, Cline, VS Code) must be configured with the connection details for the target Elasticsearch cluster, including the host URL and authentication credentials (like an API Key).

This server requires connection details for your Elasticsearch cluster and is configured directly within your MCP host’s settings file (e.g., mcp_settings.json for the Roo VS Code extension).

The recommended way to run this server is using uvx, which handles fetching and running the code directly from GitHub.

VS Code

  1. Open the command palette (Ctrl+Shift+P or Cmd+Shift+P).
  2. Type “Settings” and select “Preferences: Open User Settings (JSON)”.
  3. Add the following MCP Server configuration

Cline / Roo Code

Add the following configuration block to your mcpServers object:

Available Tools

The es_knowledge_base_mcp_debug server provides the following tools:

Knowledge Base Management

  • knowledge_base_create: Create a new knowledge base.
  • knowledge_base_get: Get a list of all knowledge bases.
  • knowledge_base_get_by_backend_id: Get a knowledge base by its backend ID.
  • knowledge_base_get_by_name: Get a knowledge base by its name.
  • knowledge_base_delete_by_backend_id: Delete a knowledge base by its backend ID.
  • knowledge_base_delete_by_name: Delete a knowledge base by its name.
  • knowledge_base_update_by_backend_id: Update the metadata of an existing knowledge base by its backend ID.
  • knowledge_base_update_by_name: Update the description of an existing knowledge base by its name.

Memory

  • memory_encodings: Encode multiple memories into the memory knowledge base.
  • memory_encoding: Encode a single memory into the memory knowledge base.
  • memory_recall: Search the memory knowledge base using questions.
  • memory_recall_last: Retrieve the most recent memories from the memory knowledge base.

Ask

  • ask_questions: Ask questions of the knowledge base.
  • ask_questions_for_kb: Ask questions of a specific knowledge base.

Learn

  • learn_extract_urls_from_webpage: Extracts all unique URLs from a given webpage.
  • learn_from_web_documentation: Starts a crawl job based on a seed page and creates a knowledge base entry for it.
  • learn_active_documentation_requests: Returns a list of active documentation requests.

Fetch

  • fetch_webpage: Fetches a webpage and converts it to Markdown format.

Bulk Operations

  • call_tool_bulk: Call a single tool multiple times in a single request.
  • call_tools_bulk: Call multiple tools in a single request.

Resources

  • kb://entry: Access the details (Title, Source, Description) of a specific knowledge base entry using its unique ID or assigned name.

Contributing

For details on local development, setup, and contributing to this project, please see the Contributing Guide.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers