home / mcp / anki-mcp mcp server

anki-mcp MCP Server

A model context protocol server that connects to Anki through AnkiConnect

Installation
Add the following to your MCP client configuration file.

Configuration

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

This MCP server is a TypeScript-based bridge that lets you manage Anki decks, note models, and notes from an MCP client. It exposes resources and tools that map directly to Anki concepts, enabling you to list decks, inspect models, and create notes programmatically via MCP.

How to use

You connect to this MCP server from an MCP client to perform common Anki tasks. Use the listDecks and listModels tools to discover your available decks and note models. Retrieve details about a specific model with getModel. Create new notes one at a time with addNote or in bulk with addNotes. Each operation targets AnkiDecks and note models through URIs and structured JSON representations, enabling automation and integration with your existing workflows.

Practical usage patterns include building automation to: list all decks, pick a target deck, choose a model, populate required fields, and assign tags. You can also bulk-create notes for rapid data entry. All actions are exposed as MCP tools so you can orchestrate them from your preferred MCP client without manually interacting with Anki.

How to install

Prerequisites you need to install and run this MCP server:

- Node.js and npm installed on your machine

- A working Anki installation with AnkiConnect installed and enabled

Follow these steps to set up and start the server locally:

npm install
```

```
npm run build
```

```
npm run watch

Additional setup and debugging

If you want Claude Desktop to load this MCP server automatically, you can place the server config in the Claude desktop config location. The following example shows how to register the Anki MCP server so Claude can start it on demand.

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

Debugging

MCP servers communicate over stdio, which can be challenging to debug. Use the MCP Inspector to aid debugging. Run the inspector tool to get a URL for debugging utilities in your browser.

npm run inspector

Available tools

listDecks

Returns the names of all decks available in the connected Anki instance.

listModels

Returns the names of all note models available in the connected Anki instance.

getModel

Retrieves detailed information about a specific note model, including its fields and templates.

addNote

Creates a single note in a specified deck using a given model, with designated fields and tags.

addNotes

Creates multiple notes in bulk with the provided deck, model, fields, and tags.