Skip to main content
Glama
Agent Knowledge MCP

Agent Knowledge MCP

by fastmcp-me

Add to Cursor Add to VS Code Add to Claude Add to ChatGPT Add to Codex Add to Gemini

Agent Knowledge MCP 🔍

Complete knowledge management for AI assistants
MCP server with Elasticsearch search and document management.

Python 3.8+ MCP Compatible MIT License

🚀 Features

🔑 All-in-One Solution:

  • 🔍 Elasticsearch: Search, index, and manage documents

  • 📊 Document Validation: Schema-enforced structure

  • ⚙️ Configuration: Complete config management

  • 🛡️ Security: Sandboxed operations

✨ Benefits:

  • 🎯 20 Tools for knowledge management

  • 🤖 Works with any MCP-compatible AI (Claude, ChatGPT, VS Code, etc.)

  • 📚 Smart document management with validation

  • ⚡ Elasticsearch integration for powerful search

Related MCP server: MCP RAG Server

⚡ Quick Start

Installation

# Install with uvx (recommended)
uvx agent-knowledge-mcp

Setup for Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "agent-knowledge": {
      "command": "uvx",
      "args": ["agent-knowledge-mcp"]
    }
  }
}

Setup for VS Code

Install in VS Code

🛠️ What You Can Do

Try these with your AI assistant:

  • "Search documents for API authentication info"

  • "Index this document with proper tags"

  • "Create API documentation template"

  • "Find related documents on specific topics"

  • "Update configuration settings"

  • "Validate document structure"

🔧 Tools Overview

Tools for knowledge management:

Category

Tools

Description

🔍 Elasticsearch

9

Search, index, manage documents

⚙️ Administration

11

Config, security, monitoring

🔒 Security & Configuration

Enterprise-grade security:

  • ✅ Sandboxed operations - Configurable access controls

  • ✅ Strict schema validation - Enforce document structure

  • ✅ Audit trails - Full operation logging

  • ✅ No cloud dependencies - Everything runs locally

Configuration example:

{
  "security": {
    "log_all_operations": true
  },
  "document_validation": {
    "strict_schema_validation": true,
    "allow_extra_fields": false
  }
}

🤝 Contributing & Support

Development

git clone https://github.com/itshare4u/AgentKnowledgeMCP.git
cd AgentKnowledgeMCP
pip install -r requirements.txt
python3 src/main_server.py

Support the Project

Buy Me Coffee GitHub Sponsors


Transform your AI into a powerful knowledge management system! 🚀

MIT License - Complete knowledge management solution for AI assistants

Available Tools

27 tools
ask_mcp_adviceC

Advanced project guidance using AI-filtered knowledge from .knowledges directory

Inputs: intended_action (required), task_description (required), scope. Returns: result

ask_user_adviceB

Ask user for advice when agent encounters uncertainty, problems, or needs guidance. Use this when you're unsure about something or need human input to proceed properly.

Inputs: problem_description, context_information, specific_question, options_considered, +1 more. Returns: result

batch_index_directoryB

Batch index all documents from a directory into Elasticsearch with AI-enhanced metadata generation and comprehensive file processing

Inputs: index (required), directory_path (required), file_pattern, validate_schema, +4 more. Returns: result

create_document_templateB

Create a properly structured document template for knowledge base with AI-generated metadata and formatting

Inputs: title (required), content, priority, source_type, +5 more. Returns: result

create_indexA

Create a new Elasticsearch index with optional mapping and settings configuration

Inputs: index (required), mapping (required), settings. Returns: result

create_index_metadataB

Create metadata documentation for an Elasticsearch index to ensure proper governance and documentation

Inputs: index_name (required), description (required), purpose (required), data_types, +5 more. Returns: result

create_snapshotB

Create a snapshot (backup) of Elasticsearch indices with comprehensive options and repository management

Inputs: snapshot_name (required), repository, indices, ignore_unavailable, +3 more. Returns: result

