AnkiConnect permission gateway for AI/LLM tools (read-only / per-action allowlist)

Hi,

I’m considering a small security-oriented companion for people who let external tools—especially AI/LLM agents—talk to Anki via AnkiConnect.

Problem
AnkiConnect is very capable, but client access is mostly all-or-nothing. If an automated client can connect, it can often add, update, or delete notes. A buggy or confused agent could damage a collection.

Idea
A local permission gateway in front of AnkiConnect that:

  • Speaks the normal AnkiConnect-style API so existing clients/skills can keep working
  • Lists actions and groups them (e.g. read / review / note-write / destructive / model / media / gui / sync)
  • Lets the user toggle groups or individual actions in a simple GUI
  • Ships with a safe default for AI use (e.g. read-only, writes off unless explicitly enabled)
  • Optionally logs requests for auditing

Goal: a policy layer so AI tools can’t silently wreck the deck—not a replacement for AnkiConnect.

Questions

  • Does anything like this already exist (beyond coarse “read-only” MCP wrappers)?
  • Prefer an Anki add-on, a separate local app, or both?
  • Must-have groups/actions for a safe “AI profile”?

Thanks.

visually:

Client / AI tool

http://127.0.0.1:8765


ACGuard
policy filtering

http://127.0.0.1:7865


AnkiConnect

done, <3hrs of work.

this make me feel safe.

I got paranoid personality and OCD etc.

letting LLMs to talk to anki is a must now,

with this, i could make it readonly/transparent.

finally, made into an addon format,

could fine tune,

i.e. allow readonly + add note or modify note etc.

now have snapshot.

working on “final exceptions”.