Kagan — Claude Code MCP server: what it does, how to install
Kagan is a Claude Code MCP server orchestrating autonomous development tasks through kanban flows and isolated git worktrees. Isolates agent edits without touching your main directory.
Apache-2.0 ★ 5 updated 2026-11-17
claude mcp add --env KAGAN_OPENAI_API_KEY=<KAGAN_OPENAI_API_KEY> --env KAGAN_ANTHROPIC_API_KEY=<KAGAN_ANTHROPIC_API_KEY> --env KAGAN_DB_PATH=<KAGAN_DB_PATH> --transport stdio kagan -- uvx kaganWhat Kagan does
Kagan runs an AI-assisted development workspace with thread orchestration and kanban mechanics. When pointed at a git repository, each workflow thread operates inside a dedicated git worktree. Your primary project folder remains untouched throughout the session. Security boundaries prevent agents from deleting threads, and plugins stay inactive until approved manually.
Telemetry is absent, and the software functions without requiring user accounts. Application state lives locally in ~/.kagan on macOS and Linux, or %USERPROFILE%\.kagan on Windows. Background update checks stay disabled until turned on by the user.
Running the MCP entry point with uvx depends on valid API keys in KAGAN_OPENAI_API_KEY and KAGAN_ANTHROPIC_API_KEY, plus a configured KAGAN_DB_PATH. Kagan can also be installed as a standalone desktop binary named kg via Homebrew, prebuilt binaries, or Rust source compilation.
What it helps with
- isolate agent modifications into dedicated git worktrees
- track AI coding jobs via structured kanban threads
- restrict unapproved tool executions during agent runs
- keep workspace state stored locally without telemetry
Example prompts for the agent
- List all active task threads from Kagan
- Start a new development thread in a separate git worktree
- Check file modifications across Kagan project branches
How to install Kagan
Platform CLI
claude mcp add --env KAGAN_OPENAI_API_KEY=<KAGAN_OPENAI_API_KEY> --env KAGAN_ANTHROPIC_API_KEY=<KAGAN_ANTHROPIC_API_KEY> --env KAGAN_DB_PATH=<KAGAN_DB_PATH> --transport stdio kagan -- uvx kaganReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from kagan <command>
Platform CLI
codex mcp add kagan --env KAGAN_OPENAI_API_KEY=<KAGAN_OPENAI_API_KEY> --env KAGAN_ANTHROPIC_API_KEY=<KAGAN_ANTHROPIC_API_KEY> --env KAGAN_DB_PATH=<KAGAN_DB_PATH> -- uvx kaganReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from kagan <command>
Config file
{
"mcpServers": {
"kagan": {
"command": "uvx",
"args": [
"kagan"
],
"env": {
"KAGAN_OPENAI_API_KEY": "<KAGAN_OPENAI_API_KEY>",
"KAGAN_ANTHROPIC_API_KEY": "<KAGAN_ANTHROPIC_API_KEY>",
"KAGAN_DB_PATH": "<KAGAN_DB_PATH>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from kagan <command>
Config file
{
"servers": {
"kagan": {
"type": "stdio",
"command": "uvx",
"args": [
"kagan"
],
"env": {
"KAGAN_OPENAI_API_KEY": "<KAGAN_OPENAI_API_KEY>",
"KAGAN_ANTHROPIC_API_KEY": "<KAGAN_ANTHROPIC_API_KEY>",
"KAGAN_DB_PATH": "<KAGAN_DB_PATH>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from kagan <command>
Platform CLI
gemini mcp add -e KAGAN_OPENAI_API_KEY=<KAGAN_OPENAI_API_KEY> -e KAGAN_ANTHROPIC_API_KEY=<KAGAN_ANTHROPIC_API_KEY> -e KAGAN_DB_PATH=<KAGAN_DB_PATH> kagan uvx kaganReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from kagan <command>
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 Kagan
How to install Kagan in Claude Code?
Run claude mcp add kagan -e KAGAN_OPENAI_API_KEY=<KAGAN_OPENAI_API_KEY> -e KAGAN_ANTHROPIC_API_KEY=<KAGAN_ANTHROPIC_API_KEY> -- uvx kagan in your terminal.
What does Kagan do?
It provides agent orchestration alongside a kanban interface, isolating coding operations inside separate git worktrees.
What is required to run Kagan?
The server needs uvx, your KAGAN_OPENAI_API_KEY, KAGAN_ANTHROPIC_API_KEY, and a defined database path via KAGAN_DB_PATH.