# AnkiMCP Server [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/ankimcp/anki-mcp-server-addon  
**GitHub Stars:** 93  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ankimcp-server

## Description
Anki addon that exposes your flashcard collection to AI assistants via a local MCP server.

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What AnkiMCP Server MCP server does

AnkiMCP Server MCP server adds an MCP interface to the Anki desktop application. It exposes the collection that is open in Anki so an AI client can work with flashcards through MCP requests. The addon is intended for tasks such as AI-assisted study, creating cards, and managing collection data.

The addon includes a local HTTP transport and starts it automatically when Anki opens. The default address is `http://127.0.0.1:3141/`. Because the endpoint runs within Anki, the application needs to be open for the server to provide access to the collection.

## How it works

An MCP client connects to the HTTP endpoint and sends tool calls to the addon. Claude Desktop can connect through `mcp-remote`, because its configuration does not directly accept HTTP MCP servers. Claude Code can use its HTTP transport configuration directly.

For remote access, the addon can create a public HTTPS endpoint through its built-in tunnel. The tunnel relays traffic over a WebSocket connection, using `wss://tunnel.ankimcp.ai` by default. Connecting the tunnel requires an ankimcp.ai account and an OAuth 2.0 device login. After connection, the generated URL replaces the localhost address in the client configuration.

External exposure requires attention to host and origin validation. The local server uses DNS-rebinding protection and accepts loopback hosts and origins by default. Tunnel or reverse-proxy use requires extending the allowed hosts or origins. An optional bearer token can also protect the HTTP transport.

## Setup and configuration

Install the addon from AnkiWeb with code `124672614`, install an `.ankiaddon` package from GitHub Releases, or use the documented NixOS packaging approaches. Restart Anki after installation. On the first run, the addon may download the platform-specific `pydantic_core` dependency. A fallback download of `rpds` is possible if Anki's existing copy cannot be imported; downloaded dependencies are cached for later launches.

Configuration is edited through Anki's add-on configuration screen. Supported settings described in the material include the HTTP listener, API key, tunnel relay URL, OAuth client identifier, toolbar indicator, diagnostic file logging, allowed hosts and origins, and the list of enabled opt-in tools. The AnkiMCP Server MCP server stores tunnel credentials in `user_files/credentials.json`, which is retained across addon updates and is separate from the CLI's credentials.

## Tools and capabilities

The documented capabilities include:

- `model_fields` can add, rename, and reorder fields belonging to an Anki note type. Removing fields is an opt-in destructive operation.
- `cards_stats` provides compact, read-only scheduling data for all cards in a deck and its subdecks. Returned metrics include card type, queue, interval, tags, and whether the card is due today. The statistics do not depend on FSRS.
- `gui_deck_review` opens a deck in Anki's reviewer window.
- `gui_answer_card` presses the answer control during a GUI review session.

The GUI review tools are hidden unless explicitly enabled through the opt-in tool configuration. Tools publish MCP annotations such as readable titles, read-only status, destructive status, open-world status, and idempotency information where applicable, allowing clients to present more informed confirmations.

## Limitations and notes

The server is local by default and depends on Anki being available. Remote use adds account, tunnel, and network requirements. A public tunnel or reverse proxy also requires the host and origin allowlist to be configured correctly.

The built-in tunnel's saved login state can be disconnected without deleting credentials. Logging out removes those credentials and causes the next connection to require another device login.

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

