kcp-agent — Claude Code MCP server: what it does, how to install
Builds deterministic load plans from KCP knowledge manifests before calling an LLM. It selects relevant context units while enforcing token and budget limits.
claude mcp add kcp-agent -- npx -y kcp-agentWhat kcp-agent — KCP navigation planner does
The server inspects knowledge.yaml files to determine which context fragments should be retrieved for a given prompt. Rather than feeding entire folders into an agent prompt, it scores unit relevance, checks signature trust, and filters out expired units before any prompt synthesis takes place.
The planning core runs deterministically without model inference. Units exceeding the --context-budget token threshold or lacking clearance are excluded under a fail-closed policy, accompanied by the arithmetic reason in the output.
Generating inspection plans with plan works offline without external credentials. Running ask to answer the prompt requires the ANTHROPIC_API_KEY environment variable.
What it helps with
- build a context loading plan from a
knowledge.yamlmanifest - enforce context token ceilings before fetching external docs
- exclude unauthorized or temporally expired documentation units
- verify that generated answers match loaded reference sources
Example prompts for the agent
- Generate a load plan for deploying to production using knowledge.yaml
- Filter the knowledge manifest against a context budget of 4000 tokens
How to install kcp-agent — KCP navigation planner
Platform CLI
claude mcp add kcp-agent -- npx -y kcp-agentPlatform CLI
codex mcp add kcp-agent-kcp-navigation-planner -- npx -y kcp-agentConfig file
{
"mcpServers": {
"kcp-agent-kcp-navigation-planner": {
"command": "npx",
"args": [
"-y",
"kcp-agent"
]
}
}
}Config file
{
"servers": {
"kcp-agent-kcp-navigation-planner": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"kcp-agent"
]
}
}
}Platform CLI
gemini mcp add kcp-agent-kcp-navigation-planner npx -y kcp-agentStep 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-agent — KCP navigation planner
How do I install kcp-agent in Claude Code?
Run claude mcp add kcp-agent -- npx -y kcp-agent in your terminal.
What does kcp-agent do?
It processes Knowledge Context Protocol manifests to determine which documentation units should be loaded for a task, keeping prompts within token and spend limits.
Is an API key required to create load plans?
No API key is needed for plan, which computes relevance and token ceilings locally. The ANTHROPIC_API_KEY variable is only required when running ask to generate answers.