Koda

io.github.aabxtract由 GitHub 账号 aabxtract 发布v0.3.2更新于 Oct 25, 2026

Verification and memory layer for coding-agent workflows.

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

Koda 是一个本地 MCP 服务器,让编码代理对自己提交的改动做针对性验证,并读取报告和反复出现问题的记忆。

可以做什么
运行针对某次提交的聚焦验证,由代理自行提供影响分析(flows、endpoints、target、commit、流程上限)。读取最新的完整 JSON 报告,包含判定结果、覆盖情况和证据路径。读取项目记忆,包括反复出现的失败、修复置信度和修复耗时。为项目生成经过校验的 GitHub Actions 工作流。
适用场景
适用于代理频繁提交代码、希望每次改动都快速验证而不必等待完整测试套件的场景,也适用于希望代理了解哪些失败反复出现、避免再次引入旧问题的场景。
运行要求
以本地 stdio 进程运行,通常通过 koda-verify npm 包用 npx 启动,因此需要 Node.js 和 npm。项目需先用 Koda 命令行初始化,生成 .koda 目录并安装 git 钩子。可选环境变量包括 GROQ_API_KEY、KODA_TARGET、KODA_TEST_TOKEN、KODA_PROJECT 及通知相关令牌;浏览器流程需要另外安装 Kane CLI 并使用用户自己的 Kane 账户。
安装前请注意
安装命令行工具会向仓库添加 git 钩子,不过已有钩子会被备份且兼容 Husky。端点检查默认只读,使用会修改数据的 HTTP 方法需显式开启。浏览器流程消耗用户自己 Kane 账户的额度,CI 工作流会引用 KANE_USERNAME 和 KANE_ACCESS_KEY 密钥。KODA_TEST_TOKEN、GROQ_API_KEY 等可选令牌从项目 .env 文件读取。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Koda,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Koda]

Koda

Verification and memory for coding-agent workflows. Install once, verify the changes that matter, remember what keeps breaking.

[npm] [npm downloads] [Open VSX downloads] [license]

1,000+ downloads on Open VSX — Koda is already watching commits in editors around the world.


npmnpm install -g koda-verify (npmjs.com)
IDEOpen VSX — works in VS Code, Cursor, Windsurf, VSCodium
MCPRegistry
Landingaabxtract.github.io/koda

Why Koda exists

Coding agents write features in minutes — but who verifies every commit? Full test suites are too slow to run per commit, so most verification happens late (or never). Koda closes that gap: on every commit it verifies only what changed, in seconds-to-minutes, and remembers what keeps breaking so your agent stops reintroducing old bugs.

Koda never writes code. It orchestrates verification, remembers patterns, and reports — to both the human and the agent.

The three surfaces

SurfaceResponsibilityActivation
Core + CLIVerification, reports, memory, git hooks, CI generationkoda init, koda run
MCP serverAgents call koda_verify / koda_report / koda_memory / koda_setup_cicdMCP client configuration
IDE extensionAmbient status bar, report viewer, one-click enable, Git watchingUser clicks Enable

How it works — the pipeline

git commit   │   ▼pre-commit ── secret guard (blocks committed API keys / private keys)   │   ▼post-commit ── koda run (background, never blocks you)   │   ▼1. Read diff ──────────── classify files: api / page / component / lib / config / test2. Impact analysis ────── agent-supplied (MCP) → Groq fallback → deterministic heuristics3. Kane browser flows ─── headless, scoped to changed UI only (page/component changes)4. Endpoint checks ────── GET / HEAD / OPTIONS only; regressions flagged (200 → 500)5. Integration tests ──── Jest / Vitest / Mocha / node:test, matched to changed files6. Report ─────────────── JSON (agent-readable) + Markdown (human-readable)7. Memory ─────────────── recurring patterns, resolution history, time-to-fix

Most commits never launch a browser: API/config/test-only changes verify with endpoints + tests in seconds. Browser flows fire only when UI files change.


Quick start

bash
npm install -g koda-verifycd your-projectkoda init        # creates .koda/, installs git hooks, detects your app's portkoda doctor      # verifies: git, config, Kane CLI, target URL, directories

Then just keep committing — verification runs in the background on every commit.

One-time browser setup (optional, per user)

Browser flows are powered by the Kane CLI. The IDE extension onboards it for you: click Enable and Koda offers to install Kane and connect your account. Or do it manually:

bash
npm install -g @testmuai/kane-clikane-cli login --oauth        # opens your browser — use (or create) YOUR OWN Kane account

About Kane accounts — yours, not ours

Koda ships zero credentials. Every Koda user authenticates their own Kane account:

  • The extension's OAuth flow opens the Kane login in your browser; new users register there
  • Your session lives locally in ~/.testmuai/ on your machine — never synced, never proxied
  • Browser-flow credits come from your Kane account, not the developer's
  • In CI, each repo configures its own KANE_USERNAME / KODA_ACCESS_KEY-style secrets

No Kane? No problem. Koda runs in degraded mode: endpoint checks, integration tests, memory, and reports all work; browser flows are honestly marked SKIPPED — never faked.


Target URLs — localhost, LAN, or hosted

Koda verifies whatever your app points at. The default is auto-detected at koda init (probes common dev ports: 3000, 5173, 8080, 8000, 4200, 5000…). Override it three ways:

