This guide provides step-by-step instructions for installing and configuring the anki-mcp-server MCP server using Large Language Models (LLMs).
Add the server to your claude_desktop_config.json:
Add to your Claude configuration file:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"anki": {
"command": "npx",
"args": ["--yes", "anki-mcp-server"]
}
}
}
Add the anki server to your cline_mcp_settings.json
{
"mcpServers": {
"anki": {
"command": "npx",
"args": ["--yes","anki-mcp-server"]
}
}
}
To verify the installation:
- Ensure Anki is running
- Start Claude
- Try creating a new note with the following prompt:
Create an Anki card in the "Default" deck with:
Front: What is the capital of France?
Back: Paris
-
"Cannot connect to AnkiConnect" error:
- Ensure Anki is running
- Check if AnkiConnect is properly installed
- Restart Anki and try again
-
"Permission denied" when running the server:
- Ensure the build file is executable:
chmod +x build/index.js
-
"Deck not found" error:
- Create the deck manually in Anki first
- Check for exact deck name spelling
To run the test suite:
npm test
This will verify:
- Server initialization
- AnkiConnect communication
- Note creation/deletion
- Deck operations
For development with auto-rebuild:
npm run watch