# anki-mcp-server [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/nailuoGG/anki-mcp-server  
**GitHub Stars:** 252  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/anki-mcp-server-2

## Description
MCP server for Anki via AnkiConnect

## Tools
Capabilities this server exposes over MCP:

- **anki_check_connection** — Check whether AnkiConnect is reachable and return the API version.
- **anki_list_decks** — List all available Anki decks, optionally with deck IDs.
- **anki_sync** — Request AnkiWeb sync. Requires {"confirm": true}: without it the call is refused, because a full sync can merge or overwrite local and remote collections. Success means Anki accepted the request, not that AnkiWeb completed it.
- **anki_create_deck** — Create an Anki deck by name.
- **anki_list_tags** — List all tags currently used in the Anki collection.
- **anki_add_note_tags** — Use when the user wants to add one or more tags to existing notes for organization. Do not use when the user wants to remove tags (use anki_remove_note_tags) or update note content (use anki_update_note). Safety: confirm before adding tags to a large number of notes.
- **anki_remove_note_tags** — Use when the user wants to remove specific tags from one or more existing notes. Do not use when the user wants to add tags (use anki_add_note_tags) or clear all tags (use anki_update_note with an empty tags array). Safety: confirm with the user before removing tags, as this modifies note metadata.
- **anki_list_note_types** — List all available Anki note types/models.
- **anki_get_note_type_info** — Use when inspecting a note type before creating or updating notes, especially for non-standard models. Returns fields and card templates. Call this before anki_create_note when using a custom note type. Do not use when the user wants to create notes or modify a note type.
- **anki_create_note** — Use when the user wants to create a single new study card (note) in an existing deck. Creates user study content — not a schema change. Do not use when the user only wants to inspect existing notes, decks, tags, or note types. To define a new note structure, use anki_create_note_type instead. Call anki_get_note_type_info first for custom fields. For multiple notes, use anki_batch_create_notes. Safety: confirm with the user before creating notes if intent is unclear.
- **anki_batch_create_notes** — Use when the user wants to create multiple study cards at once (2–50 notes). Prefer this over repeated anki_create_note calls. Returns per-note success and error details. Safety: ask the user to confirm before creating a large batch of notes.
- **anki_search_notes** — Search notes with Anki query syntax and return paginated note details.
- **anki_get_note_info** — Get detailed information for one note ID.
- **anki_update_note** — Use when the user wants to edit the fields or replace the tags of an existing note. Do not use when the user only wants to inspect note content (use anki_get_note_info) or delete it (use anki_delete_note). Safety: confirm with the user before overwriting note content.
- **anki_delete_note** — Use when the user explicitly asks to permanently delete one or more notes. Do not use when the user only wants to inspect, search, or update notes. Safety: always confirm with the user before deleting any note — this action is irreversible.
- **anki_create_note_type** — Use when the user wants to define a new note schema/model with custom fields and card templates. Modifies the Anki collection structure — not for creating study content. Do not use when the user wants to create notes (use anki_create_note) or inspect an existing note type (use anki_get_note_type_info). Safety: confirm with the user before creating a new note type, as this changes the collection schema.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "anki-mcp-server": {
    "command": "npx",
    "args": ["-y","anki-mcp-server"]
  }
}
```

## Documentation

## What anki-mcp-server does

anki-mcp-server gives language-model clients an MCP interface to Anki through AnkiConnect. It covers common collection-management tasks, including creating decks and notes, importing notes in batches, searching with Anki query syntax, inspecting note details, modifying fields or tags, and deleting notes.

The server also exposes operations for note types. Agents can list available models, inspect a model’s structure, and create new note types. Tag management includes listing collection tags and adding or removing tags across one or more notes. A sync tool can request an AnkiWeb synchronization after explicit confirmation.

MCP resources complement the action tools with collection metadata: all decks and IDs, all tags, all note types, schemas for every note type, and the schema for one named note type.

## How it works

The MCP process communicates with AnkiConnect, which must be installed and reachable from the same environment or configured endpoint. Agents call namespaced tools such as `anki_create_note`, `anki_search_notes`, and `anki_update_note`. Older unprefixed names remain available for existing clients, but new integrations should use the `anki_*` names.

`anki_check_connection` can verify that AnkiConnect is reachable before other operations begin. The server accepts a custom AnkiConnect port through the `--port` command-line option. The default client configuration launches the package with `npx --yes anki-mcp-server` over standard input and output.

Synchronization is intentionally gated by a `confirm: true` argument because a full sync can merge or overwrite local and remote collections. A successful tool response means Anki accepted the request; a blocking dialog in Anki can leave the operation queued without delivering data to AnkiWeb.

## Setup and configuration

Install Anki and the AnkiConnect add-on, then ensure Node.js 20.11 or newer is installed. For Claude Desktop, add the server to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "anki": {
      "command": "npx",
      "args": ["--yes", "anki-mcp-server"]
    }
  }
}
```

For a non-default AnkiConnect port, append `"--port", "8080"` to the argument list. Cline uses the same command structure in its `cline_mcp_settings.json` configuration. Claude Desktop users can also build and install the packaged `.mcpb` extension with `npm run mcpb`; the package is intended for Desktop Extensions.

Claude Code can install the associated Anki skill with `npx skills add nailuoGG/anki-mcp-server@anki`. For direct development, install dependencies with `npm install`, build with `npm run build`, and run tests with `npm test`.

Do not use the `.mcpb` package as the stdio process: its Electron metadata on standard output interferes with MCP communication. Use `npx -y anki-mcp-server` for that mode.

## Tools and capabilities

Available namespaced tools include:

- Check AnkiConnect reachability and trigger AnkiWeb synchronization.
- List or create decks, optionally returning deck IDs.
- List collection tags, then add or remove tags on multiple notes.
- Create one note or batch-create several notes.
- Search notes with Anki query syntax and retrieve detailed note information.
- Update note fields or tags and delete one or more notes.
- List note types, create a type, and inspect its detailed structure.

Resources include `anki://decks/all`, `anki://tags/all`, `anki://note-types/all`, `anki://note-types/all-with-schemas`, and `anki://note-types/{modelName}`. The repository also includes an MCP Inspector command, `npm run inspector`, for viewing messages, invoking tools, and examining logs during development.

## Limitations and notes

Anki and the AnkiConnect add-on are required dependencies. The sync operation can affect both local and remote collections, so it requires explicit confirmation. The server’s packaged Desktop Extension and its direct stdio invocation are separate usage paths; the latter is the appropriate choice when launching it as a normal MCP process.

_Full upstream README: https://allmcps.com/mcp/anki-mcp-server-2/readme_

