AnkiMCP Server
CAUTIONgrade C · trust 71/100An Anki addon that implements an MCP server, enabling AI assistants to interact with Anki, the spaced repetition flashcard application.
aianki addonanki mcpmcpOverview
From the repository's own README, as read at the audited commit.
# AnkiMCP Server (Addon)<div align="center"> <img src="./docs/images/ankimcp.png" alt="Anki + MCP Integration" width="600" /> <p><strong>Seamlessly integrate <a href="https://apps.ankiweb.net">Anki</a> with AI assistants through the <a href="https://modelcontextprotocol.io">Model Context Protocol</a></strong></p></div>An Anki addon that exposes your collection to AI assistants via the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/).## What is this?AnkiMCP Server runs a local MCP server inside Anki, allowing AI assistants like Claude to interact with your flashcard collection. This enables AI-powered study sessions, card creation, and collection management.Part of the [ankimcp.ai](https://ankimcp.ai) project.## Note on First RunOn first run, this addon downloads `pydantic_core` (~2MB) from PyPI. This is required because pydantic_core contains platform-specific binaries (Windows/macOS/Linux) that cannot be bundled in a single addon file.A second native dependency, `rpds` (from `rpds-py`), is handled the same way — but it is almost never downloaded: Anki already ships `rpds` as a transitive dependency of its own `jsonschema`, so the addon just imports it. The download only kicks in on the rare install where that import fails. Both downloads are cached under the addon's `_cache/` directory, so they happen once, not on every launch.## Features- **Local HTTP server** - Runs on `http://127.0.0.1:3141/` by default- **Remote tunnel** - Access your collection from anywhere via a public HTTPS URL- **MCP protocol** - Compatible with any MCP client (Claude Desktop, etc.)- **Auto-start** - HTTP server starts automatically when Anki opens- **Tunnel-friendly** - Works with Cloudflare Tunnel, ngrok, or the built-in tunnel (exposing the HTTP server this way also requires extending the [allowed hosts/origins](#allowed-hosts-and-origins-dns-rebinding-protection))- **DNS-rebinding protection** - The HTTP server validates `Host`/`Origin` headers against a loopback allo
Exposed tools (4) 2 read · 2 write · 0 destructive
| Tool | Risk | Description |
|---|---|---|
add | write | Add two numbers. |
echo_ping | read | Return the message tagged as a ping. |
echo_pong | read | Return the message tagged as a pong. |
slow | write | A deliberately slow tool used to trigger the response timeout. |
Details
- Source
- ankimcp/anki-mcp-server-addon
- Transports
- streamable-http
- License
- NOASSERTION
- Stars
- 73 · pushed 2d ago
Trust audit
Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (5 observation(s))
- Network
- declared (2 observation(s))
- Shell
- declared (4 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (24)
importlib.import_module(pkg)
importlib.import_module(modname)
importlib.import_module(modname)
importlib.import_module(modname)
streamable-http
("/home/user/.ssh/id_rsa", "no extension"),"id_rsa", # no extension (ssh key)
validate_media_file_path("/photos/image\0.ssh/id_rsa.jpg")("/etc/passwd", "no media extension"),validate_media_file_path("/etc/passwd\0.jpg")"filename": "../../evil.png",
assert sanitize_media_filename("../../evil.jpg") == "evil.jpg"result = sanitize_media_filename("../../../etc/passwd.jpg")("169.254.169.254", "link-local / cloud metadata"),- **Local HTTP server** - Runs on `http://127.0.0.1:3141/` by default
"args": ["mcp-remote", "http://127.0.0.1:3141"]
claude mcp add anki --transport http http://127.0.0.1:3141/
opencode mcp add anki --url http://127.0.0.1:3141/
5. Use this URL in your AI client instead of `http://127.0.0.1:3141`
return base64.b64decode(data), "base64"
sudo apt-get update -y && sudo apt-get install -y xvfb
pytest, pytest-asyncio, packaging
mcp, uvicorn, starlette, websockets, packaging, typing-extensions
Both HTTP and tunnel transports share the same `Server` object (same handlers, same tools). Each runs its own `Server.run()` with separate streams and session state. Either can be enabled/disabled ind
Gates applied: no_behavioural_pass.
Audited 2026-09-13 · audit v0.4.0 · source sha 69375d39375c · full audit: observations/trust-audit/mcp-server/ankimcp__anki-mcp-server-addon.json · Report an issue or request a re-scan
Audit history
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-09-13 | 69375d39375c | CAUTION | C | 71 | source changed, verdict held |
Alternatives
Other servers in the same categories, safer ones first.
More from ankimcp
Questions
What is the AnkiMCP Server MCP server?
An Anki addon that implements an MCP server, enabling AI assistants to interact with Anki, the spaced repetition flashcard application.
What tools does AnkiMCP Server expose?
4 in total: 2 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is AnkiMCP Server safe to connect to an agent?
With care. The audit graded it C (71/100) and found 24 things worth knowing before you trust this server, listed below with the exact line each was found on.
What credentials does AnkiMCP Server need?
No credential environment variables were found in its source, so it appears to need none.
How does AnkiMCP Server run?
It speaks streamable-http, so it runs as a service you connect to over the network.
How current is this page?
The grade is for one exact copy of the source (69375d39375c), read on 2026-09-13. The repository is watched and re-audited when it changes.
Provenance: OBSERVED · read 2026-09-13 · job trust-audit-2026-09-13