haive.mcp.documentation.doc_loader¶
MCP documentation loader for server discovery and setup extraction.
Loads, searches, and extracts setup information from the pre-indexed database of 1,960+ MCP servers. Includes lightweight GitHub README fetching via aiohttp (no external framework dependencies).
Example
from haive.mcp.documentation import MCPDocumentationLoader
loader = MCPDocumentationLoader()
all_docs = loader.load_all_mcp_documents()
print(f"Loaded {len(all_docs)} servers")
results = loader.search_servers_by_capability("database")
for server in results:
info = loader.extract_setup_info(server)
print(info["name"], info.get("install_command"))
Classes¶
Loads and processes MCP server documentation from the local database. |
Module Contents¶
- class haive.mcp.documentation.doc_loader.MCPDocumentationLoader(resources_path=None)[source]¶
Loads and processes MCP server documentation from the local database.
Initialize the documentation loader.
- Parameters:
resources_path (pathlib.Path | None) – Path to the data directory containing MCP servers. Defaults to the package’s
data/directory.
- async fetch_github_readme(repo_url)[source]¶
Fetch README from a GitHub repository via the API.
Uses aiohttp directly – no external framework dependencies.
- generate_server_config(server_name)[source]¶
Generate an MCP server configuration from a server in the database.
Returns a config dict that can be used with: - haive-mcp
MCPServerConfig- Claude Desktopmcp.json-langchain-mcp-adaptersMultiServerMCPClient
- get_enriched_server(server_name)[source]¶
Get a server enriched with data from its individual document file.
The individual document files in
data/mcp_servers/documents/contain full README content, descriptions, stars, and other metadata not present in the lightweight index.
- load_all_mcp_documents()[source]¶
Load all MCP server documentation from the stored JSON.
Tries multiple data files in order of preference: 1. ALL_MCP_SERVERS_COMPLETE.json (full database) 2. organized_servers.json (organized version) 3. all_mcp_documents.json (original)