Agent Knowledge MCP
Provides tools for Elasticsearch document search, indexing, and management with schema validation and security.
Click on "Deploy 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., "@Agent Knowledge MCP Find documents about Python deployment strategies"
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.
Agent Knowledge MCP 🔍
Complete knowledge management for AI assistants
MCP server with Elasticsearch search and document management.
🚀 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-mcpSetup for Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"agent-knowledge": {
"command": "uvx",
"args": ["agent-knowledge-mcp"]
}
}
}Setup for 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.pySupport the Project
Transform your AI into a powerful knowledge management system! 🚀
MIT License - Complete knowledge management solution for AI assistants
Available Tools
27 toolsask_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
searchA
Search documents in Elasticsearch index with advanced filtering, pagination, and time-based sorting capabilities
Inputs: index (required), query (required), size, fields, +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
Scored across 27 tools
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.
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.
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.
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
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Governed, auditable knowledge your team curates for its AI assistants, self-hostable
Search your knowledge bases from any AI assistant using hybrid RAG.
Ingest, manage, and retrieve documents for RAG-powered AI applications
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to enhance their responses with relevant documentation through a semantic vector search, offering tools for managing and processing documentation efficiently.65MIT
- AlicenseNot gradedqualityCmaintenanceEnables 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 npmMIT
- AlicenseAqualityDmaintenanceEnables AI assistants to search, analyze, and interact with Elasticsearch through natural language.1821 PyPIApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to crawl, index, and retrieve information from technical documentation using semantic search, with optional knowledge graph validation for code hallucination detection.MIT