-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Created an MCP Server for Quickly Converting any MCP to ToolHive Registry According To Schema.
Overview
The MCP Registry Converter, a fully-functional MCP (Model Context Protocol) server that automates the conversion of MCP server repositories into ToolHive-compatible registry entries. This tool significantly reduces the manual effort required to add new servers to the registry, transforming a 15-20 minute manual process into a sub-minute automated workflow.
What This Adds
Core MCP Server Implementation
The converter provides two powerful tools and one prompt accessible via MCP protocol:
1. convert_repo_to_toolhive
- Accepts a GitHub repository URL as input
- Fetches and analyzes the README.md file
- Extracts server metadata using GitHub API (stars, forks, last updated)
- Intelligently parses tool lists and descriptions
- Optionally accepts AI-suggested tags and descriptions from the
enhance_registry_entryprompt - Generates properly formatted ToolHive spec.yaml output
- Validates the result against the ToolHive schema
2. validate_toolhive_yaml
- Validates YAML entries against the ToolHive registry schema
- Checks required fields (name, description, transport, repository_url)
- Verifies field values (transport types, tier, status)
- Reports detailed validation errors
3. enhance_registry_entry (MCP Prompt)
- Analyzes an MCP server repository to suggest tags and refined descriptions
- Uses the AI client running the server (Claude Desktop, local AI, etc.)
- No external API calls required
Key Features
- GitHub API Integration: Fetches README content and repository metadata (stars, forks, topics, last updated timestamp)
- AI Enhancement via MCP Prompts: Uses the
enhance_registry_entryprompt to let any MCP-compatible AI client (Claude Desktop, local AI via LMStudio/Ollama, etc.) provide suggestions directly - no external API keys needed - Local AI Support: Works seamlessly with local AI models through the MCP protocol
- Smart Extraction: Parses README structure to identify tools, transport type, and configuration
- YAML Generation: Produces properly formatted spec.yaml files ready for the registry
- Schema Validation: Ensures all outputs conform to ToolHive requirements
- Graceful Degradation: Works without AI or even without GitHub API access (generates minimal valid entries)
- Comprehensive Error Handling: Provides clear error messages and validation feedback
- Privacy-Friendly: All AI analysis happens through your chosen client - no external API calls
Usage Examples
With Claude Desktop (AI-enhanced):
"Use the enhance_registry_entry prompt for https://github.com/mongodb-js/mongodb-mcp-server, then convert it to a ToolHive registry entry"
With Local AI (LMStudio/Ollama):
Works the same way - your local AI provides analysis through the MCP prompt!
Basic conversion (no AI):
"Convert the GitHub repository at https://github.com/mongodb-js/mongodb-mcp-server to a ToolHive registry entry"
With ToolHive:
thv install mcp-registry-converter
thv mcp run mcp-registry-converterDirect Usage:
cd mcp-registry-converter
npm install && npm run build && npm startDocumentation
Comprehensive documentation included:
- README.md - Complete technical documentation
- EXAMPLES.md - Real-world usage examples and patterns
- INTEGRATION.md - Deployment and integration guide
- MCP_CONVERTER_GUIDE.md - End-user guide
- IMPLEMENTATION_SUMMARY.md - Technical implementation overview
- QUICK_REFERENCE.md - Quick reference card
Deployment & CI/CD
- Docker Support: Production-ready Dockerfile with security hardening (non-root user)
- GitHub Actions: Automated build, test, and publish workflow
- Container Registry: Automatic publishing to GitHub Container Registry on merge
- Registry Entry: The converter itself is registered in the ToolHive registry
Testing
All integration tests passing (5/5):
- ✅ README extraction and parsing
- ✅ YAML validation (valid and invalid cases)
- ✅ Spec generation and formatting
- ✅ Transport type validation
- ✅ Build and compilation
Impact
This tool will:
- Accelerate Onboarding: New MCP servers can be added to the registry in seconds instead of minutes
- Improve Quality: AI-enhanced suggestions (via MCP prompts) and automatic validation ensure consistent, high-quality entries
- Reduce Errors: Automated extraction and validation minimize human error
- Enable Bulk Import: Multiple repositories can be converted efficiently
- Lower Barriers: Makes it easier for community members to contribute new servers
- Support Local AI: Works with any MCP-compatible AI client including local models (LMStudio, Ollama, etc.)
- Privacy-Friendly: No external API calls for AI features - all analysis through your chosen AI client
Files Changed
mcp-registry-converter/- Complete TypeScript MCP server implementationregistry/mcp-registry-converter/- Registry entry for the converter itself.github/workflows/build-mcp-converter.yml- CI/CD automation- Documentation files (README, EXAMPLES, guides)
Environment Variables
Optional but recommended:
GITHUB_TOKEN- Increases GitHub API rate limit from 60/hour to 5000/hour