Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ __temp__/
## VS Code
.vscode/

## macOS
.DS_Store


# vvvvvvv Default Python Ignore vvvvvvvv
# Byte-compiled / optimized / DLL files
Expand Down
131 changes: 57 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,126 +2,109 @@

![Hatch Logo](https://raw.githubusercontent.com/CrackingShells/Hatch/refs/heads/main/docs/resources/images/Logo/hatch_wide_dark_bg_transparent.png)

## Introduction
Hatch is a CLI tool for configuring MCP servers across AI host platforms. Adding a server to Claude Desktop, Cursor, VS Code, and others normally means editing separate JSON config files in different locations. Hatch does it from one command.

Hatch is the package manager for managing Model Context Protocol (MCP) servers with environment isolation, multi-type dependency resolution, and multi-host deployment. Deploy MCP servers to Claude Desktop, VS Code, Cursor, Kiro, Codex, and other platforms with automatic dependency management.
It also has a package system for managing MCP servers with dependency isolation, though that part is still being developed — see [Getting Started](./docs/articles/users/GettingStarted.md) for the current state.

The canonical documentation is at `docs/index.md` and published at <https://hatch.readthedocs.io/en/latest/>.
**Current status:** suitable for development and trusted environments. Not hardened for production or multi-tenant use yet — see [Security and Trust](./docs/articles/users/SecurityAndTrust.md).

## Key Features
## What it does

- **Environment Isolation** — Create separate, isolated workspaces for different projects without conflicts
- **Multi-Type Dependency Resolution** — Automatically resolve and install system packages, Python packages, Docker containers, and Hatch packages
- **Multi-Host Deployment** — Configure MCP servers on multiple host platforms
- **Package Validation** — Ensure packages meet schema requirements before distribution
- **Development-Focused** — Optimized for rapid development and testing of MCP server ecosystems
- Configure MCP servers on one or more AI host platforms at once
- Discover which host platforms are installed on your machine
- List and inspect server registrations across all your tools
- Manage MCP server packages with dependency isolation (system, Python, Docker)

## Supported MCP Hosts

Hatch supports deployment to the following MCP host platforms:
Claude Desktop, Claude Code, VS Code, Cursor, Kiro, Codex, LM Studio, Google Gemini CLI, Mistral Vibe, OpenCode, Augment Code (Auggie CLI and Intent)

- **Claude Desktop** — Anthropic's desktop application for Claude with native MCP support
- **Claude Code** — Claude integration for VS Code with MCP capabilities
- **VS Code** — Visual Studio Code with the MCP extension for tool integration
- **Cursor** — AI-first code editor with built-in MCP server support
- **Kiro** — Kiro IDE with MCP support
- **Codex** — OpenAI Codex with MCP server configuration support
- **LM Studio** — Local LLM inference platform with MCP server integration
- **Google Gemini CLI** — Command-line interface for Google's Gemini model with MCP support
- **Mistral Vibe** — Mistral Vibe CLI coding agent

## Quick Start

### Install from PyPI
## Install

```bash
pip install hatch-xclam
```

Verify installation:
Verify:

```bash
hatch --version
```

### Install from source
Or install from source:

```bash
git clone https://github.com/CrackingShells/Hatch.git
cd Hatch
pip install -e .
```

### Create your first environment and *Hatch!* MCP server package
## Usage

```bash
# Create an isolated environment
hatch env create my_project
### Configure MCP servers on your hosts

# Switch to it
hatch env use my_project
```bash
# Local server via npx — register it on VS Code
hatch mcp configure context7 --host vscode \
--command npx --args "-y @upstash/context7-mcp"

# Create a package template
hatch create my_mcp_server --description "My MCP server"
# Remote server with an auth header — register it on Gemini CLI
export GIT_PAT_TOKEN=your_github_personal_access_token
hatch mcp configure github-mcp --host gemini \
--httpUrl https://api.github.com/mcp \
--header Authorization="Bearer $GIT_PAT_TOKEN"

# Validate the package
hatch validate ./my_mcp_server
# Register the same server on multiple hosts at once
hatch mcp configure my-server --host claude-desktop,cursor,vscode \
--command python --args "-m my_server"
```

### Deploy MCP servers to your tools

**Package-First Deployment (Recommended)** — Add a Hatch package and automatically configure it on Claude Desktop and Cursor:
### Inspect what is configured

```bash
hatch package add ./my_mcp_server --host claude-desktop,cursor
# See all servers across all hosts
hatch mcp list servers

# See all hosts a specific server is registered on
hatch mcp show servers --server "context7"

# Detect which MCP host platforms are installed
hatch mcp discover hosts
```

**Direct Configuration (Advanced)** — Configure arbitrary MCP servers on your hosts:
### Package management (in development)

```bash
# Remote server example: GitHub MCP Server with authentication
export GIT_PAT_TOKEN=your_github_personal_access_token
hatch mcp configure github-mcp --host gemini \
--httpUrl https://api.github.com/mcp \
--header Authorization="Bearer $GIT_PAT_TOKEN"
The package system lets you install MCP servers with automatic dependency resolution and environment isolation. It is functional but being reworked for better integration with MCP registries.

# Local server example: Context7 via npx
hatch mcp configure context7 --host vscode \
--command npx --args "-y @upstash/context7-mcp"
```bash
hatch env create my_project
hatch env use my_project
hatch package add ./my_mcp_server
```

## Documentation

- **[Full Documentation](https://hatch.readthedocs.io/en/latest/)** — Complete reference and guides
- **[Getting Started](./docs/articles/users/GettingStarted.md)** — Quick start for users
- **[CLI Reference](./docs/articles/users/CLIReference.md)** — All commands and options
- **[Tutorials](./docs/articles/users/tutorials/)** — Step-by-step guides from installation to package authoring
- **[MCP Host Configuration](./docs/articles/users/MCPHostConfiguration.md)** — Deploy to multiple platforms
- **[Developer Docs](./docs/articles/devs/)** — Architecture, implementation guides, and contribution guidelines
- **[Troubleshooting](./docs/articles/users/Troubleshooting/ReportIssues.md)** — Common issues and solutions
- **[Full Documentation](https://hatch.readthedocs.io/en/latest/)**
- **[Getting Started](./docs/articles/users/GettingStarted.md)**
- **[CLI Reference](./docs/articles/users/CLIReference.md)**
- **[MCP Host Configuration](./docs/articles/users/MCPHostConfiguration.md)**
- **[Tutorials](./docs/articles/users/tutorials/)**
- **[Troubleshooting](./docs/articles/users/Troubleshooting/ReportIssues.md)**

## Contributing

We welcome contributions! See the [How to Contribute](./docs/articles/devs/contribution_guides/how_to_contribute.md) guide for details.

### Quick start for developers

1. **Fork and clone** the repository
2. **Install dependencies**: `pip install -e .` and `npm install`
3. **Create a feature branch**: `git checkout -b feat/your-feature`
4. **Make changes** and add tests
5. **Use conventional commits**: `npm run commit` for guided commits
6. **Run tests**: `wobble`
7. **Create a pull request**

We use [Conventional Commits](https://www.conventionalcommits.org/) for automated versioning. Use `npm run commit` for guided commit messages.
We welcome contributions. See [How to Contribute](./docs/articles/devs/contribution_guides/how_to_contribute.md) for details.

## Getting Help
Quick setup:

- Search existing [GitHub Issues](https://github.com/CrackingShells/Hatch/issues)
- Read [Troubleshooting](./docs/articles/users/Troubleshooting/ReportIssues.md) for common problems
- Check [Developer Onboarding](./docs/articles/devs/development_processes/developer_onboarding.md) for setup help
1. Fork and clone the repository
2. Install dependencies: `pip install -e .` and `npm install`
3. Create a feature branch: `git checkout -b feat/your-feature`
4. Make changes and add tests
5. Use conventional commits: `npm run commit`
6. Run tests: `wobble`
7. Open a pull request

## License

This project is licensed under the GNU Affero General Public License v3 — see `LICENSE` for details.
GNU Affero General Public License v3 — see `LICENSE` for details.
4 changes: 3 additions & 1 deletion docs/articles/api/cli/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ This module provides handlers for:
- vscode: Visual Studio Code with Copilot
- kiro: Kiro IDE
- codex: OpenAI Codex
- lm-studio: LM Studio
- lmstudio: LM Studio
- gemini: Google Gemini
- mistral-vibe: Mistral Vibe CLI coding agent
- opencode: OpenCode AI coding assistant
- augment: Augment Code AI assistant

## Handler Functions

Expand Down
Loading
Loading