# Repository Briefing: ankimcp/anki-mcp-server
> Source: https://repoforai.com/repo/ankimcp/anki-mcp-server (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/ankimcp/anki-mcp-server
- **Official Docs / Website**: https://ankimcp.ai
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A (87/100 · Maintenance 35/35 · Adoption 12/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.28.0 (2026-11-29) — https://github.com/ankimcp/anki-mcp-server/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: MCP, CLI
- **Momentum**: 590 ★ total (+2 24h / +9 7d) · 42 forks
- **Topics**: `ai`, `ai-learning-tool`, `ai-tutor`, `anki`, `anki-addon`, `anki-flashcards`
- **When to Use**: Best for: Anki users who already run AnkiConnect and want a local STDIO client for guided review, batch note creation, or deck maintenance, or who need the Claude Desktop bundle. Skip if: You mainly need HTTP or web-client access, or your workflow must run with Anki closed. The addon is simpler for HTTP and remote access; neither option removes the running Anki requirement.

## Overview
```text
### Architecture & Core Mechanics
Anki MCP Server is a standalone TypeScript/Node.js bridge between an MCP client and a running Anki desktop session. In the primary STDIO flow, the client starts the process, invokes MCP tools over standard input/output, and the server reaches Anki through AnkiConnect. `ANKI_CONNECT_URL` defaults to `http://localhost:8765`. The package exposes `ankimcp` and `anki-mcp-server` executables, and a source-build configuration can launch `dist/main-stdio.js` directly.

The runtime stack includes NestJS, `@rekog/mcp-nest`, the `@modelcontextprotocol/core`, `node`, and `server` packages, and Zod with `zod-to-json-schema`. Local HTTP and remote tunnel access are also available, but they change how the client reaches the bridge, not the need for a running Anki backend. The server exposes collection operations; the MCP client supplies the conversational or model layer.

### Key Capabilities & Differentiators
The server exposes 53 tools: 42 for general Anki operations and 11 for the desktop GUI. A conversational study session can fetch due cards, present the question, and submit an Again, Hard, Good, or Easy rating. Fetches omit answers unless `include_answer` is enabled, and card content is rendered per template. Use the study tools rather than the GUI tools for that flow: `guiCurrentCard` includes the answer and errors outside desktop review mode.

Collection tools cover decks, Anki-query searches, note edits, tags, media, and note types, including fields, front/back HTML, and CSS. `addNotes` supports up to 100 notes per batch for a shared deck and note type, with partial success. Deleting notes or removing a note-type field requires explicit confirmation. For analytics, `deckStats` separates the daily-limit-aware study queue from card-state counts; `review_stats` analyzes review history, retention, and streaks.

### Trade-offs & Limitations
The closest alternative is the AnkiMCP addon. It runs inside Anki, starts when Anki opens, and offers local HTTP and a built-in tunnel without configuring AnkiConnect or running a separate Node.js server. Choose the standalone server for a client that expects to spawn a STDIO subprocess, or for Claude Desktop's `.mcpb` install path. The packaging is convenient, but the underlying Anki and AnkiConnect dependency remains.

The write surface extends well beyond drafting flashcards: it can change schedules and edit shared templates that affect every card of a note type. Confirm destructive edits, check for partial success before retrying batch writes, and use `setDueDate` rather than a review rating when the intent is only to move a due date. The MIT license permits self-hosting, but a local bridge does not make a cloud-backed assistant private; the client may still transmit the collection content it receives.

### Hardware & Deployment Guide
For general installation, run `npx -y @ankimcp/anki-mcp-server --stdio` from the client configuration, or install the package globally and launch `ankimcp --stdio`. Claude Desktop can install the release `.mcpb` instead. The standalone server needs Anki with AnkiConnect running; npm and source deployments require Node.js 22.12.0 or newer. A source build uses `npm install` and `npm run build`; running the test suite requires Node.js 24.9 or newer, which is not the production runtime minimum.

STDIO needs no remote endpoint. For remote access, the project offers an authenticated managed tunnel and lists unauthenticated ngrok as an alternative; use an authenticated path when exposing collection operations. Release v0.26.0 added card suspension tools, v0.27.0 hardened read-only behavior, and v0.28.0 updated the MCP SDK and hardened media imports, filenames, and origin checks. Review existing deck-creation integrations before upgrading to v0.28.0, which marks a `createDeck` change as breaking.
```

## Key Capabilities
```text
- Transport: MCP clients launch `ankimcp --stdio`; Claude Desktop can also install a `.mcpb` bundle.
- Review flow: Card fetches hide answers by default and use rendered card templates, preserving the direction of reversed and cloze cards.
- Scheduling: `rate_card` records a review; `forgetCards` resets cards to new, while `setDueDate` moves the due date without recording a review.
- Bulk editing: `addNotes` accepts up to 100 notes sharing a deck and note type, with partial success supported.
- Statistics: Daily-limit-aware study queues are reported separately from totals by card state.
- Media: `storeMediaFile` accepts paths, URLs, or base64; v0.28.0 includes hardening for symlink handling and filenames.
```

## Quick Start / Clone
```bash
npm install -g @ankimcp/anki-mcp-server
```
