Skip to main content
Glama

anki-mcp MCP Server

A server to integrate with Anki via the AnkiConnect plugin

This is a TypeScript-based MCP server that integrates with Anki via the AnkiConnect plugin. It demonstrates core MCP concepts by providing:

  • Resources representing Anki decks and note models with URIs

  • Tools for creating and managing Anki notes

  • Integration with AnkiConnect API

Features

Resources

  • List and access Anki decks via anki://decks/{id} URIs

  • List and access note models via anki://models/{id} URIs

  • JSON representation of Anki objects

Tools

  • listDecks - Get names of all decks

  • listModels - Get names of all note models

  • getModel - Get details of a specific note model

  • addNote - Create a single note

    • Specify deck name, model name, fields and tags

  • addNotes - Create multiple notes in bulk

    • Create many notes with specified parameters

Related MCP server: Anki MCP Server

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "anki-mcp": {
      "command": "node",
      "args": ["d:\\anki-mcp-server\\build\\index.js"]
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Available Tools

3 tools
anki_add_noteC

Add a flashcard to an Anki deck

Inputs: back (required), deckName (required), front (required).

anki_add_notesC

Add multiple flashcards to an Anki deck

Inputs: cards (required), deckName (required).

anki_create_deckC

Create a new Anki deck

Inputs: deckName (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 3 tools

    Disambiguation3/5

    The tools have overlapping purposes, as 'anki_add_note' and 'anki_add_notes' both handle adding flashcards, differing only in single vs. multiple notes. This could cause misselection if an agent needs to add one note but picks the plural version, or vice versa. However, the descriptions clarify the distinction, preventing complete confusion.

    Naming Consistency5/5

    All tool names follow a consistent 'anki_verb_noun' pattern with snake_case, making them predictable and easy to parse. The verbs ('add', 'create') are clear and appropriately matched to their actions, ensuring no deviation in naming conventions across the set.

    Tool Count2/5

    With only 3 tools, the server feels under-scoped for managing Anki flashcards, as it lacks essential operations like retrieving, updating, or deleting notes or decks. This minimal set may force agents into dead ends when trying to perform common tasks beyond basic creation.

    Completeness2/5

    The tool surface is severely incomplete for Anki management, missing critical CRUD operations such as getting or listing notes/decks, updating existing content, or deleting items. This creates significant gaps that will likely cause agent failures in typical workflows, as users cannot interact with existing data.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers