Skip to content

Conversation

@VinciGit00
Copy link

Summary

This PR adds support for ScrapeGraphAI as a new registry type, with support for both PyPI and Smithery as registry backends.

Changes

Code Changes

  • ✅ Added RegistryTypeScrapeGraphAI constant in pkg/model/constants.go
  • ✅ Added RegistryURLSmithery constant for Smithery registry support
  • ✅ Created internal/validators/registries/scrapegraphai.go validator with support for:
    • PyPI (default): Validates via PyPI API, checks for mcp-name: in package README
    • Smithery: Validates via npm API (Smithery uses npm as backend), checks for mcpName in package.json
    • Direct npm: Also supported as an alternative
  • ✅ Registered validator in internal/validators/package.go
  • ✅ Updated documentation in pkg/model/types.go

Schema & API Updates

  • ✅ Added scrapegraphai to registry type examples in server.schema.json
  • ✅ Added scrapegraphai to registry type examples in openapi.yaml
  • ✅ Added https://smithery.ai to registry base URL examples in both schemas

Documentation

  • ✅ Added ScrapeGraphAI section to package-types.mdx with examples for both PyPI and Smithery
  • ✅ Documented ownership verification methods for both registry types

Registry Support

ScrapeGraphAI packages can now be published using:

  1. PyPI (https://pypi.org - default):

    • Validates via PyPI JSON API
    • Checks for mcp-name: <server-name> in package README
  2. Smithery (https://smithery.ai):

    • Validates via npm API (Smithery uses npm backend)
    • Checks for mcpName field in package.json
  3. Direct npm (https://registry.npmjs.org):

    • Also supported as an alternative

Example Usage

PyPI:

{
  "registryType": "scrapegraphai",
  "registryBaseUrl": "https://pypi.org",
  "identifier": "web-scraper-mcp",
  "version": "1.0.0"
}

Smithery:

{
  "registryType": "scrapegraphai",
  "registryBaseUrl": "https://smithery.ai",
  "identifier": "@ScrapeGraphAI/scrapegraph-mcp",
  "version": "1.0.0"
}

Testing

The validator follows the same patterns as existing registry validators (npm, pypi, etc.) and includes proper error handling and validation logic.

Related

  • Addresses support for ScrapeGraphAI packages
  • Adds Smithery as a supported registry backend

- Add RegistryTypeScrapeGraphAI constant
- Implement ValidateScrapeGraphAI validator supporting:
  - PyPI registry (default): validates via PyPI API, checks mcp-name in README
  - Smithery registry: validates via npm API (Smithery uses npm backend), checks mcpName in package.json
  - Direct npm registry: also supported as alternative
- Add RegistryURLSmithery constant
- Update schemas and documentation to include scrapegraphai registry type
- Add Smithery to supported registry base URLs
- Update package-types.mdx with ScrapeGraphAI examples for both PyPI and Smithery
- Add ScrapeGraphAI test cases to TestValidate_RegistryTypesAndUrls
- Create scrapegraphai_test.go with comprehensive test coverage
- Test both PyPI and Smithery registry backends
- Test error cases and validation logic
Remove duplicate NPMPackageResponse type and use anonymous struct instead to avoid type conflicts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant