# @osfactory/har [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/os-factory/har  
**GitHub Stars:** 123  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/osfactory-har

## Description
HAR: open agent harness CLI and MCP server for coding agents, isolated worktrees, and software-factory workflows

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What @osfactory/har does

@osfactory/har is an agent harness for software repositories. It exposes the harness through both a command-line executable and an MCP server, allowing coding agents to discover a repository’s working contract and control isolated development sessions. The repository contract lives in a `.har/` directory and describes the project stack, available scripts, and checks used by the workflow.

Each agent task runs in a separate slot. A slot can provide its own worktree, branch, ports, and database when the project requires one. This keeps the main checkout unchanged and prevents concurrent agents from sharing runtime state. After the work is checked, the branch and verification evidence remain available for handoff or review.

## How it works

The workflow is organized around discovery, isolation, build, verification, and handoff. Discovery reads the repository’s harness contract so an agent can determine how the project is expected to run and which checks are available. Isolation creates the task’s working copy and runtime resources. The agent then edits and tests code inside that copy rather than in the main checkout.

Verification invokes the project’s configured checks through a consistent pipeline. A full verification can capture the state of the complete codebase at the time of the check, tying the result to the exact tree that was tested. HAR retains logs, artifacts, validation results, and a tree hash as evidence. Once the session is torn down, the code branch and recorded proof can be passed to a reviewer.

This model is useful for a single controlled coding session or for several agents working on the same repository concurrently. It also provides a common contract for Claude Code, Cursor, Codex, and other MCP-connected agents instead of relying on separate agent-specific instructions.

## Setup and configuration

Install the package globally with npm:

```bash
npm install -g @osfactory/har
```

From a repository, `har onboard` scaffolds the `.har/` directory and prints a prompt for the coding agent. A basic session can then be started with `har env launch 1`, using slot 1 for the isolated environment. Run `har env verify 1 --full` to execute the project’s full checks and record their results.

The repository’s `.har/` contract is the central configuration point described by the material. HAR can also compare an installed harness with current templates through `har env maintain`, which helps identify configuration drift. Framework-specific verification bundles are available through the project’s plugin system, including documented examples for Playwright and RocketSim.

## Tools and capabilities

The @osfactory/har MCP server provides structured tools for:

- Discovering a project’s harness contract and available workflow checks.
- Controlling coding-agent sessions and their isolated environments.
- Launching and tearing down repository worktrees and related runtime resources.
- Running verification stages and recording validation results.
- Collecting evidence such as logs, artifacts, and validated tree state.

The same core workflow is available through the `har` CLI. A local Mission Control dashboard is also included in the broader HAR project for tracking repositories, worktrees, runs, validations, and artifacts, although the supplied material does not define it as an MCP tool.

## Limitations and notes

HAR depends on a repository-specific harness contract and the project’s configured scripts and checks. The material does not specify a fixed language, framework, database, or verification command that applies to every repository. Database isolation is available where a project needs it, rather than being guaranteed for every task.

The supplied documentation identifies Claude Code, Cursor, and Codex as supported agent integrations, and states that other MCP agents can use HAR. Detailed MCP tool names, transport settings, environment variables, and client-specific configuration are not provided in the supplied material, so those details should be checked in the project’s MCP and agent-integration documentation.

_Full upstream README: https://allmcps.com/mcp/osfactory-har/readme_

