Har logo

Har

by @osfactory

Coordinates coding agents in isolated worktrees with repeatable verification and evidence capture through CLI and MCP interfaces.

Install Har

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "osfactory-har": {
      "command": "npx",
      "args": [
        "-y",
        "@osfactory/har"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

@osfactory/har provides a CLI and MCP server for running coding agents against repository-defined workflows. It creates separate worktrees, branches, ports, and project-specific databases for agent slots, then runs deterministic launch, verification, and teardown stages. MCP-connected agents can discover the project harness, control sessions, run checks, and collect evidence. Reach for it when multiple agents need to work concurrently while keeping validation tied to the exact code tested.

Use cases

  • Run multiple coding agents against one repository without shared worktrees
  • Verify agent changes with repeatable project-defined checks
  • Capture logs and artifacts for reviewable coding-agent handoffs
  • Detect drift between an installed harness and current templates

Key features

  • Isolated worktrees and branches per agent slot
  • Dedicated ports and project-specific databases where needed
  • Deterministic launch, verification, and teardown stages
  • Evidence capture for logs, artifacts, and validated tree state
  • Repository-local machine-readable harness contracts
  • CLI and MCP interfaces

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

11/11 checks healthy over the last 23d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 2d ago via OSV.dev · @osfactory/har (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars130Stargazers on the source repository.
npm downloads992Package downloads in the last 30 days.
Last commit5d agoMost recent push to the default branch.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Har works

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:

Terminal
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.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Har

@osfactory/har is an MCP server that connects coding agents to repository harnesses and isolated worktree workflows. Its MCP tools support project discovery, session control, deterministic verification, and evidence capture, allowing agents to work in separate slots and hand reviewers validated code with records of the checks performed.

Install it globally with npm using `npm install -g @osfactory/har`. In a repository, run `har onboard` to create the `.har/` directory and print a prompt for the coding agent.

Run `har env launch 1` to start an isolated environment for slot 1, then run `har env verify 1 --full` to execute the project’s full verification and record its results.

Yes. HAR documents integrations with Cursor, Claude Code, Codex, and other MCP clients. Each agent can read the same repository harness contract and work through its isolated workflow.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewHar AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/osfactory-har?style=directory)](https://allmcps.com/mcp/osfactory-har)
HTML Embed
<a href="https://allmcps.com/mcp/osfactory-har"><img src="https://allmcps.com/api/badge/osfactory-har?style=directory" alt="Har on AllMCPs" /></a>