Skip to main content
Glama
Agent Knowledge MCP

Agent Knowledge MCP

by itshare4u

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: SourceSync.ai MCP 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_adviceA

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_directoryA

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_templateC

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_indexB

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_snapshotC

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_documentB

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_statusB

Check status of Elasticsearch and Kibana containers with detailed configuration information

Inputs: no named parameters. Returns: result

get_configB

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

Inputs: no named parameters. Returns: result

get_documentA

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_snapshotsC

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

Inputs: repository, verbose. Returns: result

reload_configB

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_snapshotC

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

    A3.5/5.0

    Scored across 27 tools

    Disambiguation4/5

    Most tools have distinct purposes, but some overlap exists. For example, 'ask_mcp_advice' and 'ask_user_advice' both involve seeking guidance, which could cause confusion. However, their descriptions clarify that one uses AI-filtered knowledge and the other involves human input, helping to differentiate them. Overall, the tools are well-defined with minimal ambiguity.

    Naming Consistency5/5

    Tool names follow a consistent snake_case pattern with clear verb_noun structures, such as 'create_document_template', 'delete_index', and 'validate_config'. There are no deviations in naming conventions, making the set predictable and easy to understand. This consistency aids in agent selection and reduces confusion.

    Tool Count3/5

    With 27 tools, the count is borderline high for an MCP server focused on Elasticsearch and knowledge management. While it covers many operations, it may feel heavy and could overwhelm agents. A more streamlined set of 15-20 tools might be more appropriate, but the current scope is still manageable given the domain's complexity.

    Completeness5/5

    The tool surface provides comprehensive coverage for Elasticsearch operations and knowledge base management, including CRUD for documents and indices, configuration handling, backup/restore, and validation. There are no obvious gaps; agents can perform full lifecycle management, from setup to maintenance, without encountering dead ends.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables LLMs to interact with Elasticsearch clusters, allowing them to manage indices and execute search queries using natural language.
      2
      -
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI models to interact with SourceSync.ai's knowledge management platform for managing documents, ingesting content from various sources, and performing semantic searches.
      25
      1
      ISC
    • F
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
      2
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      A Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.
      90
      MIT