anki-mcp-server
Research And Data
Description
An MCP server for Claude Desktop that connects to Anki via AnkiConnect and retrieves leech-tagged cards for analysis.
Author
captain-blue210
Created Date
2024-12-01
Tutorial
Learn how to use this MCP server
Step 1: Prerequisites
- Install Anki and ensure it is running.
- Install the AnkiConnect add-on in Anki.
- Install Node.js and npm.
Step 2: Installation
- Clone the repository:
git clone https://github.com/yourusername/anki-mcp-server.git cd anki-mcp-server
- Install dependencies:
npm install
- Build the project:
npm run build
Step 3: Configuration
- Copy the example configuration file:
cp .env.example .env
- Edit the
.envfile to customize settings likeANKI_CONNECT_URLandANKI_CONNECT_VERSION.
Step 4: Running the Server
- Ensure Anki is running with AnkiConnect installed.
- Run the MCP server:
npm start
Step 5: Configuring Claude Desktop
-
Open Claude Desktop.
-
Edit the configuration file located at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
-
Add the following configuration to the
mcpServerssection:{ "mcpServers": { "anki": { "command": "node", "args": ["path/to/anki-mcp-server/dist/index.js"] } } }
Replace
"path/to/anki-mcp-server"with the actual path to the cloned repository.
Step 6: Using MCP Tools in Claude
You can now use tools like get_leech_cards and tag_reviewed_cards in Claude to analyze and manage your Anki cards.

