anki
A Model Context Protocol (MCP) server that enables AI assistants to interact with Anki, the spaced repetition flashcard application.
claude mcp add --transport stdio ankimcp-anki-mcp-server npx -y @ankimcp/anki-mcp-server --stdio \ --env ANKI_CONNECT_URL="http://localhost:8765"
How to use
This MCP server bridges Anki with AI assistants using the Model Context Protocol, allowing natural language interactions to manage Anki notes, decks, media, and more. It exposes a set of tools and commands such as sync, get_due_cards, present_card, rate_card, and various deck, note, and media management endpoints. Run the server in STDIO mode with a local MCP client (for Claude Desktop, Cursor IDE, Cline, or Zed Editor) to enable seamless conversational control over your Anki space. By default it connects to AnkiConnect at http://localhost:8765, so ensure Anki and AnkiConnect are running and reachable. You can also run the HTTP mode for remote AI assistants, enabling secure tunneling and public access when needed.
How to install
Prerequisites:
- Node.js 20.x or newer installed
- Anki with AnkiConnect plugin running and accessible at the configured URL (default http://localhost:8765)
Option A: Quick start via npx (no local installation)
- Ensure Node.js is installed
- Run the MCP server in STDIO mode using npx:
npx -y @ankimcp/anki-mcp-server --stdio
- If prompted or required, set the AnkiConnect URL via environment variable:
ANKI_CONNECT_URL=http://localhost:8765 npx -y @ankimcp/anki-mcp-server --stdio
Option B: Install locally or via npm (persistent installation)
- Install the package locally in your project:
npm install @ankimcp/anki-mcp-server
- Run the server (STDIO mode) using the installed binary:
npx @ankimcp/anki-mcp-server --stdio
- To configure a persistent environment variable for AnkiConnect:
export ANKI_CONNECT_URL=http://localhost:8765
npx @ankimcp/anki-mcp-server --stdio
Option C: Run in HTTP mode (for remote AI assistants)
- Start the server in HTTP mode (example):
npx @ankimcp/anki-mcp-server --port 8080 --host 0.0.0.0
- If you need a public tunnel, use the built-in ngrok support as described in the project docs.
Additional notes
Tips and caveats:
- Ensure AnkiConnect is running and reachable from the MCP server; the default URL is http://localhost:8765 unless overridden via ANKI_CONNECT_URL.
- When using STDIO mode, your MCP client (Cursor IDE, Cline, Zed, etc.) should be configured to connect via STDIO transport as shown in the README examples.
- For remote usage, HTTP mode supports --ngrok to create a public tunnel; use this with caution to expose your local Anki data.
- If you upgrade from the old package name (anki-mcp-http), migrate configuration to @ankimcp/anki-mcp-server as per the changelog.
- The MCP server supports a variety of commands under Review & Study, Deck Management, Note Management, and Media Management; consult the docs for exact payload formats and responses.
- If you customize ANKI_CONNECT_URL, ensure your network allows connections to that endpoint from the MCP server process.
Related MCP Servers
gemini-cli
An open-source AI agent that brings the power of Gemini directly into your terminal.
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
CanvasMCPClient
Canvas MCP Client is an open-source, self-hostable dashboard application built around an infinite, zoomable, and pannable canvas. It provides a unified interface for interacting with multiple MCP (Model Context Protocol) servers through a flexible, widget-based system.
mcp -arangodb
This is a TypeScript-based MCP server that provides database interaction capabilities through ArangoDB. It implements core database operations and allows seamless integration with ArangoDB through MCP tools. You can use it wih Claude app and also extension for VSCode that works with mcp like Cline!
opencode-personal-knowledge
🧠 Personal knowledge MCP server with vector database for Opencode. Store and retrieve knowledge using semantic search, powered by local embeddings.
mcp-turso
MCP server for interacting with Turso-hosted LibSQL databases