mcp.registryΒΆ
Registry Management for MCP Servers.
This module provides comprehensive tools for managing the MCP server registry, supporting the transition from Git-based to NPM package-based server distribution.
Key FeaturesΒΆ
- Server Registry Management
Converting GitHub repositories to npm package format
Validating npm package existence and compatibility
Organizing servers into logical categories
Expanding the registry from the 1900+ server database
- Phase 3+ Implementation
The registry system supports Phase 3+ of the MCP implementation plan, focusing on package-based installation rather than Git cloning for improved reliability and performance.
Available ClassesΒΆ
Server ManagementΒΆ
ServerConverter
- Convert GitHub repos to npm packagesServerConverterConfig
- Configuration for server conversion
Registry OperationsΒΆ
Package Validation: Verify npm package existence
Category Organization: Logical server grouping
Database Expansion: Scale from existing server collections
Usage ExampleΒΆ
from haive.mcp.registry import ServerConverter
# Convert GitHub repo to npm package
converter = ServerConverter()
package_info = converter.convert_repo_to_package(
"github.com/user/mcp-server",
category="development"
)
See also
haive.mcp.downloader
for package installationhaive.mcp.discovery
for server discovery
SubmodulesΒΆ
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. |
Package ContentsΒΆ
- class mcp.registry.NPMPackageValidatorΒΆ
Validates whether npm packages exist and are installable.
- async __aenter__()ΒΆ
- async __aexit__(*args)ΒΆ
- class mcp.registry.ServerConversionΒΆ
Result of converting a GitHub server to npm package format.
- class mcp.registry.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ΒΆ