AkiDevRule
AkiDevRule through AkiMCP: one rule set for every MCP client
AkiMCP serves your AkiDevRule rules to any MCP client through one read-only tool, aki__akidevrule_context, so a web chat that has no local CLAUDE.md still starts with the same rules as Claude Code. Every tool that acts then refuses to run without the receipt that call returns. AkiDevRule (by Lạc Việt Anh, repo lacvietanh/akidevrule) is the rule set; AkiMCP is the server that delivers it.
A word you do not know? Words you will meet

What does an MCP client get from aki__akidevrule_context?
An MCP client gets the rules a coding AI is meant to follow, delivered as one tool result instead of files on disk. An AI rule is a plain Markdown file that tells a coding AI how to work in your projects: how to write code, when to ask, what never to touch. Claude Code reads CLAUDE.md, Codex reads AGENTS.md, Gemini CLI reads GEMINI.md. AkiDevRule packages one shared set of such rules, installed with npx @akinet/akidevrule@latest for Claude Code, Codex, Gemini and Antigravity, Cursor, Kiro, Grok and OpenCode. It is MIT licensed.
How does AkiMCP serve AkiDevRule to an MCP client?
A web AI such as Claude, ChatGPT or Grok cannot read your home folder, so the rules never reach it by themselves. AkiMCP closes that gap in three steps.
- 1The server tells every client, in its initialize instructions, to call
aki__akidevrule_contextonce before its first real action, with an absoluteworkingPathwhen it knows one. - 2The tool assembles the rules itself, in the server, from live files: no model-driven reads, no shell. The AI gets one result with the rules and a
sha256:…receipt. - 3The AI then Reads only the route files its task needs from
~/.aki/akidevrule(AkiMCP grants that folder and~/.claude), as the router in the result tells it to.
What exactly is inside the tool result?
- The global
~/.claude/CLAUDE.mdwith its@imports expanded in place, then theakirulerouter (SKILL.md) with its routing table. - With a
workingPath: theCLAUDE.md,CLAUDE.local.md,AGENTS.mdandGEMINI.mdfiles from that folder up to the allowed folder that holds it, broadest first. A path outside the allowed folders is refused. - Provenance: every source with its path, size and sha256, a
status(ok,unchanged,degraded,error) and warnings such as an import cycle or a missing core file. - Two optional inputs:
modeset toexact-auditadds the import graph and precedence, andknownReceiptreturnsunchangedwithout the body when the rules have not changed.
It only reads: no writes, no commands, no URLs, and an import that points at a URL or uses a shell expression is rejected.
How does the rule receipt stop an AI that skipped the rules?
Every AkiMCP tool that is not read-only takes a receipt argument and refuses without the current one. The refusal says what to call next.
RULE_RECEIPT_MISSING: none sent.RULE_RECEIPT_STALE: a rule file changed since it was issued.RULE_RECEIPT_UNKNOWN: this server never issued it, or restarted since.RULE_RECEIPT_EVICTED: it dropped out of the 200 issued or used most recently.- A tool that acts on a project with its own
CLAUDE.mdorAGENTS.mdfirst returns that project's rules (32 KiB cap) and a new receipt, and runs when called again. A read tool always runs and adds one line naming those files.
Know the limit: a receipt proves the rules were issued by this server and have not changed, not that the AI applied them. It stops forgetting, not a deliberate forger.
What does AkiDevRule 3.8.0 change for an MCP user?
AkiDevRule 3.8.0 (2026-10-20) changes the rules your AI receives through this tool; the next call to aki__akidevrule_context after you update returns them. Release notes: AkiDevRule 3.8.0 Release Notes.
A question gets an answer, an order gets done
Your AI answers a question and changes no file. Before its first state-changing call it must name the words that ordered it, and an order then runs to the end without asking again.
The request is the whole scope
A pull request, push, deploy or tag nobody asked for is not taken because it is customary.
Open items coded Q, T, N
Q needs your answer (silence blocks), T is a call the AI took within your order (silence proceeds), N is a note (silence changes nothing). When no Q is left, you are done reading.
A rule counts only if read whole
A partial Read of a rule file no longer counts, and the route gate on Claude Code widens it to the whole file. That gate is a Claude Code hook; an MCP client without hooks relies on the receipt above.
One route-map.json
The path-to-rule map is now the data file ~/.aki/akidevrule/route-map.json, replacing three hand-copied tables. Since AkiMCP 3.1.0, the first write of a file type in a chat brings the rules this map routes it to, so web AIs get the same routed rules.
Less clutter, a tidier installer
Throwaway files go to the scratchpad or are not made, and the installer leaves no *.akidevrule-backup-* files. The rtk config is opt-in: the prompt defaults to no, or pass --rtk.
How do I get AkiDevRule into AkiMCP?
Run the installer once on the machine that runs AkiMCP (Node.js 18 or newer), or press Install / update in the panel’s “Install AkiDevRule (optional)” section. Re-running it updates. Without AkiDevRule installed the tool still answers, but with a degraded status because the core files are missing.
# Install or update
npx @akinet/akidevrule@latest
# Check only, change nothing
npx @akinet/akidevrule@latest --check
Sources: AkiDevRule project page, GitHub repository, npm package and Release 3.8.0.