# Karajan Code [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/manufosela/karajan-code  
**GitHub Stars:** 43  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/karajan-code

## Description
Governance layer for AI coding agents: TDD-first workflow, cross-AI review and git gates, with a codebase RAG exposed as an MCP tool.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/manufosela/karajan-code), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
curl -fsSL https://karajancode.com/install.sh | sh   # full product (npm-first; --standalone for CLI-only)
```

2. Run:

```sh
kj doctor && kj install-tools                        # complete the stack
```

3. Install:

```sh
kj init && kj env install && kj harden && kj review --install-gate
```

4. Install:

```sh
npm install -g @karajan-family/code
```

## Documentation

## What Karajan Code does

Karajan Code governs how AI coding agents carry out work in a repository. It combines a codebase retrieval system with a task method that requires work to be declared, tests to lead implementation, and changes to pass review before entering the repository.

The codebase RAG answers questions about the project and is available to the agent through the native `kj_rag_query` MCP tool. A library mode can also return engineering pattern cards, including when a pattern applies, when it should not be used, and its canonical citation.

Work is tracked on a Karajan HU Board, through the Planning Game, or on an existing project board such as Linear, Trello, Jira, or GitHub Issues through the agent’s own tools. ADRs are stored in git. Parallel tasks can use isolated worktree lanes.

## How it works

Installation activates enforcement rather than only adding instructions to an agent’s context. The setup can install git hooks, the verdict gate, and the tool gate, then place the method into the conversation that performed the installation. A pre-commit gate checks the staged change and requires an approved review verdict tied to the exact diff’s SHA-256 hash and workspace.

`kj review --staged` runs SonarQube checks on changed files before requesting an AI review. BLOCKER and CRITICAL findings reject the change. A different AI supplies the review verdict, while `kj solomon` can arbitrate disagreements. Security findings cannot be overridden through arbitration.

A deterministic Sentinel records method state during tool use and can block an agent from ending its turn with open violations. The Steward checks whether declared guarantees are still fresh and reports each invariant as `ok`, `broken`, `unknown`, or `not observable`.

## Setup and configuration

Karajan requires git and at least one AI agent CLI. Cross-AI review needs two agent CLIs, and arbitration needs three. Node.js 22 or newer is supported for the npm installation route. The package can be installed globally with `npm install -g @karajan-family/code`; the project also provides an install script, standalone binaries, Homebrew, and a Python wrapper.

A manual setup uses the following sequence:

```sh
kj doctor && kj install-tools
kj init
kj env install
kj harden
kj review --install-gate
git config core.hooksPath .karajan/hooks
```

The install asks for personal-data exclusions and writes them to `~/.karajan/privacy.yml`. Codebase indexing works with local Ollama or the built-in ONNX embedder when no external embedder can be installed. Cloud embedders require an explicit sensitivity declaration and redact PII from chunks.

## Tools and capabilities

- Query the indexed codebase through `kj_rag_query`.
- Track work with `kj hu add`, `kj hu move`, and `kj hu list`.
- Create and list repository ADRs with `kj adr add` and `kj adr list`.
- Review staged changes with deterministic analysis and cross-AI verdicts.
- Create, list, and complete isolated worktree lanes.
- Scan for sensitive data, dependency issues, prompt injection, and exposed MCP reachability.

## Limitations and notes

Karajan’s enforcement depends on activating its environment and git hooks. It will not run without a declared and verified board. At least one supported agent CLI is needed, and additional agents are required for cross-AI review or arbitration. Agent subprocesses receive an allowlisted environment so credentials such as cloud keys and registry tokens are not passed to them.

_Full upstream README: https://allmcps.com/mcp/karajan-code/readme_

