Welcome to Hatch! This guide will help you understand what Hatch is, when to use it, and how to get started quickly.
This article is about:
- Understanding Hatch's purpose and capabilities
- System requirements and installation prerequisites
- Quick setup for immediate productivity
- Next steps for learning and exploration
Hatch is a sophisticated package manager specifically designed for Model Context Protocol (MCP) servers. It solves the complexity of installing, managing, and deploying MCP servers by handling their diverse dependencies automatically.
Environment Isolation: Create separate workspaces for different projects, similar to Python virtual environments but broader in scope.
Multi-Type Dependencies: Handle system packages (apt), Python packages (pip), other Hatch packages, and Docker containers in a single, coordinated installation.
Intelligent Dependency Resolution: Build dependency graphs, detect conflicts, and present clear installation plans before making changes.
Development-Focused Design: Optimized for rapid development, testing, and demonstration of MCP server ecosystems.
Ideal for:
- Developing and testing MCP servers
- Setting up demonstration environments
- Managing collections of related MCP servers
- Rapid prototyping with complex dependencies
- Educational scenarios and tutorials
Current limitations make it less suitable for:
- Production deployments (security enhancements needed)
- Multi-tenant systems (isolation improvements needed)
- High-security environments (integrity verification needed)
See Security and Trust for detailed guidance on deployment scenarios.
Python 3.12 or higher: Hatch requires modern Python for reliable operation.
Git: For cloning repositories and accessing package sources.
Network access: For package registry access and validation services.
Conda or Mamba: For Python environment isolation within Hatch environments. Hatch will automatically detect and use these tools if available.
Docker: For packages that include Docker-based dependencies.
Platform package manager:
- Linux:
apt(Ubuntu/Debian) - macOS: None supported (planed)
- Windows: None supported (planed)
Python Environment Detection: Hatch looks for conda/mamba in standard locations:
- Linux/macOS:
~/miniconda3/bin/conda,/opt/conda/bin/conda - Windows:
%USERPROFILE%\miniconda3\Scripts\conda.exe
If you have custom installations, Python environment features may be unavailable unless tools are in your PATH.
Ensure you have Python 3.12+ and Git installed:
python --version # Should show 3.12 or higher
git --version # Should show Git versionFor Python environment support, install conda or mamba:
# Install Miniforge (includes conda and mamba)
# Download from: https://conda-forge.org/download/Clone and install Hatch from source:
git clone https://github.com/CrackingShells/Hatch.git
cd Hatch
pip install -e .Test that Hatch is working:
hatch --versionYou should see the installed version (e.g., hatch 0.6.1). You can also view available commands:
hatch --helpYou can suffix --help to any command to get more information about it. For example:
hatch env --help
hatch package --help# Create a new environment for your project
# By default this will also initialize a Python environment with the latest Python version
hatch env create my-project
# Switch to the new environment
hatch env use my-project
# Verify you're in the correct environment
hatch env current
# Add a package (from local directory or registry)
hatch package add example-mcp-server
# List installed packages
hatch package listFor more in-depth information, please refer to the tutorials section.
Hatch provides multiple commands for viewing your environments, packages, and host configurations:
hatch env list: List all environments with package countshatch env show <name>: Detailed view of specific environmenthatch env list hosts: View environment deployments by hosthatch env list servers: View environment deployments by server
hatch mcp list hosts: Table view of hosts and servershatch mcp list servers: Table view of servers and hostshatch mcp show hosts: Detailed view of all host configurationshatch mcp show servers: Detailed view of all server configurations
hatch mcp discover hosts: Detect available MCP host platforms
Filtering: All list and show commands support regex filtering:
# Filter by server name
hatch mcp list hosts --server "weather.*"
# Filter by host name
hatch mcp show servers --host "claude.*"
# Filter by environment
hatch env list hosts --env "my-project"Hatch Environments are isolated workspaces that can contain:
- MCP servers and their configurations
- Python environments (via conda/mamba)
- Package installations and dependencies
- Environment-specific settings
Think of them as project-specific containers that keep different work separated.
Hatch handles four types of dependencies:
- System Dependencies: OS packages like
curl,git, installed via package managers - Python Dependencies: Python packages installed via pip
- Hatch Dependencies: Other MCP servers and Hatch packages
- Docker Dependencies: Container images for service dependencies
When you install a package, Hatch:
- Analyzes the package metadata and builds a dependency graph
- Presents an installation plan showing what will be installed
- Requests approval unless you use
--auto-approve - Installs dependencies in order: System → Python → Hatch → Docker
- Updates environment state with the results
# Set up project environment
hatch env create my-mcp-project
hatch env use my-mcp-project
# Add development tools
hatch package add development-tools
# Work on your project...
# Test with different configurations
hatch env create test-env
hatch env use test-env
hatch package add ./my-project # Add local package for testing# Create package template
hatch create my-new-server
# Edit package metadata
cd my-new-server
# Edit hatch_metadata.json
# Validate package structure
hatch validate .
# Test local installation
hatch package add .# Validate before adding
hatch validate .
# Add package (for automation, ensure non-interactive environment)
hatch package add .Now that you have Hatch installed and understand the basics:
-
Complete the tutorial series:
- Environment Management - Advanced environment operations
- Package Authoring - Create your own packages
- MCP Host Configuration - Deploy packages to host platforms
-
Explore reference documentation:
- CLI Reference - Complete command documentation
-
Understand limitations:
- Limits and Known Issues - Current constraints and workarounds
- Security and Trust - Security model and deployment guidance
Diagnostics: Use these commands to gather information when seeking help:
hatch --help
hatch env list
hatch package list
python --version
which conda || echo "conda not found"Hatch v0.4.2 is optimized for development and trusted network environments. Key considerations:
- Package integrity: Downloads are not cryptographically verified
- Concurrent usage: Multiple Hatch instances may conflict
- System packages: Version constraints are simplified for system dependencies
- Network dependencies: Registry access and validation require internet connectivity
- Use one Hatch instance per workspace to avoid concurrent access issues
- Test complex installations in isolated environments before production use
- Use
--dry-runto preview installations before making changes - Keep cache sizes manageable by periodically cleaning old data
- Use exact version pins for critical dependencies where precision matters
Welcome to Hatch! The tool is designed to make MCP server management straightforward while being transparent about its current capabilities and limitations. Start with simple scenarios and gradually explore more complex features as you become comfortable with the system.