Enforces AI coding assistant rules from instruction files by blocking prohibited tool calls and logging compliance locally.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Arai.
An instruction file is advice β the model can read CLAUDE.md and still force-push anyway. Arai turns instruction files (CLAUDE.md, AGENTS.md, .cursorrules, and others) into enforcement via native hooks: rules derived from prohibitive language block the tool call outright, advisory rules inject the relevant constraint at the point it applies, and a tamper-evident audit log records, per rule, whether the model actually complied.

That's it. Arai discovers your instruction files, extracts the rules, classifies their intent, scans your codebase for context, and sets up native hooks so guardrails fire at the right moment.
When your AI coding assistant (Claude Code or Grok Build) is about to do something your rules cover, Arai injects the relevant guardrail β right when it matters. Rules derived from prohibitive predicates (never, forbids, must_not) actually block the tool call instead of just advising.
Rules only fire when relevant. No noise on ls. No repeating principles already in your instruction files.
Every firing is written to a local audit log, and every PostToolUse is correlated with the matching PreToolUse to produce a compliance verdict β so you can measure whether the model actually honours the rules you wrote.
| File | Tool | Enforcement |
|---|---|---|
CLAUDE.md | Claude Code | Hooks (block + advise) |
AGENTS.md / Agents.md | Grok Build (native) | Hooks (block; advise best-effort) |
~/.claude/CLAUDE.md | Claude Code (global) | Hooks (block + advise) |
~/.grok/ AGENTS.* files | Grok Build (global) | Hooks (block; advise best-effort) |
.cursorrules / .cursor/rules | Cursor | MCP (advise) |
.windsurfrules | Windsurf | MCP (advise) |
.github/copilot-instructions.md | GitHub Copilot | Ingest only |
Rules from every file are parsed, classified, and stored the same way β but enforcement strength depends on what surface the assistant exposes.
deny decisions and actually block tool calls.decision: deny + exit 2) when the
host invokes hooks (verified on 1.0.0 headless with --trust; project
hooks stay inactive until the folder is trusted). Advisory text is still
emitted as additionalContext on allow responses and recorded in the audit
log, but Grok's documented PreToolUse contract only specifies
allow / deny+reason β so warn/inform injection into the model is
best-effort until the host surfaces that field. Treat block as the
guarantee; treat advise as optional context. See
docs/upstream/grok-hooks-reverification-1.0.0.md.arai stats, arai diff, and the audit log.Arai hooks several more events alongside the standard tool-call events (when the assistant supports them) so the rule set stays accurate to the live working tree:
FileChanged + InstructionsLoaded β when an instruction file
(CLAUDE.md, rules-dir, memory file, ...) is edited on disk or loaded
into context, Arai spawns an arai scan in the background. The next
tool-call hook sees the updated guardrails β no manual rescan.CwdChanged β when Claude cds into a different directory
(monorepo navigation), Arai re-scans rooted at the new directory so
the next tool call matches against the right project's rules.PostToolBatch β when Claude does a batch of parallel tool calls,
Arai correlates each call individually against any PreToolUse firings
in the same session, so per-rule compliance verdicts (Obeyed /
Ignored / Unclear) stay accurate on parallel workloads.Arai doesn't just do keyword matching. It understands your rules:
migrations/versions/ triggers alembic rules even if the file doesn't mention alembic, because sibling files import itfrom alembic import op in file content being writtennever/always/don't/must, should/shouldn't, cannot/refuse, make sure/be sure, consider/recommend, bare No X prohibitions, conditional shapes (When X, do Y / Before X: do Y / If X β do Y), and the section-aware Use X style-guide pattern. Severity mapping mirrors grammatical weight: should is Inform (soft), should not is Block (the writer chose to call out a specific prohibition).| An instruction file alone | With Arai |
|---|---|
| Advice the model can skip under pressure | Prohibitions deny the tool call at the hook |
| No record of what was ignored | Hash-chained audit log; arai audit --verify |
| You hope it listened | Per-rule obeyed / ignored / unclear verdicts |
| Rewrite rules into a new policy format | Your existing files are the policy |
Beyond firing rules, Arai produces a tamper-evident local record of every guardrail decision and correlates it with what the model actually did. This is what tech leads and compliance reviewers want to see β the trail behind the enforcement.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/taniwhaai-arai)<a href="https://allmcps.com/mcp/taniwhaai-arai"><img src="https://allmcps.com/api/badge/taniwhaai-arai?style=directory" alt="Arai on AllMCPs" /></a>