mcp.registry.server_converterΒΆ
Server Registry Converter for Phase 3+.
This module converts GitHub-based server entries from the 1900+ server database into npm package format for the MCP Manager registry.
Features: - Converts GitHub URLs to potential npm package names - Validates npm package existence - Generates category mappings - Creates installable server lists
- Usage:
from haive.mcp.registry.server_converter import ServerConverter
converter = ServerConverter()
# Convert known patterns npm_packages = await converter.convert_github_to_npm_batch([
])
# Validate packages exist on npm valid_packages = await converter.validate_npm_packages(npm_packages)
AttributesΒΆ
ClassesΒΆ
Validates whether npm packages exist and are installable. |
|
Result of converting a GitHub server to npm package format. |
|
Converts server entries from GitHub format to npm package format. |
FunctionsΒΆ
|
Example usage of ServerConverter. |
Module ContentsΒΆ
- class mcp.registry.server_converter.NPMPackageValidatorΒΆ
Validates whether npm packages exist and are installable.
- async __aenter__()ΒΆ
- async __aexit__(*args)ΒΆ
- class mcp.registry.server_converter.ServerConversionΒΆ
Result of converting a GitHub server to npm package format.
- class mcp.registry.server_converter.ServerConverterΒΆ
Converts server entries from GitHub format to npm package format.
- async convert_batch(server_entries: List[Dict]) List[ServerConversion] ΒΆ
Convert multiple server entries in parallel.
- convert_github_to_npm_candidates(github_url: str) List[str] ΒΆ
Convert a GitHub URL to potential npm package names.
- async convert_server_entry(github_url: str, description: str = '') ServerConversion ΒΆ
Convert a single server entry.
- create_registry_categories(conversions: List[ServerConversion]) Dict[str, List[str]] ΒΆ
Create registry categories from validated conversions.
- guess_category(server_name: str, description: str = '') str | None ΒΆ
Guess the category based on server name and description.
- category_mappingΒΆ
- conversion_patterns = [('github\\.com/modelcontextprotocol/server-(\\w+)', '@modelcontextprotocol/server-\\1'),...ΒΆ
- validatorΒΆ
- async mcp.registry.server_converter.main()ΒΆ
Example usage of ServerConverter.
- mcp.registry.server_converter.loggerΒΆ