ankimcp/anki-mcp-server-addon
MCP RegistryAn in-process Anki MCP server for AI-assisted card creation and collection management
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
AnkiMCP runs as a Python add-on inside desktop Anki, not as a separate service that can access the collection while Anki is closed. Anki starts a stateless MCP HTTP endpoint on 127.0.0.1:3141 by default. The stack uses MCP SDK >=1.27.0,<2, Uvicorn, and Starlette for the local server, with websockets for the optional remote relay. MCP clients invoke collection tools; model inference is not part of the add-on runtime.
The relay is a separate transport: turning off http_enabled stops the local listener without disabling tunnel access. The packaging script bundles dependencies, and the dependency loader uses packaging to select a native wheel for the running interpreter. Because Anki imports typing_extensions before loading add-ons, the bundled dependencies must work with Anki’s copy. Compatibility therefore depends on the host application’s Python environment as well as the MCP SDK version.
Key Capabilities & Differentiators
The MCP tools support card creation and collection management. Assistants can read and replace a deck description and its Markdown flag, making the deck itself a place to store authoring guidance. Other examples include read-only bulk card statistics and note-type field addition, renaming, and reordering; field removal is an explicitly enabled destructive action. The default note batch limit is 100. In v0.42.0, create_deck supports up to 10 nesting levels and returns a different response shape.
Operators can remove tools from discovery with disabled_tools and explicitly enable selected opt-in or destructive tools. A toolbar indicator shows tunnel status, and Anki displays a brief notification when a client starts and finishes syncing. For troubleshooting, optional rotating logs redact secrets and record which shared libraries actually loaded, a useful diagnostic when add-ons interact with the same Python runtime.
Trade-offs & Limitations
Compared with a standalone collection service, the add-on avoids running a separate local server process, but it inherits Anki’s uptime and dependency constraints. For basic automation, the key reason to choose it over an AnkiConnect-style integration is native MCP tool discovery and policy controls: clients can see the tools you expose without a separate MCP adapter. If an existing integration already serves the workflow, those benefits may not justify adding another interface and tracking its tool schema changes.
Loopback HTTP is the simplest trust boundary for a same-machine client. It validates Host and Origin headers, but the optional Bearer key is off by default, and CORS is not authentication. Publishing the HTTP endpoint through a reverse proxy or third-party tunnel requires deliberate allowlists and access control. The built-in tunnel avoids inbound port forwarding but introduces an account and external relay. A LICENSE file is present, but its terms are not established here; verify them before redistribution or commercial approval.
Hardware & Deployment Guide
Install into desktop Anki with AnkiWeb code 124672614 or the release .ankiaddon, then restart Anki. Nix users can choose a flake package with the add-on preinstalled or an overlay to compose it with other add-ons; some stable nixpkgs MCP packages fall below the tested SDK minimum of 1.27.0. The standard add-on package downloads a compatible pydantic_core wheel from PyPI on first run and downloads rpds only if Anki’s import fails. Downloads are cached, normally outside the add-on directory, so prepare the cache before relying on offline startup.
Use direct HTTP for Claude Code or the Node.js mcp-remote bridge for Claude Desktop. The default hosted tunnel requires an ankimcp.ai account and OAuth 2.0 device login. v0.41.1 pinned the build to Python 3.13 to avoid bundling anyio 4.16; v0.41.2 pinned the MCP SDK to v1. v0.42.0 includes OS trust-store and tunnel proxy improvements. Tunnel and login support HTTP proxies, but a SOCKS-only configuration fails rather than silently bypassing the proxy.
http://127.0.0.1:3141/ by default.create_deck response shape.Desktop Anki users who want an MCP assistant to draft cards, apply deck-specific authoring rules, and inspect collection statistics through a restricted tool set.
You need an always-on service independent of Anki, cannot prepare first-run dependencies for an offline environment, or already have working Anki automation and do not need MCP.
Quick Start & Installation
# Install test dependencies python -m venv .venv source .venv/bin/activate pip install -r requirements-dev.txt # Build the addon (needs Python 3.13; `make build` also looks for `python3.13` on PATH, then uv) ./package.sh # Start Anki container cd .docker && docker compose up -d && cd .. # Run tests (waits for server automatically) pytest tests/e2e/ -v # Stop container cd .docker && docker compose down
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| anki-mcp-server-addon ★ | 114 | +4 | Python | — | An in-process Anki MCP server for AI-assisted card creation and collection manag |
| mcp-for-blender | 37.1k | +1.1k | Python | GPL-3.0 | A local MCP bridge for inspecting and editing live Blender scenes with AI |
| Anthropic-Cybersecurity-Skills | 37.1k | +263 | Python | Apache-2.0 | An agentskills.io playbook library for agent-assisted security analysis |
| agents | 43.2k | +212 | Python | MIT | One Markdown plugin catalog adapted to seven AI coding tools |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/ankimcp/anki-mcp-server-addon.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about anki-mcp-server-addon
How do Claude Code and Claude Desktop connect to the add-on?
claude mcp add anki --transport http http://127.0.0.1:3141/. Claude Desktop’s JSON configuration uses Node.js and mcp-remote to bridge its stdio connection to the same HTTP endpoint. Anki must remain open for either connection.Does the MCP server need a GPU, and what should I size the host for?
Can we self-host it or redistribute it in a commercial deployment?
LICENSE file, but its terms are unspecified here. Verify the license text and bundled dependency obligations before redistributing the add-on or approving it for commercial deployment.Should I use local HTTP, the built-in tunnel, or a third-party tunnel?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy