complete_mcp_with_parent_retrieverΒΆ
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ΒΆ
HITL approval request. |
|
Complete MCP server information. |
|
MCP system using parent-child document retrieval. |
FunctionsΒΆ
|
Run the complete end-to-end example. |
Module ContentsΒΆ
- class complete_mcp_with_parent_retriever.HITLRequest(/, **data: Any)ΒΆ
Bases:
pydantic.BaseModel
HITL approval request.
- class complete_mcp_with_parent_retriever.MCPServerInfo(/, **data: Any)ΒΆ
Bases:
pydantic.BaseModel
Complete MCP server information.
- class complete_mcp_with_parent_retriever.MCPSystemWithParentRetriever(engine: haive.core.engine.aug_llm.AugLLMConfig)ΒΆ
MCP system using parent-child document retrieval.
- async test_installed_server(server_name: str) None ΒΆ
Test installed server with all MCP capabilities.
- doc_loaderΒΆ
- engineΒΆ
- parent_retriever = NoneΒΆ
- rag_agent = NoneΒΆ
- self_query_retriever = NoneΒΆ
- async complete_mcp_with_parent_retriever.main()ΒΆ
Run the complete end-to-end example.