Kawa Code MCP
Team-aware memory for AI coding assistants that tracks intent, records decisions, and detects real-time conflicts before commit.
README
Kawa Code MCP
Team-aware memory for AI coding assistants. Track intent, record decisions, and see when a teammate is editing the same code — in real time, before commit.
@kawacode/mcp is the official Model Context Protocol (MCP) server for Kawa Code. It lets Claude Code, Cursor, and any MCP-compatible AI assistant:
- Remember what you're working on across sessions, branches, and machines — no more re-explaining the architecture every morning.
- Surface team conflicts before they happen — know when a teammate is editing the same file or function in their working copy right now, before either of you commits.
- Capture architectural decisions with their reasoning — future you (and future AI sessions) inherit the team's accumulated context instead of relitigating choices.
- Link commits to intent automatically — every commit gets the why attached, not just the diff.
Prerequisites
Required
- Node.js >= 18.0.0 — runtime for the MCP server
- Kawa Code desktop app running — kawa.mcp is a thin MCP-to-IPC adapter; all git operations, storage, and API communication happen in Kawa Code
Optional (for history inference)
- Anthropic API key — your own Claude API key, passed as a parameter to the inference tools
- GitHub CLI (
gh) — enables richer data tiers (PR descriptions, review comments, issue discussions). Withoutgh, tiers 2 and 4 are skipped automatically
Installation
Add the MCP in your AI configuration, for example on Claude Code:
claude mcp add -s user kawa-intents -- npx -y @kawacode/mcp
For Cursor AI, install the MCP with npm install -g @kawacode/mcp and add it to ~/.cursor/mcp.json.
{
"mcpServers": {
"kawa-intents": {
"command": "kawacode-mcp"
}
}
}
Note that the MCP will not be automatically updated to future versions in this scenario.
To upgrade to a newer release, run npm update -g @kawacode/mcp.
Manual Installation
For the project you want Kawa Code to run on, create a .mcp.json file in your project root (recommended for teams — commit it to git):
{
"mcpServers": {
"kawa-intents": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@kawacode/mcp"]
}
}
}
Usage
The MCP server works together with the Kawa Code application, Kawa Code IDE extensions, and AI code generators such as Cursor AI and Claude Code.
Pre-edit decision check (Claude Code hook)
Optional. When the agent is about to edit code that has prior recorded reasoning attached (an overlapping intent's blocks, or a constraint with the file in relatedFiles), the hook surfaces it before the Edit fires. Recommendation maps to action: silent (proceed), advisory context injected (review), or blocked with stderr message (investigate-upstream).
Wire it as a Claude Code PreToolUse hook in your ~/.claude/settings.json or project .claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{ "type": "command", "command": "npx -y -p @kawacode/mcp kawacode-on-pre-edit" }
]
}
]
}
}
Override paths when blocked:
- Persistent (recommended): record a fork decision that supersedes the existing one and retry the Edit.
record_decision(type: "fork", supersedes: ["<surfaced-decision-id>"], rationale: "...") - One-off escape hatch: add
force: trueto the Edit tool args. The hook acks the surfaced decisions in the session cache and allows the edit. Cache resets when the Kawa Code daemon restarts.
Disable the hook for a session with KAWA_PRE_EDIT_CHECK=off.
Local telemetry (logs)
Every pre-edit check fire (and force-override) appends a JSON line to a daily-rotated file at ~/.kawa-code/logs/pre-edit-decision-check-YYYY-MM-DD.jsonl. Logs are local only — nothing leaves your machine. The defaults keep the last 30 days, capped at 100 MB total (oldest files dropped first).
Each line records what fired, why, and what was filtered out — useful for tuning the recommendation thresholds and spotting false positives over time.
Disable telemetry with KAWA_PRE_EDIT_TELEMETRY=off.
Key Features
- Real-time team conflict detection — see when a teammate is editing the same files or lines in their working copy, before either of you commits. Most version-control tooling shows you this after the merge conflict; Kawa shows you before.
- Cross-session AI memory — your AI assistant picks up where it left off across days, branches, and machines. No re-explaining the architecture every morning.
- Decision history with reasoning — record forks, trade-offs, and abandoned approaches with their why. Future sessions and teammates inherit the context instead of re-deriving it.
- Commit ↔ intent linkage — every commit is automatically associated with the intent that drove it.
git logshows what changed; Kawa shows why. - Smart context retrieval — relevance-based loading; only what the current task needs.
- Zero-knowledge encryption — code blocks encrypted client-side before sync. The Kawa cloud cannot decrypt your team's code.
- Cross-platform — works with Claude Code, Cursor, and any MCP-compatible AI assistant.
Development
# Watch mode (auto-rebuild on file changes)
npm run dev
# Build TypeScript to JavaScript
npm run build
# Clean build artifacts
npm run clean
# Run the MCP server directly
npm start
Testing the MCP Server
To test the MCP server without integrating it into an AI assistant:
- Build the project:
npm run build - Run the server:
npm start - The server communicates via stdio (standard input/output)
- You can send MCP protocol messages via stdin to test tool functionality
Development Tips
- Use
npm run devto auto-rebuild during development - Check stderr for server logs (stdout is reserved for MCP protocol)
- Ensure Kawa Code is running before testing
Architecture
Claude Code / Cursor AI
↓ MCP Protocol (stdio)
kawa.mcp (this server)
↓ Huginn IPC (Unix socket / Named pipe)
Kawa Code Desktop App
└─ HTTP Client
↓ REST + SSE
Kawa API (cloud)
└─ Team sync & zero-knowledge encryption
Contributing
Contributions are welcome. Please read CONTRIBUTING.md and CLA.md.
License
This project is source-available under the Kawa Code Source Available License.
You may run and modify the software for personal or internal use.
See LICENSE for details.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。