kuma
Zero-setup safety toolkit for AI coding agents with 16 built-in tools for context gathering, safe file editing, validation, and session memory. Features rollback, circuit breaker, sandbox, timeout, and dangerous pattern blocking — no config, no API key, no database required.
README
<div align="center">
<img src="https://raw.githubusercontent.com/plumpslabs/kuma/main/public/kuma.png" alt="Kuma Logo" width="200" />
Kuma
Zero-setup safety toolkit for AI coding agents.
Works with Claude Code, Cursor, Gemini CLI, GitHub Copilot, and any MCP-compatible client.
</div>
Quick Start
Add to your MCP client config:
{
"mcpServers": {
"kuma": {
"command": "npx",
"args": ["-y", "@plumpslabs/kuma"]
}
}
}
<details> <summary><b>Where does this config go?</b></summary>
| Client | Config Location |
|---|---|
| Claude Code | ~/.claude/settings.json |
| Cursor | Settings → Features → MCP → Add Server |
| Gemini CLI | ~/.gemini/settings.json |
| Copilot / Codex | VS Code MCP extension settings |
</details>
Kuma's Promise
Kuma is built for one thing: making sure AI agents don't break your project.
Every tool in Kuma has a safety net built-in — not as an afterthought, but as a core design principle. Here's what Kuma guarantees:
| # | When this happens... | Kuma does this... |
|---|---|---|
| 1 | LSP server is not installed | Falls back to regex — never hard fails |
| 2 | An edit breaks something | Rollback to any version — versioned backups |
| 3 | AI loops on a test failure | Circuit breaker stops it — prevents infinite retries |
| 4 | A file path doesn't resolve | Shows where it looked — CWD vs project root |
| 5 | A command is dangerous | Blocks it — rm -rf, git push --force, curl | bash |
Most tools make AI smarter. Kuma makes AI not break things.
Tools (16)
🔍 Context — Understand the codebase
| Tool | Description |
|---|---|
smart_grep |
Search code with regex. Returns filename, line, and context. Caches results. |
smart_file_picker |
Read files with smart chunking: full (entire file), smart (signatures + tail), outline (exports only). |
project_structure |
Tree view of project layout. Depth control, folder-only mode, include/exclude patterns. |
git_log |
Structured commit history with optional file filter. |
git_diff |
Structured diff output. Supports staged/unstaged, file filter, ref ranges. |
lsp_query |
Go-to-definition, find references, get type info, or rename symbols via TypeScript Language Server. Falls back to regex when LSP unavailable. |
project_conventions |
Auto-detect framework, test runner, package manager, import aliases, monorepo workspaces. |
✏️ Execution — Make changes safely
| Tool | Description |
|---|---|
precise_diff_editor |
Search-and-replace with exact → whitespace → fuzzy fallback. Auto-backup before every edit. Use action: "rollback" to undo. |
batch_file_writer |
Create up to 15 files in one call. Validates paths before writing. |
static_analysis |
Run ESLint / TypeScript / Prettier / Ruff and parse output into structured results. Auto-detects tools from project config. |
🧪 Validation — Verify before breaking
| Tool | Description |
|---|---|
execute_safe_test |
Run test/build/lint/typecheck with timeout, circuit breaker, and process tree kill. |
code_reviewer |
Senior-level static analysis. Focus modes: correctness, conventions, security, performance, and over-engineering detection. |
🧠 Memory — Know what happened
| Tool | Description |
|---|---|
get_session_memory |
Session state tracker. Shows modified files, unresolved failures, tool history. Load specific memory topics with { topic }. |
search_session_memory |
Keyword search across tool calls, memory files, errors, modified files, and dependency graph. |
write_memory |
Persist project knowledge (decisions, glossary) to .kuma/memories/. Append, prepend, or overwrite. |
kuma_reflect |
Reflection tool — checks if you're on track, detects drift (edits without tests, loops, unresolved failures), and suggests the next action. |
Safety
| Feature | What it does |
|---|---|
| Sandboxed | All file operations locked to project directory. Path traversal blocked. System dirs protected. |
| Auto-backup | .agent-backups/<timestamp>/ snapshot before every edit. Rollback to any version. |
| Circuit breaker | Stops after 3 identical failures. Prevents AI loops. |
| Timeout | All commands have configurable timeout (max 180s). Process tree kill on timeout. |
| Command whitelist | Only test, build, lint, typecheck, and explicit custom commands. |
| Dangerous pattern blocking | rm -rf, git push --force, npm publish, curl | bash blocked by default. |
| LSP graceful degradation | When TypeScript Language Server is not installed, LSP tools fall back to regex instead of hard failing. |
What Makes Kuma Unique
- Workflow combo —
project_conventions + smart_grep + smart_file_picker + precise_diff_editor + execute_safe_test + code_revieweras a seamless pipeline. - Safety is default, not optional — Rollback, circuit breaker, sandbox, timeout, dangerous pattern blocking are built into every tool.
- Graceful degradation — When dependencies are missing (LSP, linters), Kuma falls back instead of crashing.
- Over-engineering detection —
code_reviewerwithfocus: "over-engineering"catches unnecessary abstractions. - Drift detection —
kuma_reflectcatches edits without tests, tool-call loops, unresolved failures. - Persistent memory — Knowledge survives across sessions via
.kuma/memories/. Auto-generates architecture & conventions docs. - Monorepo awareness — Detects workspaces, scans
apps/*,packages/*,services/*, and pnpm/yarn/npm workspaces.
Kuma's DNA
- Zero setup, zero friction — Built-in tools that work without config. No DB, no API key.
- Safety first — Every tool has a safety net: timeout, circuit breaker, rollback, sandbox.
- Graceful degradation, not crash — Every tool has a fallback before it fails. LSP unavailable? Regex. File not found? Show resolved paths. Diff mismatch? Whitespace→fuzzy retry. Test fails? Circuit breaker stops the loop.
- Opinionated workflow — Tools designed to be used together:
conventions → grep → pick → diff → test → review. - Minimal surface — 16 focused tools. Each tool has one job and does it well. No overlap, no confusion.
Contributing
See CONTRIBUTING.md for detailed guidelines.
License
<div align="center">
Made with 🐻 for AI agents everywhere
</div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。