Get the FREE Ultimate OpenClaw Setup Guide →

anki -addon

An Anki addon that implements an MCP server, enabling AI assistants to interact with Anki, the spaced repetition flashcard application.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ankimcp-anki-mcp-server-addon uvx ankimcp-anki-mcp-server-addon \
  --env ANKI_ADDON_ENV="Addon internal MCP server for Anki (placeholder)"

How to use

AnkiMCP Server runs a local Model Context Protocol (MCP) server inside Anki, exposing your Anki collection to AI assistants. This enables AI-powered study sessions, card creation, and collection management through MCP clients like Claude Desktop. The server starts automatically when Anki launches and serves HTTP requests at http://127.0.0.1:3141 by default. You can connect clients by configuring their MCP settings to point at this local endpoint, optionally using a custom path and CORS configuration to fit your environment. The addon exposes a comprehensive set of tools for syncing, querying, creating and updating notes, and controlling card states, all bridged between MCP requests and Anki’s operations.

How to install

Prerequisites:

  • Anki installed (version 25.07+ recommended)
  • Access to install add-ons via AnkiWeb or local releases

Step 1: Install the AnkiMCP Server Addon

  • From AnkiWeb: Tools → Add-ons → Get Add-ons... → enter code for the addon (provided by project)
  • Or from GitHub Releases: download anki_mcp_server.ankiaddon and install via Tools → Add-ons → Install from file...

Step 2: Start Anki and allow the addon to initialize

  • On first run, the addon will download pydantic_core from PyPI as needed. This is automatic and required for MCP protocol support.

Step 3: Verify the server is running

  • Open Anki, then go to Tools → AnkiMCP Server Settings to confirm status. The server should be listening at http://127.0.0.1:3141/ by default.

Step 4: Optional client configuration

  • In your MCP client (e.g., Claude Desktop), add or update the MCP server reference to point at http://127.0.0.1:3141/ as shown in the README example.

Step 5: Customize as needed

  • Adjust path, CORS, and exposure settings via Anki’s Config UI to suit tunneling or browser-based clients.

Additional notes

Tips and notes:

  • The server runs inside Anki and bridges requests to Anki’s API, so most operations require Anki’s context (e.g., deck names, note types).
  • First-run may download platform-specific binaries for pydantic_core; allow network access during the initial setup.
  • If exposing the endpoint behind a tunnel (Cloudflare Tunnel, ngrok), you can set a http_path to a subpath to avoid a fully open root endpoint.
  • CORS: configure cors_origins if you plan to connect from browser-based MCP clients. Use a precise origin list for production; '*' is convenient but not recommended for security reasons.
  • The addon provides a large set of tools (see Available Tools) for deep integration with Anki collections; ensure you understand the impact of potentially destructive actions like delete_notes.

Related MCP Servers

Sponsor this space

Reach thousands of developers