kuma
Integrates ESLint for linting via the static_analysis tool, parsing output into structured results.
Provides tools for viewing commit history and diffs, and includes safety measures like blocking dangerous git commands such as git push --force.
Integrates with npm for package management detection in project conventions and blocks dangerous npm publish commands.
Supports pnpm via workspace detection in monorepo awareness features.
Integrates Prettier for code formatting checks via the static_analysis tool.
Integrates Ruff for Python linting via the static_analysis tool.
Runs TypeScript static analysis (type checking) via the static_analysis tool and provides LSP-based queries with regex fallback.
Supports Yarn via workspace detection in monorepo awareness features.
Safety-first context & orchestration engine for AI coding agents.
Works with any MCP-compatible agent: Claude Code, Cursor, Windsurf, Zed, and more.
What is Kuma?
Kuma is an MCP (Model Context Protocol) server that acts as a pre-modification safety layer for AI coding agents. Before an agent touches your code, Kuma enforces a research and safety pipeline — like a pre-flight checklist for code changes.
The Problem: AI agents often modify code without understanding the full context — missing dependencies, breaking related features, or repeating past mistakes.
The Solution: Kuma is a shadow memory that injects "where is this file fragile and why is it written this way" right before the agent touches it:
🪄 Auto-inject hooks — gotchas/decisions/history injected before every edit, zero extra steps
🧠 Knowledge graph — SQLite-based derived cache (hash-verified, never stale)
📝 Decision memory — ADR-style decision tracking across sessions
📊 Kuma Studio — Visual dashboard for gotchas, decisions, and shadow-memory metrics
Related MCP server: Code Executor MCP Server
Quick Start
# Run with npx (zero setup)
npx -y @plumpslabs/kuma
# Or install globally
npm install -g @plumpslabs/kuma
kumaKuma auto-generates:
.kuma/init.md— Project-specific behavioral rules.kuma/kuma.db— SQLite knowledge graph (WASM, zero native build).skills/— Skill files for common patterns
Core Architecture: 3 Pipeline-Driven Tools
Kuma exposes 3 coarse-grained tools with 13 core actions — the full agent surface. Anything else (impact, navigate, changes, digest, drift, resume, mine, session, delete_node, clear, goal_progress, check, audit, security, gc, ast, validate, gotcha_staleness) was removed — not hidden, gone — so the agent never has to choose from 30+ options and there is no dead surface to maintain.
🧠 kuma_context — Context & Research
Action | Purpose | Impact |
| Lean project brief + restore session | 🔴 Required first |
| 5-step pipeline: cache → graph → scan → impact → decision | 🔴 Required before edits |
| Why is this file written this way (cross-session trace) | 🔴 High |
| Read a recorded architecture flow | 🔴 High |
💾 kuma_memory — Decision & Knowledge
Action | Purpose | Impact |
| Record bugs/quirks IMMEDIATELY | 🔴 Exponential |
| Record architecture flow (max 5 core files) | 🔴 Exponential |
| Record ADR-style decision with rationale | 🔴 Exponential |
| Save research findings to cache | 🟡 Linear |
| Quick lookup of memory + knowledge graph | 🟡 Linear |
🛡️ kuma_safety — Safety & Verification
Action | Purpose | Impact |
| Detect anti-patterns, drift, runaway loops | 🔴 Required |
| Auto-run scoped tests after edits | 🔴 High |
| Labeled snapshot before risky work | 🟡 Linear |
| Restore a labeled snapshot | 🟡 Linear |
Architecture
Kuma exposes exactly 3 coarse-grained tools — the agent picks an action, Kuma runs the internal workflow:
Tool | Core Actions | Purpose |
|
| Load project context, understand unfamiliar code |
|
| Persistent knowledge that saves future sessions |
|
| Pre-risk check, post-edit verification, snapshot/restore |
Everything else is an internal action — not exposed to the agent. The agent uses its own native tools for editing, searching, and execution — Kuma is memory & safety, not a code manager.
What Kuma Provides
Knowledge Graph — SQLite + FTS5 full-text search (derived cache)
Session Memory — track tool calls, recordings, and efficiency per session
Guard System — real-time monitoring with blocking warnings for anti-patterns
Shadow Injection — gotchas injected before edits via hooks (zero token waste when clean)
Kuma Studio — visual dashboard with graph, gotchas, and injection metrics
Checkpoint/Rollback — atomic snapshots before major refactors
Kuma Studio
Kuma Studio is a web-based dashboard for visualizing and managing your knowledge graph.
Features
📊 Knowledge Graph — Interactive node-edge visualization with physics simulation
⚠️ Gotchas — Known bugs and quirks with severity levels
⚡ Efficiency — Session metrics, time saved, verification pass rates
🪄 Injections — Shadow-memory metrics: injection count + time saved (24h)
📈 Staleness — Detection of stale nodes with missing file references
Usage
# Start Kuma Studio
kuma studio
# Or via npx
npx -y @plumpslabs/kuma studioStudio runs at http://localhost:3322 and provides:
Real-time graph visualization
Copy report functionality for activity analysis
Node detail modals with relations and gotchas
Search and filter capabilities
Physics-based graph layout with depth controls
Knowledge Graph Schema
Kuma builds a comprehensive knowledge graph with these node types:
Node Type | Description |
| High-level module (e.g., Auth, Billing) |
| Architecture flow between files |
| Known bug or quirk |
| ADR-style decision with rationale |
| Function or method |
| Class definition |
| UI component |
| Source file |
| API endpoint |
| Test file |
| Research cache entry |
Edge types include: contains, flows_through, owns, explains.
Safety Layer
Audit Trail
Every safety check is logged to the audit trail:
Tool name and parameters
Risk level (low/medium/high/critical)
Allowed/blocked decision
Duration and metadata
Workflow
A typical Kuma-powered session follows this flow:
1. INIT → kuma_context({ action: 'init' })
Load project brief, restore session context
2. RESEARCH → kuma_context({ action: 'research', scope: '<area>' })
5-step pipeline: cache → graph → impact → decision → safety
3. GUARD → kuma_safety({ action: 'guard' })
Check for anti-patterns, drift, runaway loops
4. EDIT → Agent modifies code (native tools)
5. RECORD → kuma_memory({ action: 'gotcha' | 'arch_flow' | 'decision' })
Record what was learned for future sessions
6. VERIFY → kuma_safety({ action: 'verify' })
Auto-run scoped tests + validation
7. CHECKPOINT → kuma_safety({ action: 'checkpoint', label: 'post-<feature>' })
Snapshot once stable — restore with rollback_label if neededPer-Project Context Model
Kuma stores all context locally in .kuma/:
.kuma/
├── kuma.db # SQLite knowledge graph (WASM) — nodes, edges, research cache, changes
├── init.md # Project behavioral rules (generated by `kuma init`)
├── memory.json # Session state + metrics (auto)
├── auto-gotcha.json # Self-learning loop state (auto)
├── policy.yml # OPTIONAL safety policy — only read if you create it
├── memories/ # Decision log markdown (decisions.md)
├── checkpoints/ # Atomic snapshots (label/ with kuma.db + files/)Hooks are registered in
.claude/settings.json(PreToolUse) — not stored under.kuma/.
Research cache is not a folder — it lives in the
research_cachetable insidekuma.db.
Key principle: Context is per-project, per-agent. No shared state between projects.
Why Kuma?
Problem | Without Kuma | With Kuma |
Context | Agent forgets project-specific patterns | Knowledge graph persists across sessions |
Safety | Agent may break critical code | Policy engine blocks risky operations |
Impact | Agent doesn't know what's affected | Impact analysis traces dependencies |
Coordination | Multiple agents conflict | Per-agent session state + audit trail avoid collisions |
Memory | Agent repeats past mistakes | Decision memory + gotchas prevent loops |
Reversibility | Hard to undo changes | Checkpoint snapshots + rollback_label |
Staleness | Knowledge becomes outdated | Drift detection + gotcha staleness checks flag stale data |
Installation
# Global install
npm install -g @plumpslabs/kuma
# Or use npx (no install needed)
npx -y @plumpslabs/kuma
# With pnpm
pnpm add -g @plumpslabs/kumaRequirements
Node.js >= 18.0.0
No native dependencies (uses WASM for SQLite)
CLI Commands
# Start MCP server (default)
kuma
# Start Kuma Studio dashboard
kuma studio
# Initialize a project
kuma init
# Show version
kuma --version
# Show help
kuma --helpConfiguration
MCP Client Configuration
Add to your MCP client config (e.g., Claude Desktop):
{
"mcpServers": {
"kuma": {
"command": "npx",
"args": ["-y", "@plumpslabs/kuma"]
}
}
}Environment Variables
Variable | Description | Default |
| Custom database path |
|
| Custom policy file |
|
| Studio server port |
|
Development
# Clone the repo
git clone https://github.com/plumpslabs/kuma.git
cd kuma
# Install dependencies
pnpm install
# Build
pnpm run build:all
# Run tests
pnpm test
# Start studio in dev mode
pnpm run studio:devPower Curve: What to Record
What to Record | When | Why | Impact |
| After tracing a complete flow | Saves 5-10 files next session | 🔴 Exponential |
| IMMEDIATELY when finding bugs | Prevents re-discovery | 🔴 Exponential |
| When choosing between options | Preserves rationale | 🔴 Exponential |
| When identifying a module | Creates owns edges to files | 🔴 Exponential |
| After exploring an area | Creates search cache | 🔴 Exponential |
Function/class nodes | Skip | Agent can grep/glob | 🟢 Skip |
Import edges | Skip | Agent can read imports | 🟢 Skip |
Visual graph | Skip | For humans, not AI | 🟢 Skip |
License
MIT — use freely in personal and commercial projects.
Community
GitHub: github.com/plumpslabs/kuma
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA local-first security system for autonomous AI agents that provides tools for security verification, goal anchoring, and action logging. It protects against prompt injection and goal drift by enforcing user-defined rules and offering performance insights through session grading.8MIT
- Alicense-qualityAmaintenanceProvides sandboxed code execution for AI agents with support for Python, JavaScript, and shell commands. Includes comprehensive safety features like destructive pattern blocking, timeout protection, and restricted file access for secure production use.41MIT
- Alicense-qualityCmaintenanceRuntime safety guardrails for AI coding agents. Checks file access, validates shell commands, and scores your repo's AI safety — all via MCP.78MIT
- Alicense-qualityBmaintenanceLocal-first memory, pipelines, learning, feedback, and safe code tools for AI coding agents.MIT
Related MCP Connectors
The WAF for agents. Pattern-based + heuristic firewall scans prompts, RAG documents, tool argume...
Git-backed platform for skills, tools, and context for AI agents
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/plumpslabs/kuma'
If you have feedback or need assistance with the MCP directory API, please join our Discord server