delete_documentA

Delete a document from Elasticsearch index by document ID

Inputs: index (required), doc_id (required). Returns: result

delete_indexA

Delete an Elasticsearch index and all its documents permanently

Inputs: index (required). Returns: result

delete_index_metadataB

Delete metadata documentation for an Elasticsearch index

Inputs: index_name (required). Returns: result

elasticsearch_statusA

Check status of Elasticsearch and Kibana containers with detailed configuration information

Inputs: no named parameters. Returns: result

get_configA

Get the complete configuration from config.json file with formatted display

Inputs: no named parameters. Returns: result

get_documentB

Retrieve a specific document from Elasticsearch index by document ID

Inputs: index (required), doc_id (required). Returns: result

index_documentA

Index a document into Elasticsearch with smart duplicate prevention and intelligent document ID generation. 💡 RECOMMENDED: Use 'create_document_template' tool first to generate a proper document structure and avoid validation errors.

Inputs: index (required), document (required), doc_id, validate_schema, +3 more. Returns: result

list_indicesA

List all available Elasticsearch indices with document count and size statistics

Inputs: no named parameters. Returns: result

list_snapshotsA

List all snapshots in an Elasticsearch repository with detailed information and status

Inputs: repository, verbose. Returns: result

reload_configA

Reload configuration from config.json file and reinitialize all components with updated settings

Inputs: no named parameters. Returns: result

reset_configA

Reset config.json to defaults from config.default.json (manual reset - overwrites current config)

Inputs: no named parameters. Returns: result

restore_snapshotB

Restore indices from an Elasticsearch snapshot with comprehensive options and conflict resolution

Inputs: snapshot_name (required), repository, indices, ignore_unavailable, +4 more. Returns: result

server_statusB

Check current server status, version, and available updates with comprehensive system information

Inputs: check_updates. Returns: result

server_upgradeA

Upgrade this MCP server when installed via uvx with automatic configuration backup and restoration

Inputs: no named parameters. Returns: result

setup_elasticsearchB

Auto-setup Elasticsearch using Docker with optional Kibana and force recreate options

Inputs: include_kibana, force_recreate. Returns: result

update_configB

Update configuration with section-specific changes or full configuration replacement

Inputs: config_section, config_key, config_value, full_config. Returns: result

update_index_metadataB

Update existing metadata documentation for an Elasticsearch index

Inputs: index_name (required), description, purpose, data_types, +5 more. Returns: result

validate_configB

Validate configuration object structure, types, and values with comprehensive error reporting

Inputs: config. Returns: result

validate_document_schemaB

Validate document structure against knowledge base schema and provide formatting guidance

Inputs: document (required). Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 27 tools

    Disambiguation4/5

    Most tools have distinct purposes, e.g., user advice vs. system management. However, 'ask_mcp_advice' and 'ask_user_advice' could be confused, and 'create_document_template' and 'validate_document_schema' both deal with document structure, causing mild ambiguity.

    Naming Consistency3/5

    Names mostly use snake_case and start with a verb (e.g., create_index, delete_document), but some start with a noun (e.g., server_status, elasticsearch_status). This inconsistency can confuse an agent looking for a pattern.

    Tool Count3/5

    With 27 tools, the server covers many operations but feels slightly heavy. While each tool has a specific role, the count is borderline for an MCP server, potentially overwhelming for an agent.

    Completeness4/5

    The tool set covers most essential operations for managing an Elasticsearch knowledge base: index, document, configuration, and server management. A minor gap is the lack of an explicit update document tool beyond indexing, but overall it is comprehensive.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to search and retrieve information from your knowledge base using RAG (Retrieval-Augmented Generation) with hybrid search, document indexing, and ChromaDB vector storage.
      35 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to search, analyze, and interact with Elasticsearch through natural language.
      18
      21 PyPI
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to crawl, index, and retrieve information from technical documentation using semantic search, with optional knowledge graph validation for code hallucination detection.
      MIT