complete_mcp_with_parent_retriever ================================== .. py:module:: complete_mcp_with_parent_retriever .. autoapi-nested-parse:: Complete End-to-End MCP Example with Parent Document Retriever. This example demonstrates: 1. Parent-child document retrieval for MCP servers 2. Self-query capabilities with metadata filtering 3. HITL approval for server installation 4. Live server testing with tools, resources, and prompts 5. Hierarchical categorization with AutoTree The parent-child pattern allows: - Small chunks for precise similarity search (capabilities, keywords) - Full server documentation returned for context - Metadata filtering (stars, category, etc.) via self-query Classes ------- .. autoapisummary:: complete_mcp_with_parent_retriever.HITLRequest complete_mcp_with_parent_retriever.MCPServerInfo complete_mcp_with_parent_retriever.MCPSystemWithParentRetriever Functions --------- .. autoapisummary:: complete_mcp_with_parent_retriever.main Module Contents --------------- .. py:class:: HITLRequest(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` HITL approval request. .. py:attribute:: action :type: str .. py:attribute:: details :type: dict[str, Any] :value: None .. py:attribute:: risk_level :type: str :value: 'medium' .. py:attribute:: server_name :type: str .. py:class:: MCPServerInfo(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Complete MCP server information. .. py:attribute:: capabilities :type: list[str] :value: None .. py:attribute:: category :type: str .. py:attribute:: description :type: str .. py:attribute:: install_command :type: str | None :value: None .. py:attribute:: name :type: str .. py:attribute:: repository_url :type: str .. py:attribute:: setup_instructions :type: str | None :value: None .. py:attribute:: stars :type: int :value: 0 .. py:attribute:: transport_types :type: list[str] :value: None .. py:class:: MCPSystemWithParentRetriever(engine: haive.core.engine.aug_llm.AugLLMConfig) MCP system using parent-child document retrieval. .. py:method:: demonstrate_retrieval() -> None :async: Demonstrate different retrieval patterns. .. py:method:: install_top_server_with_hitl() -> str | None :async: Find and install top server with HITL approval. .. py:method:: setup_retrievers() -> None :async: Set up both parent-child and self-query retrievers. .. py:method:: test_installed_server(server_name: str) -> None :async: Test installed server with all MCP capabilities. .. py:attribute:: doc_loader .. py:attribute:: engine .. py:attribute:: installed_servers :type: dict[str, dict] .. py:attribute:: parent_retriever :value: None .. py:attribute:: rag_agent :value: None .. py:attribute:: self_query_retriever :value: None .. py:function:: main() :async: Run the complete end-to-end example.