# anki-mcp

Connects an Anki collection to an AI assistant: quiz sessions, study analytics, bulk tag and deck edits.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: arielbk
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/arielbk/anki-mcp
- Updated: 2026-05-23
- HTML: https://affpapa.org/en/nevibecode/mcp/anki-mcp

## What it does

The server sits between Anki and any MCP client, talking to the app through AnkiConnect. Your assistant can read decks, cards and review history, so questions like which topics keep slipping get answered from your own data. Seven tools cover card management, quiz sessions, analytics, search and bulk operations.

Two things have to be in place first: Anki itself, and the AnkiConnect add-on added with code `2055492159`. Anki has to stay open while the server runs, otherwise calls to it fail. AnkiConnect 25.2.25.0 or newer is needed for full compatibility; older builds handle most features.

The package `@arielbk/anki-mcp` runs through npx, so there is nothing to build. stdio is the default transport, and a local HTTP mode is available too: `node dist/index.js --http --host=127.0.0.1 --port=3000`, with the endpoint at `http://127.0.0.1:3000/mcp`. Working on the code means cloning the repo, then `pnpm install` and `pnpm build`.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add anki-mcp -- npx -y @arielbk/anki-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add anki-mcp -- npx -y @arielbk/anki-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "anki-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@arielbk/anki-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "anki-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@arielbk/anki-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add anki-mcp npx -y @arielbk/anki-mcp
```

## When to use it
- quiz yourself on cards you have not reviewed in days
- tag hundreds of cards in one pass
- hunt down duplicate cards across decks
- see which topics have weak retention
- turn lecture notes into flashcards

## Example prompts
- Show me my Anki decks and the card count in the biggest one
- Tag every cardiovascular card with cardiology and move them to my MCAT deck

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
