### Quick Development Setup (Bash) Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md Provides a quick guide for setting up the development environment for Agent Knowledge MCP, including cloning the repository, installing Python dependencies, running tests, and starting the development server. ```bash git clone https://github.com/yourusername/AgentKnowledgeMCP.git cd AgentKnowledgeMCP # Install dependencies pip install -r requirements.txt # Run tests python3 test_file_paths.py # Start development server python3 src/server.py ``` -------------------------------- ### Quick Setup for AgentKnowledgeMCP Development Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/CONTRIBUTING.md Provides a sequence of commands to quickly set up the AgentKnowledgeMCP development environment. This includes cloning the repository, installing Python dependencies, running tests, and starting the development server. ```bash # Clone the repository git clone https://github.com/itshare4u/AgentKnowledgeMCP.git cd AgentKnowledgeMCP # Install dependencies pip install -r requirements.txt # Run tests python3 tests/run_all_tests.py # Start development server python3 src/server.py ``` -------------------------------- ### Install Agent Knowledge MCP Server Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md This snippet provides the recommended command to install the Agent Knowledge MCP server using the 'uvx' package manager. It is the initial step required to set up the server on your system. ```bash # Install with uvx (recommended) uvx agent-knowledge-mcp ``` -------------------------------- ### Install Git on macOS for Version Control Tests Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/tests/README.md Instructions for installing Git on macOS using `xcode-select` or Homebrew, which is required for running version control tests. ```bash xcode-select --install # or brew install git ``` -------------------------------- ### Security Configuration Example (JSON) Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md Demonstrates how to configure security settings for the Agent Knowledge MCP, including specifying an allowed base directory for operations, restricting file operations, and enabling comprehensive logging for audit trails. ```json { "security": { "allowed_base_directory": "/your/safe/directory", "restrict_file_operations": true, "log_all_operations": true } } ``` -------------------------------- ### Configure Agent Knowledge MCP Server Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md This snippet outlines the essential bash commands to set up the configuration file for the Agent Knowledge MCP server. It involves copying an example configuration file and then opening it for editing, allowing users to customize server settings. ```bash cp src/config.json.example src/config.json nano src/config.json ``` -------------------------------- ### JSON Example to Enable Strict Document Validation Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/IMPLEMENTATION_SUMMARY.md This JSON configuration demonstrates how to activate strict schema validation. Setting `strict_schema_validation` to `true` and `allow_extra_fields` to `false` ensures that the system rejects documents containing any fields not defined in the schema. ```JSON { "document_validation": { "strict_schema_validation": true, "allow_extra_fields": false } } ``` -------------------------------- ### Document Validation Error Message Example Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md An example of the error message returned when document validation fails in strict mode, indicating that extra fields not defined in the schema were detected and are not allowed. ```text ❌ Document validation failed! Extra fields not allowed in strict mode: custom_field, extra_data Allowed fields: id, title, summary, file_path, priority, tags, source_type ``` -------------------------------- ### Python Project Dependencies Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/requirements.txt This snippet lists the external Python packages and their version constraints required for the `itshare4u/agentknowledgemcp` project. These dependencies are crucial for the project's runtime environment and are typically installed using pip. ```Python Requirements mcp>=1.10.1 elasticsearch>=7.0.0,<8.0.0 docker>=7.0.0 requests>=2.32.0 ``` -------------------------------- ### JSON Example to Disable Strict Document Validation Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/IMPLEMENTATION_SUMMARY.md This JSON configuration illustrates how to deactivate strict schema validation. By setting `strict_schema_validation` to `false` and `allow_extra_fields` to `true`, the system will permit documents to include extra fields beyond the defined schema. ```JSON { "document_validation": { "strict_schema_validation": false, "allow_extra_fields": true } } ``` -------------------------------- ### Execute Agent Workflow and VCS Demo Scripts Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/tests/README.md Provides commands to run demonstration scripts for the complete agent workflow and version control features, showcasing their functionalities. ```bash python3 tests/demo_agent_workflow.py ``` ```bash python3 tests/demo_version_control.py ``` -------------------------------- ### System Architecture Overview (Mermaid) Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md Illustrates the modular design and interaction between components of the Agent Knowledge MCP system, showing how the AI Assistant interacts with the MCP Server and its various handlers, including Elasticsearch, File System, Version Control, and Document Validation. ```mermaid graph TD A[AI Assistant] --> B[MCP Server] B --> C[Elasticsearch Client] B --> D[File System Handler] B --> E[Version Control Handler] B --> F[Document Validator] C --> G[Elasticsearch Cluster] D --> H[Local File System] E --> I[Git/SVN Repository] F --> J[Schema Validation] ``` -------------------------------- ### Run All Tests for Agent Knowledge MCP Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/tests/README.md Demonstrates how to execute all test suites simultaneously using the `run_all_tests.py` script, providing a summary of results. ```bash python3 tests/run_all_tests.py ``` -------------------------------- ### Configure Claude Desktop for Agent Knowledge MCP Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md This JSON configuration snippet demonstrates how to integrate the Agent Knowledge MCP server with Claude Desktop. It specifies the server's command and arguments within the 'mcpServers' object, enabling Claude Desktop to launch and interact with the server. ```json { "mcpServers": { "agent-knowledge": { "command": "uvx", "args": ["agent-knowledge-mcp"] } } } ``` -------------------------------- ### Configure Generic AI Assistant for Agent Knowledge MCP Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md This JSON configuration snippet provides a general structure for integrating the Agent Knowledge MCP server with various AI assistants. It defines the server's command and arguments under the 'mcp.servers' object, allowing other AI platforms to connect and utilize the server's functionalities. ```json { "mcp.servers": { "agent-knowledge": { "command": "uvx", "args": ["agent-knowledge-mcp"] } } } ``` -------------------------------- ### Agent Knowledge MCP Tool Reference (APIDOC) Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md A comprehensive list of available tools categorized by functionality, including Elasticsearch, File System, Administration, and Version Control operations, detailing the total number of tools for comprehensive knowledge management. ```APIDOC Elasticsearch: - search() - index_document() - create_index() - get_document() - delete_document() - list_indices() - delete_index() - validate_document_schema() - create_document_template() File System: - read_file() - write_file() - append_file() - delete_file() - move_file() - copy_file() - list_directory() - create_directory() - delete_directory() - file_info() - search_files() Administration: - get_config() - update_config() - validate_config() - get_allowed_directory() - set_allowed_directory() - reload_config() - setup_elasticsearch() - elasticsearch_status() - server_status() - server_upgrade() - server_uninstall() Version Control: - setup_version_control() - commit_file() - get_previous_file_version() ``` -------------------------------- ### Agent Knowledge MCP Server Capabilities Overview Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md This section documents the 34 powerful tools provided by the Agent Knowledge MCP server, categorized into four main areas: Elasticsearch Operations, File System Management, System Administration, and Version Control. Each category lists specific functionalities and their purposes. ```APIDOC Agent Knowledge MCP Capabilities: - Elasticsearch Operations (9 tools): - Smart Search: Multi-field queries with boosting and relevance scoring - Document Management: Index, retrieve, update, delete with validation - Index Administration: Create, configure, manage Elasticsearch indices - Schema Validation: Enforce document structure and data types - Template Generation: Auto-create document templates with required fields - File System Management (11 tools): - File Operations: Read, write, append, delete, move, copy with safety checks - Directory Management: Create, list, navigate directory structures - Path Intelligence: Relative/absolute path conversion and validation - File Discovery: Search files by name, content, or metadata - Cross-Platform: Windows, macOS, Linux compatibility - System Administration (11 tools): - Configuration Management: Complete config viewing, modification, and validation with strict schema controls - Security Controls: Access restrictions and path validation - Health Monitoring: System status and Elasticsearch connectivity - Auto-Setup: Intelligent Elasticsearch configuration - Environment Management: Directory permissions and structure - Strict Schema Control: Configurable document validation to prevent unauthorized field additions - Server Management: Check status, upgrade, and uninstall MCP server via uvx - Version Control (3 tools): - Repository Setup: Git/SVN initialization with best practices - File Tracking: Intelligent commit with change detection - History Access: Retrieve any previous version of files - Multi-VCS: Support for both Git and SVN workflows ``` -------------------------------- ### Execute Specific Test Files Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/tests/README.md Shows how to run individual test files for specific functionalities like file path handling, document validation, or version control. Each command targets a distinct test script. ```bash python3 tests/test_file_paths.py ``` ```bash python3 tests/test_validation.py ``` ```bash python3 tests/test_version_control.py ``` ```bash python3 tests/test_simple_vcs.py ``` ```bash python3 tests/quick_test.py ``` -------------------------------- ### Enable Debug Mode for Verbose Test Output Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/tests/README.md Shows how to activate a debug mode for tests by setting the `TEST_DEBUG` environment variable, which provides more verbose output for troubleshooting. ```bash export TEST_DEBUG=1 python3 tests/test_file_paths.py ``` -------------------------------- ### Generic Test Configuration Structure Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/tests/README.md Illustrates the structure of `test_config.json`, which defines generic paths for test directories and files, ensuring no personal information is hardcoded. ```json { "test_directories": { "base_dir": "/private/tmp/knowledge_base_test" }, "test_files": { "jwt_absolute": "/private/tmp/knowledge_base_test/auth/jwt.md", "jwt_relative": "auth/jwt.md" } } ``` -------------------------------- ### Resolve Import Errors by Changing Directory Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/tests/README.md Provides a solution for import errors by demonstrating how to navigate to the project root directory before executing test scripts. ```bash cd /path/to/AgentKnowledgeMCP python3 tests/test_file_paths.py ``` -------------------------------- ### JSON Configuration for Document Validation Settings Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/IMPLEMENTATION_SUMMARY.md This JSON snippet from `config.json` defines the `document_validation` settings. It shows how to configure strict schema validation, control extra fields, enforce required fields, and enable auto-correction of paths for Elasticsearch documents. ```JSON { "document_validation": { "strict_schema_validation": true, "allow_extra_fields": false, "required_fields_only": false, "auto_correct_paths": true } } ``` -------------------------------- ### Document Schema Validation Configuration (JSON) Source: https://github.com/itshare4u/agentknowledgemcp/blob/main/README.md Shows how to configure strict schema validation for documents within Agent Knowledge MCP, allowing control over whether extra fields are permitted, if only required fields are allowed, and enabling automatic path correction. ```json { "document_validation": { "strict_schema_validation": true, "allow_extra_fields": false, "required_fields_only": false, "auto_correct_paths": true } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.