# kcp-harness — KCP compliance proxy

A proxy that decides which project knowledge an agent may reach and records every decision it makes.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: Cantara
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Cantara/kcp-harness
- Updated: 2026-10-07
- HTML: https://affpapa.org/en/nevibecode/mcp/kcp-harness-kcp-compliance-proxy

## What it does

kcp-harness takes the MCP calls your agent makes and routes knowledge access through itself. A classifier splits governed paths from ordinary ones, then the request walks a cascade of 14 deterministic gates covering audience, time, budget and context limits. No model takes part in planning, so the same input yields the same plan.

Governance leaves artifacts behind: per-request decision traces, an append-only JSONL log, a spend ledger with a ceiling, and approval tickets tied to a named reviewer. When verification fails, the agent gets nothing back. There is no way around the layer, since the agent only sees the proxy's MCP interface.

Install with `npm install -g kcp-harness`, run `kcp-harness init` to create `harness.yaml`, then `kcp-harness integrate claude-code` to write `.mcp.json` and PreToolUse hooks. The same `integrate` command covers Cursor, Copilot, Windsurf, Cline and other agents, each with its own config format. Pre-built binaries for Linux, macOS and Windows skip Node entirely.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add kcp-harness -- npx -y kcp-harness
```

### Codex

**Platform CLI**
```bash
codex mcp add kcp-harness-kcp-compliance-proxy -- npx -y kcp-harness
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "kcp-harness-kcp-compliance-proxy": {
            "command": "npx",
            "args": [
                "-y",
                "kcp-harness"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "kcp-harness-kcp-compliance-proxy": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "kcp-harness"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add kcp-harness-kcp-compliance-proxy npx -y kcp-harness
```

## When to use it
- show why the agent opened a particular file
- keep agent spending under a set ceiling
- keep a log of every knowledge read
- block reads of deprecated or withdrawn documents
- send borderline reads to a human for sign-off

## Example prompts
- Plan the knowledge load with `kcp_plan` and list the skipped units
- Load a governed document with `kcp_load`
- Show the decision trace for the last read under `docs/`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