bash
koda target https://myapp.vercel.app      # permanent — hosted URL, https auto-detectedkoda target 192.168.1.5:8080              # LAN IP, http auto-detectedkoda run --target https://preview-123.example.com   # one-off runKODA_TARGET=https://staging.example.com   # per-session / CI via env

Precedence: --target flag → KODA_TARGET env → .koda/config.json → auto-detected default.

CLI reference

CommandWhat it does
koda init [--force]Create .koda/, install non-destructive git hooks, detect target
koda run [--project <path>] [--commit <sha>] [--target <url>] [--max-flows <n>]Verify a commit now
koda reportShow the latest report
koda memoryDump project memory (patterns, history, fixes)
koda target <url>Validate, save, and health-check a new target URL
koda cicd [--force]Generate a validated GitHub Actions workflow (refuses overwrite)
koda doctor [--kane]Environment check; --kane empirically probes the Kane schema
koda mcpStart the MCP server (stdio)

Agent integration (MCP)

bash
claude mcp add koda -- npx koda-verify mcp

Works with any MCP client: Claude Code, Cursor, Codex, Gemini CLI, Windsurf, Zed. In a development checkout: claude mcp add koda node /absolute/path/to/koda/mcp/server.js.

MCP tools

ToolPurpose
koda_verifyRun focused verification. The agent supplies its own impact analysis (flows, endpoints, target, commit, max_flows) — it already read your code, so no LLM cost and no guessing. Groq is only a fallback for non-MCP runs
koda_reportLatest full JSON report — verdicts, coverage, evidence paths
koda_memoryProject memory — recurring failures, fix confidence, time-to-fix
koda_setup_cicdGenerate a validated GitHub Actions workflow

The agent loop

agent edits code → commits → hook fires koda run → report written→ agent calls koda_verify (its own flows) / koda_report via MCP→ reads the verdict → fixes what failed → commits again→ memory marks the failure RESOLVED (with time-to-fix recorded)

Reports record analysis_source: 'agent' when the agent supplied flows — verifiable proof the loop is agent-driven.


Reports

Every run writes a timestamped pair to .koda/reports/:

.koda/reports/2026-08-30T14-35-28-909Z-9416b29.json   ← agent-readable.koda/reports/2026-08-30T14-35-28-909Z-9416b29.md     ← human-readable

The JSON includes: commit metadata, analysis_source (agent / llm-fallback / fallback), risk level, per-check results with evidence file paths, memory context (similar failures, patterns, fix confidence), and action_required with priority and suggested focus. Markdown renders PASS / FAIL / SKIPPED distinctly with coverage status.

Raw Kane session events are preserved per-flow under .koda/evidence/.

Memory — remembers what keeps breaking

  • Every failed check gets a stable key; failures that recur 2+ times become patterns
  • When a fix lands and the check passes, the failure is marked resolved with time_to_fix_ms
  • Coverage-gap findings ("no tests cover app/page.js") resolve automatically once a passing test covers those files
  • Skipped checks (app offline) never pollute memory
  • Writes are atomic; corrupt memory files are quarantined, not deleted

Safety guarantees

  • Non-destructive hooks — existing pre-commit/post-commit/pre-push hooks are backed up before appending; Husky respected; idempotent via marker
  • Read-only HTTP by default — only GET / HEAD / OPTIONS; mutating methods require explicit opt-in (allow_mutating_methods: true) plus agent-declared endpoints
  • Honest results — if the app is down, checks are SKIPPED, never reported as failures; skipped checks never enter memory
  • No secrets shipped — the package contains zero credentials; the pre-commit guard blocks accidentally committed keys

CI/CD

bash
koda cicd

Generates .github/workflows/koda.yml from a validated template: Node setup, npm ci, build-if-present, Kane CLI install + auth via GitHub secrets (KANE_USERNAME, KANE_ACCESS_KEY), app start, wait-on target, koda run --commit ${{ github.sha }}. Template-first — no LLM-generated YAML. Refuses to overwrite without --force.


Configuration reference (.koda/config.json)

json
{  "kane": {    "target": "http://localhost:3000",    "headless": true,    "max_steps": 30,    "timeout_ms": 300000  },  "tests": {    "browser_flows": true,    "endpoint_tests": true,    "integration_tests": true,    "allow_mutating_methods": false,    "expected_statuses": { "GET /api/health": [200] }  },  "notify": { "telegram": false, "discord": false }}

Environment variables

Optional — Koda works without any of these. Loaded from the project .env, falling back to ~/.koda/.env (configure once, use everywhere):

bash
GROQ_API_KEY=        # Groq fallback impact analysis (agent runs skip this entirely)KODA_TARGET=         # override target URL (flag > env > config)KODA_TEST_TOKEN=     # bearer token for authenticated endpoint checksKODA_PROJECT=        # default project path for CLI/MCPTELEGRAM_BOT_TOKEN=  # notificationsTELEGRAM_CHAT_ID=DISCORD_WEBHOOK_URL=

Development

bash
npm installnpm run check    # syntax-check all sourcesnpm test         # node:test suitenpm link         # local koda binary for development

See koda-v3-build-guide.md for the full implementation contract.

License

MIT

来源:README.md,提交 b2d4fbe

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.3.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分