The Package Schema (hatch_pkg_metadata_schema.json) defines the structure for individual package metadata files in the Hatch ecosystem. This schema ensures consistency and validity of package metadata across the ecosystem.
The current version of the Package Schema is v1.2.2.
- v1.2.2: Added conda channel support for Python dependencies
- v1.2.1: Introduced dual entry point support
- v1.2.0: Enhanced dependency management
- v1.1.0: Added comprehensive validation
- v1.0: Initial release
The Package Schema includes the following major sections:
- Basic Package Information: Schema version, name, version, description, and tags
- Author Information: Author details and optional contributors list
- License Information: License name and optional URI
- Package Links: Repository and documentation URLs
- Dependencies: Hatch, Python, system, and Docker dependencies
- Compatibility Requirements: Hatchling and Python version constraints
- Entry Points and Tools: Dual entry point configuration (FastMCP server + HatchMCP wrapper) and additional tools
For detailed field-by-field documentation including types, formats, and examples, see the Package Schema Field Reference.
- compatibility: Object defining compatibility requirements (optional)
- hatchling: Version constraint for Hatchling compatibility
- python: Version constraint for Python compatibility
- entry_point: Primary entry point for the package (required)
- tools: List of additional tools provided by the package (optional)
- citations: Citation information for the package (optional)
- origin: Citation for the original work
- mcp: Citation for the MCP implementation
{
"package_schema_version": "1.2.1",
"name": "example_package",
"version": "1.0.0",
"description": "An example Hatch package with dual entry points",
"tags": ["example", "demo"],
"author": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"license": {
"name": "MIT",
"uri": "https://opensource.org/licenses/MIT"
},
"entry_point": {
"mcp_server": "mcp_server.py",
"hatch_mcp_server": "hatch_mcp_server.py"
},
"dependencies": {
"hatch": [
{
"name": "base_package",
"version_constraint": ">=1.0.0"
}
],
"python": [
{
"name": "numpy",
"version_constraint": ">=1.20.0"
},
{
"name": "pandas",
"version_constraint": ">=1.3.0"
}
]
},
"compatibility": {
"python": ">=3.8"
}
}