# @osfactory/har [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/os-factory/har  
**GitHub Stars:** 135  
**npm Downloads (last month):** 5533  
**Views:** 3  
**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
Install path inferred — verify against the README before running it. Uses `npx` (confidence: medium):

```json
"mcpServers": {
  "har": {
    "command": "npx",
    "args": ["-y","@osfactory/har"]
  }
}
```

## Documentation

## What @osfactory/har MCP server does

@osfactory/har exposes a repository harness to coding agents through MCP, while also providing the `har` command-line interface. The harness stores a machine-readable contract in the repository’s `.har/` directory. That contract describes the project stack, available scripts, and checks that agents can use.

The server is intended for coding workflows where isolation and verification matter. Each task runs in an agent slot with its own worktree and branch. Depending on the project, the slot can also receive dedicated ports and a separate database. The main checkout remains unchanged while the agent builds and tests its work.

## How it works

An agent first discovers the project’s harness contract. HAR then prepares an isolated slot for the task, allowing multiple agents to operate on the same repository without sharing Git state or runtime resources.

The workflow proceeds through repeatable stages:

- Launch an isolated worktree and the project’s running stack.
- Let the agent edit and test within that slot.
- Run the repository’s configured checks through the verification pipeline.
- Record logs, artifacts, validation results, and the checked tree state.
- Tear down the session while retaining the branch and verification evidence.

A full verification ties the result to the complete codebase state at the time of the check. This gives reviewers both the proposed code and a record of what was executed against it.

## 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 and verified with:

```bash
har env launch 1
har env verify 1 --full
```

The numeric argument identifies the agent slot. HAR is designed to use the project’s own tools, tests, and CI-oriented checks through the harness contract. The `har env maintain` command can compare an installed harness with current templates and identify configuration drift.

## Tools and capabilities

The MCP interface provides structured operations for:

- Discovering a repository’s harness, stack, scripts, and checks.
- Controlling agent sessions and isolated worktree slots.
- Launching and managing project environments.
- Running standard or full verification.
- Capturing evidence, logs, artifacts, and validation results.
- Supporting handoff of a verified branch to a reviewer.

HAR also supports plugins that register framework-specific verification stages, including bundles for Playwright and RocketSim.

## Limitations and notes

The server’s behavior depends on the harness contract configured in each repository. Verification runs the project’s defined checks rather than imposing one universal test framework. Separate ports and databases are available where the project requires them, so the isolation setup is project-dependent.

HAR is intended for MCP-compatible coding agents and is documented for Claude Code, Cursor, Codex, and other MCP clients. Its broader distribution also includes a local Mission Control dashboard, but the MCP server itself focuses on discovery, session control, verification, and evidence.

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

