haive.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)

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 haive.mcp.registry.server_converter.NPMPackageValidator[source]

Validates whether npm packages exist and are installable.

async package_exists(package_name)[source]

Check if an npm package exists.

Parameters:

package_name (str)

Return type:

bool

async validate_batch(package_names)[source]

Validate multiple packages in parallel.

Parameters:

package_names (List[str])

Return type:

Dict[str, bool]

class haive.mcp.registry.server_converter.ServerConversion[source]

Result of converting a GitHub server to npm package format.

class haive.mcp.registry.server_converter.ServerConverter[source]

Converts server entries from GitHub format to npm package format.

async convert_batch(server_entries)[source]

Convert multiple server entries in parallel.

Parameters:

server_entries (List[Dict])

Return type:

List[ServerConversion]

convert_github_to_npm_candidates(github_url)[source]

Convert a GitHub URL to potential npm package names.

Parameters:

github_url (str)

Return type:

List[str]

async convert_server_entry(github_url, description='')[source]

Convert a single server entry.

Parameters:
  • github_url (str)

  • description (str)

Return type:

ServerConversion

create_registry_categories(conversions)[source]

Create registry categories from validated conversions.

Parameters:

conversions (List[ServerConversion])

Return type:

Dict[str, List[str]]

guess_category(server_name, description='')[source]

Guess the category based on server name and description.

Parameters:
  • server_name (str)

  • description (str)

Return type:

Optional[str]

async haive.mcp.registry.server_converter.main()[source]

Example usage of ServerConverter.