# Anki MCP

> Anki MCP is an open-source MCP server for education and exams. Let an AI assistant search, create and edit Anki notes, decks and card templates. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** Windows, macOS, Linux
- **Repository:** https://github.com/ryhus/anki-mcp
- **MCP Registry name:** io.github.Ryhus/anki-mcp
- **Categories:** [education and exams](https://ai-powered.com/categories/education-and-exams), [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-11-18

## About

This server drives a desktop Anki installation through the AnkiConnect add-on, so it only works while Anki is open on the same computer. The MCP client launches it as a local stdio process with npx, and the server talks to AnkiConnect at 127.0.0.1:8765 by default.

Beyond plain note editing it can preview a card's HTML and CSS, work with media and handle .apkg deck packages. Package import and export stay off until you point two environment variables at trusted folders, and media can only be imported from folders you allowlist. An API mode switch selects the full tool set for current AnkiConnect builds or a smaller legacy subset for older add-ons.

The README is blunt about limits: it makes no backups, does not retry writes automatically, and not every tool offers a preview, so you should check Anki after an error before repeating an action. It needs Node.js 24 or newer.

## Features

- **Note search and editing:** Search notes by tag or text, draft new ones and edit existing notes.
- **Deck and card management:** Manage decks and cards from the chat.
- **Card preview:** Show the front and back HTML and CSS of a card without changing it.
- **Package import and export:** Move .apkg deck packages in and out of folders you approve.
- **Media handling:** Import media from allowlisted folders, public HTTPS URLs or base64.
- **Legacy mode:** Fall back to a supported subset for older AnkiConnect add-ons.

## Good for

- Draft vocabulary notes and review them before they are added
- Find notes tagged for a level that mention a word
- Inspect how a card template renders
- Preview an export of a deck without its review history

## Install

### Claude Code (Terminal)

```sh
claude mcp add anki-mcp --env ANKI_URL='<ANKI_URL>' -- npx -y @ryhus/anki-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "anki-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ryhus/anki-mcp"
      ],
      "env": {
        "ANKI_URL": "<ANKI_URL>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "anki-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ryhus/anki-mcp"
      ],
      "env": {
        "ANKI_URL": "<ANKI_URL>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "anki-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@ryhus/anki-mcp"
      ],
      "env": {
        "ANKI_URL": "<ANKI_URL>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "anki-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ryhus/anki-mcp"
      ],
      "env": {
        "ANKI_URL": "<ANKI_URL>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "anki-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ryhus/anki-mcp"
      ],
      "env": {
        "ANKI_URL": "<ANKI_URL>"
      }
    }
  }
}
```

## FAQ

### What do I need installed?

Node.js 24 or newer, Anki Desktop and the AnkiConnect add-on, with Anki left open.

### Does it work with a remote Anki?

No. ANKI_URL points at AnkiConnect on your own computer.

### Does it back up my collection?

No. The README says it makes no backups and does not retry writes, so check Anki after an error.

### What is the licence?

MIT.

### Is Anki MCP free?

Yes. Anki MCP is open source, so you can use and self-host it for free.

### How do I add Anki MCP to Claude Code?

Run this command in your terminal: claude mcp add anki-mcp --env ANKI_URL='<ANKI_URL>' -- npx -y @ryhus/anki-mcp

### What are the best alternatives to Anki MCP?

The closest alternatives to Anki MCP are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and NeuroStack.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.
- [NeuroStack](https://ai-powered.com/mcp/neurostack): NeuroStack is a freemium MCP server for knowledge and memory.
- [note1](https://ai-powered.com/mcp/note1): note1 is an MCP server for productivity.
- [Digitalnz](https://ai-powered.com/mcp/digitalnz): Digitalnz is a freemium MCP server for knowledge and memory.
- [Wikimedia Rest](https://ai-powered.com/mcp/wikimedia-rest): Wikimedia Rest is a freemium MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/anki-mcp
