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ΒΆ

NPMPackageValidator

Validates whether npm packages exist and are installable.

ServerConversion

Result of converting a GitHub server to npm package format.

ServerConverter

Converts server entries from GitHub format to npm package format.

FunctionsΒΆ

main()

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)ΒΆ
async package_exists(package_name: str) boolΒΆ

Check if an npm package exists.

async validate_batch(package_names: List[str]) Dict[str, bool]ΒΆ

Validate multiple packages in parallel.

session: aiohttp.ClientSession | None = NoneΒΆ
class mcp.registry.server_converter.ServerConversionΒΆ

Result of converting a GitHub server to npm package format.

category_guess: str | None = NoneΒΆ
confidence: float = 0.0ΒΆ
github_url: strΒΆ
potential_npm_packages: List[str]ΒΆ
validated_package: str | None = NoneΒΆ
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ΒΆ