Anki MCP
Let an AI assistant search, create and edit Anki notes, decks and card templates
- Pricing
- Open source
- Platforms
- Windows, macOS, Linux
- Runs
- Locally
- Version
- 0.1.1
- Listing updated
- today
Similar MCP servers
About Anki MCP
Anki MCP is an open-source MCP server for education and exams. It runs locally on your machine and is started by your AI client.
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.
Install
Run in a terminal
claude mcp add anki-mcp --env ANKI_URL='<ANKI_URL>' -- npx -y @ryhus/anki-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"anki-mcp": {
"command": "npx",
"args": [
"-y",
"@ryhus/anki-mcp"
],
"env": {
"ANKI_URL": "<ANKI_URL>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"anki-mcp": {
"command": "npx",
"args": [
"-y",
"@ryhus/anki-mcp"
],
"env": {
"ANKI_URL": "<ANKI_URL>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"anki-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@ryhus/anki-mcp"
],
"env": {
"ANKI_URL": "<ANKI_URL>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"anki-mcp": {
"command": "npx",
"args": [
"-y",
"@ryhus/anki-mcp"
],
"env": {
"ANKI_URL": "<ANKI_URL>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"anki-mcp": {
"command": "npx",
"args": [
"-y",
"@ryhus/anki-mcp"
],
"env": {
"ANKI_URL": "<ANKI_URL>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
ANKI_URLAnkiConnect base URL on your computer. Keep Anki Desktop open; omit /api/v1.RequiredANKI_API_MODEUse v1 for the full tool set with compatible AnkiConnect, or legacy for older add-ons.ANKI_REQUEST_TIMEOUT_MSRequest deadline in integer milliseconds, including queue wait: 1 to 300000.ANKI_MEDIA_IMPORT_DIRSOptional trusted local media folders. Separate with : on macOS/Linux or ; on Windows.ANKI_PACKAGE_IMPORT_DIROptional existing absolute folder for local .apkg imports. Requires API v1.ANKI_PACKAGE_EXPORT_DIROptional existing absolute folder for local .apkg exports. Requires API v1.
What it does
- 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
Pricing
Open source
MIT licence; free to run locally
Anki MCP 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.



