Get the FREE Ultimate OpenClaw Setup Guide →

anki

A model context protocol server that connects to Anki through AnkiConnect

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio camdenclark-anki-mcp-server node d:\anki-mcp-server\build\index.js

How to use

This MCP server exposes an integration with Anki via the AnkiConnect plugin. It models Anki decks and note models as resources that can be explored through URIs, and provides tools to create and manage notes within Anki. Available tools include listDecks (to retrieve all deck names), listModels (to retrieve all note model names), getModel (to fetch details about a specific model), addNote (to create a single note specifying deck, model, fields and tags), and addNotes (to create multiple notes in bulk with the same or varying parameters). The server communicates over the MCP protocol and interacts with Anki through AnkiConnect, enabling programmatic note creation and retrieval of Anki data via the provided tools.

How to install

Prerequisites:\n- Node.js and npm installed on your system.\n- Access to a console/terminal.\n- Anki with AnkiConnect plugin installed and running if you plan to test against Anki.\n\nSteps:\n1) Install dependencies:\nbash\nnpm install\n\n2) Build the server (TypeScript to JavaScript):\nbash\nnpm run build\n\n3) (Optional) Enable auto-rebuild during development:\nbash\nnpm run watch\n\n4) Run the server and verify it starts correctly (depending on your environment, you may run the built JS directly):\nbash\n# Example if you run the built index.js directly\nnode build/index.js\n\n5) Configure Claude or your MCP client to connect to the server using the provided mcp_config example.\n\nNotes:\n- If you modify code, rebuild to reflect changes.\n- Ensure AnkiConnect is running if you intend to interact with Anki.\n\n

Additional notes

Tips and common considerations:\n- The server exposes URIs like anki://decks/{id} and anki://models/{id} to list and access Anki decks and note models.\n- For debugging MCP servers, you can use the MCP Inspector to view protocol exchanges. Run npm run inspector to start the Inspector tooling.\n- Since this is a Node.js-based server, the npm package name (if published) would be the value of npm_package; if not published, this field can be ignored or set to null.\n- If you update the configuration, ensure the server process is restarted so changes take effect.\n- When integrating with Claude Desktop, place the server config in the appropriate JSON path for your OS, as shown in the README.\n

Related MCP Servers

Sponsor this space

Reach thousands of developers