Skip to main content
MCP server CX Codex

kcp-harness — Claude Code MCP server: audit what your agent reads

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

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add kcp-harness -- npx -y kcp-harness
Open on GitHub

What kcp-harness — KCP compliance proxy 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.

What it helps with

  • 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 for the agent

  • 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/

How to install kcp-harness — KCP compliance proxy

Platform CLI

claude mcp add kcp-harness -- npx -y kcp-harness

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about kcp-harness — KCP compliance proxy

How do I install kcp-harness in Claude Code?

Run claude mcp add kcp-harness -- npx -y kcp-harness, then kcp-harness init for harness.yaml and kcp-harness integrate claude-code for .mcp.json and the PreToolUse hooks.

What does kcp-harness do?

It intercepts agent calls that touch governed knowledge, runs them through a 14-gate cascade and logs the outcome. It also tracks spend and holds approval tickets.

What does kcp-harness need to run?

A harness.yaml file from kcp-harness init plus an integration for your agent. The planner uses no LLM, which keeps decisions reproducible.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor