Skip to main content
Glama

Anki MCP Server

by dhkim0124

anki-mcp-server

Read this in other languages: English, 한국어

A Model Context Protocol (MCP) server that connects Claude and Anki, allowing you to easily create flashcards using natural language.

Introduction

anki-mcp-server acts as a bridge between Claude and the Anki app, enabling communication between them. This allows you to give natural language commands to Claude to create and manage Anki flashcards. For example, if you request "Add an easy Japanese vocabulary card to my Japanese deck," Claude will automatically create an appropriate card.

Requirements

  • Python 3.8 or higher
  • Anki 2.1.x or higher
  • AnkiConnect add-on
  • Claude Desktop (or an environment with access to Claude API)

Installation

1. Setting up Anki and AnkiConnect

  1. Install Anki.
  2. Install the AnkiConnect add-on:
    • Run Anki and select Tools > Add-ons > Get Add-ons from the top menu
    • Enter the code 2055492159 and click 'OK'
    • Restart Anki

2. Installing anki-mcp-server

# Clone the repository git clone https://github.com/dhkim0124/anki-mcp-server.git cd anki-mcp-server # Create and activate a virtual environment (optional) python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate # Install required packages pip install -r requirements.txt

Configuration

Claude Desktop Setup

Modify the Claude Desktop configuration file to register the MCP server:

  1. Claude Desktop configuration file location:
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the following content to the configuration file:
{ "mcpServers": { "anki-mcp": { "command": "python", "args": ["path/anki_server.py"], "env": {} } } }

Replace path/anki_server.py with the absolute path to your anki_server.py file.

How to Use

  1. Run the Anki application and keep it running in the background.
  2. Launch Claude Desktop.
  3. You can give Claude natural language commands such as:

Example Commands

  • "Add an easy Japanese vocabulary card to my Japanese deck"
  • "Create a card for the English word 'perseverance' with its meaning and example sentences"
  • "Summarize the programming concepts I learned today into a card"
  • "Create 5 history timeline cards"

Claude will interpret these requests and create appropriate cards in Anki through the MCP server.

Key Features

Card Creation Features

  • Basic question-answer format card creation
  • Language learning card creation (word, meaning, example sentences)
  • Automatic tag addition
  • Adding cards to multiple decks

Deck Management Features

  • View available deck list
  • Create new decks
  • Search for cards in specific decks

Troubleshooting

Connection Issues

  • Check if Anki is running: The MCP server requires Anki to be running to communicate with it.
  • Verify AnkiConnect: Make sure AnkiConnect is properly installed. Visit http://localhost:8765 in your web browser to confirm you see the "AnkiConnect v.6" message.
  • Firewall settings: Windows users may need to allow firewall access for Anki.

MCP Server Issues

  • Check logs: If problems occur, check the server logs for error messages.
  • Restart: If issues persist, try restarting Anki, Claude Desktop, and the MCP server.

Extension and Contribution

If you'd like to contribute to the project, fork the GitHub repository and submit a pull request. We welcome contributions in the following areas:

  • Support for new card types
  • Improved language support
  • Interface improvements
  • Documentation improvements

License

This project is distributed under the MIT License. See the LICENSE file for details.

Contact

For issues or questions, please contact us through GitHub issues.

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

A Model Context Protocol server that bridges Claude AI with Anki flashcard app, allowing users to create and manage flashcards using natural language commands.

  1. Introduction
    1. Requirements
      1. Installation
        1. Setting up Anki and AnkiConnect
        2. Installing anki-mcp-server
      2. Configuration
        1. Claude Desktop Setup
      3. How to Use
        1. Example Commands
      4. Key Features
        1. Card Creation Features
        2. Deck Management Features
      5. Troubleshooting
        1. Connection Issues
        2. MCP Server Issues
      6. Extension and Contribution
        1. License
          1. Contact

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              An MCP server that enables AI assistants like Claude to interact with Anki flashcard decks, allowing users to create, manage, and update flashcards through natural language conversations.
              Last updated -
              1
              TypeScript
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that enables LLMs to interact with Anki flashcard software through AnkiConnect, allowing for creation and management of flashcards, decks, and note types.
              Last updated -
              10
              206
              30
              TypeScript
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that allows Claude to create flashcards for Rember, helping users study and remember information through spaced repetition reviews.
              Last updated -
              88
              16
              TypeScript
              MIT License
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that bridges AI assistants like Claude with Wordware's specialized agent capabilities, allowing dynamic loading and access to any Wordware flow through a standardized interface.
              Last updated -
              Python

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/dhkim0124/anki-mcp-server'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server