Skip to main content
Glama
stefanwille

Anki MCP Server

by stefanwille

Anki MCP Server

npm

A Model Context Protocol (MCP) server for managing Anki flashcards. Connects to AnkiConnect to enable AI assistants to create, read, and update flashcards.

Prerequisites

  • Anki with AnkiConnect add-on installed

  • Node.js 24+ (Download)

  • Anki running, with AnkiConnect on http://127.0.0.1:8765 (default)

Related MCP server: Anki MCP Server

Installation in Claude Desktop

  • Open Claude Desktop

  • Go to: "Claude" / "Settings..."

  • Tab "Developer"

  • Click "Edit Config"

Edit your Claude Desktop config (claude_desktop_config.json), and add:

{
  "mcpServers": {
    "anki": {
      "command": "npx",
      "args": ["-y", "stefanwille-anki-mcp-server@latest"]
    }
  }
}

Restart Claude Desktop to activate.

Troubleshooting

"Failed to spawn process" / "command not found: npx" on macOS

Claude Desktop launches with a restricted PATH that doesn't include Node.js when installed via version managers like Volta or nvm. You'll see errors like:

Failed to spawn process: No such file or directory

or

node: command not found

Fix: Use the full path to npx and add the Node.js bin directory explicitly via env:

{
  "mcpServers": {
    "anki": {
      "command": "/Users/YOUR_USERNAME/.volta/bin/npx",
      "args": ["-y", "stefanwille-anki-mcp-server@latest"],
      "env": {
        "PATH": "/Users/YOUR_USERNAME/.volta/bin:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}

Replace YOUR_USERNAME with your macOS username and adjust the path if you use nvm (~/.nvm/versions/node/vX.X.X/bin/) or another version manager.

Find your actual npx path by running in a terminal:

which npx

Example Prompts

  • "What decks do I have in Anki?"

  • "Show the cards in my Spanish vocabulary deck"

  • "Check all cards in deck 'Italiano::Capitulo 3' for grammatical errors and correct them"

  • "Create a card in my Italian deck with 'ciao' on the front and 'hello' on the back"

  • "Extract the vocabulary from the photo and add it to my Italian deck with Italian on the front and German on the back: ..."

  • "Create a new deck called 'Physics::Quantum Mechanics'"

  • "Rename my 'Math' deck to 'Mathematics'"

  • "Give me an exercise that requires me to use the Italian words in the deck 'Italienisch::Capitulo 6::Italienisch 38 - 2025-08-01'"

Tools

Tool

Description

get_decks

Get all deck names from Anki

create_deck

Create a new deck

delete_deck

Delete a deck and all its cards (including sub-decks)

list_cards

List cards in a deck with front/back content

create_cards

Create one or more basic cards in a deck

update_card

Update an existing card's content

rename_deck

Rename a deck

Development

Prerequisites

Build from Source

git clone https://github.com/stefanwille/anki-mcp-server.git
cd anki-mcp-server
pnpm install
pnpm build

Watch Mode

pnpm watch

Rebuilds automatically on file changes.

Install Locally

Update Claude Desktop config to point directly to the built file:

{
  "mcpServers": {
    "anki": {
      "command": "node",
      "args": ["/absolute/path/to/anki-mcp-server/dist/index.js"]
    }
  }
}

Replace /absolute/path/to/anki-mcp-server with your actual clone location.

Publish to npm

Create a GitHub release to trigger the npm publish workflow:

pnpm login 
# If pnpm login produces a 404 page, try pnpm login again
pnpm version patch  # or minor, major
git push && git push --tags
gh release create v$(node -p "require('./package.json').version") --generate-notes

This triggers the GitHub Actions workflow that publishes to npm automatically using trusted publishing (OIDC), not access tokens.

License

MIT

Available Tools

8 tools
create_cardsCreate CardsA

Add Basic note(s) to a deck. Duplicates skipped (null noteId in results).

ParametersJSON Schema
NameRequiredDescriptionDefault
deck_nameYes
cardsYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full weight. It discloses that duplicates are skipped and that results contain null noteId for duplicates. However, it does not mention auth needs, rate limits, or detailed side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and every word adds value. No unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given only 2 parameters and no output schema, the description covers use case and duplicate handling. However, it lacks guidance on deck existence prerequisites and does not detail return values beyond noteId.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description must compensate. It clarifies that cards have front/back fields (Basic notes) and notes the duplicate behavior. But it does not explain the deck_name parameter (must exist?) or error handling.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add'), the resource type ('Basic note(s)'), and the target ('deck'). It also mentions duplicate handling, which distinguishes it from sibling tools like create_deck or update_card.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for adding Basic notes to a deck and mentions duplicate behavior, but does not explicitly explain when to use this tool versus alternatives like update_card or list_cards. However, context from sibling tools helps infer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_deckCreate DeckC

Create a new deck in Anki

ParametersJSON Schema
NameRequiredDescriptionDefault
deck_nameYes

TDQS

C2.5/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Description provides no behavioral details beyond the name. No annotations are present, so the description carries full burden but fails to disclose any side effects, permissions, or constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no fluff, but it is so minimal that it borders on tautology. Adequately concise but lacks substance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool, the description is insufficient. It does not explain what a deck is or any usage context, leaving the agent without necessary information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description does not explain the 'deck_name' parameter or its constraints. No added value over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Create' and the resource 'deck' and distinguishes from sibling tools like delete_deck, rename_deck, etc. No ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like create_cards. No context on prerequisites or when to avoid.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_cardsDelete CardsB

Delete one or more cards from Anki by their note IDs

ParametersJSON Schema
NameRequiredDescriptionDefault
note_idsYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the full burden. It only states that cards are deleted, but omits critical details such as permanence, effects on related data (e.g., reviews), required permissions, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no unnecessary words or redundancy. It is front-loaded and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with no output schema, the description is minimally adequate. However, it lacks details about side effects, irreversibility, and error scenarios, which are important for a destructive operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%. The description adds minimal value by mentioning 'note IDs' but does not explain what they are or how to obtain them, leaving the parameter underspecified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Delete', the resource 'cards', and the method 'by their note IDs'. It distinguishes itself from sibling tools like list_cards and update_card.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like delete_deck or update_card. There is no mention of prerequisites or caution needed for destructive operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_deckDelete DeckA

Delete deck, nested decks, and all their cards.

ParametersJSON Schema
NameRequiredDescriptionDefault
deck_nameYes

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses deletion of nested decks and cards, adding value beyond the name. However, lacks details on reversibility, permissions, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, efficient and to the point. Not overly verbose, but could benefit from structured formatting.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-param deletion tool with no annotations or output schema, description covers primary scope. Missing error scenarios (e.g., non-existent deck).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has no descriptions (0% coverage). Description only mentions deck_name in context but offers no additional meaning on format, constraints, or validation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States action 'Delete', resource 'deck', and scope 'nested decks, and all their cards'. Clearly distinguishes from sibling like delete_cards.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage for deleting a deck and its contents, but no explicit when-to-use or when-not, nor comparisons with alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_decksGet DecksA

Get all deck names from Anki

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It indicates a read-only operation but does not disclose potential edge cases (e.g., empty list) or authentication requirements. It is adequate but minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with no unnecessary words. It is front-loaded and efficiently communicates the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no output schema), the description is reasonably complete. However, it could mention that it returns only names, not other deck properties, to avoid ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, and schema coverage is 100%. The description does not need to add parameter details; it is sufficient that it states what the tool returns (deck names).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb (Get) and resource (all deck names from Anki), which is specific and distinguishes it from sibling tools like create_deck or delete_deck.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives (e.g., list_cards) or any prerequisites. It only states what it does without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_cardsList CardsC

List card sides in a deck (uses Basic model).

ParametersJSON Schema
NameRequiredDescriptionDefault
deck_nameYes
limitNo

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose any behavioral traits beyond the basic listing action. It does not explicitly state that the tool is read-only or non-destructive, nor does it mention any side effects, permissions, or rate limits. An agent has to infer safe usage from the word 'list'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise and front-loaded. However, it could be slightly improved by adding important details without becoming long.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there is no output schema and two parameters, the description is severely lacking. It does not explain the output format, pagination behavior, or the default limit value. An agent cannot fully understand what to expect from the tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning to the input parameters. Schema coverage is 0%, and the text only says 'List card sides in a deck', which does not explain that deck_name is required or what limit controls. An agent would have no additional context to correctly fill parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'list' and the resource 'card sides in a deck', which distinguishes it from sibling tools like create_cards or delete_cards. However, the phrase 'uses Basic model' is ambiguous and may confuse an agent unfamiliar with the domain.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. For example, it doesn't mention that it's for listing all cards in a deck, while update_card or delete_cards are for specific cards. No when-not-to-use or context is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

rename_deckRename DeckC

Rename a deck in Anki

ParametersJSON Schema
NameRequiredDescriptionDefault
old_nameYes
new_nameYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states 'Rename a deck'. It does not disclose behavioral traits such as whether renaming preserves the deck's contents, handles conflicts, or requires specific permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise but lacks necessary substance. It is not overly verbose, but it fails to provide adequate information, making it insufficiently helpful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and lack of output schema, the description should provide more context. It does not explain how renaming interacts with related tools (e.g., card references) or the deck hierarchy.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description adds no meaning beyond the parameter names. It does not clarify expected formats (e.g., full deck path, case sensitivity) or constraints for old_name and new_name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Rename a deck in Anki', which is a specific verb-resource pair. It differentiates itself from sibling tools like create_deck, delete_deck, and get_decks by indicating a renaming operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it does not suggest using this over deleting and recreating a deck to preserve cards, nor does it mention any prerequisites or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_cardUpdate CardC

Update an existing card's content

ParametersJSON Schema
NameRequiredDescriptionDefault
note_idYes
frontNo
backNo

TDQS

C2.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description carries full burden. It only states 'update' which implies mutation, but does not disclose side effects, permissions, idempotency, or what the response contains. For a mutation tool with no output schema, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely brief (5 words) but under-specified. Conciseness is positive, but here it sacrifices necessary detail. The description should at least mention the key parameters and their purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, no annotations, and no parameter descriptions. For a tool with 3 parameters and no other documentation, the description is grossly incomplete. It fails to provide enough context for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description adds no meaning to parameters. It does not explain that 'front' and 'back' are the card's content or what 'note_id' references. The agent cannot infer parameter roles from the description alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states the tool updates an existing card's content. Verb 'update' and resource 'card' are clear. However, it doesn't specify that content refers to 'front' and 'back' fields, which would further differentiate from sibling tools like 'create_cards' which also involve front/back.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus other sibling tools (e.g., create_cards, delete_cards). The description does not indicate that this tool should only be used for existing cards, nor does it mention any prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 8 tool updatesv2.1.0
    • First observedcreate_cards
    • First observedcreate_deck
    • First observeddelete_cards
    • First observeddelete_deck
    • First observedget_decks
    • First observedlist_cards
    • First observedrename_deck
    • First observedupdate_card

TDQS

B3.3/5.0

Scored across 8 tools

Disambiguation5/5

Each tool targets a distinct operation on either decks or cards. There is no overlap: deck tools (create, delete, rename, list) are clearly separate from card tools (create, update, delete, list). No two tools could be confused.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with lowercase and underscores. Verbs like create, delete, get, list, rename, update are used appropriately. No style mixing or inconsistent naming.

Tool Count5/5

With 8 tools, the server covers essential deck and card operations without being excessive. The number is well-scoped for a focused Anki integration, neither too thin nor too heavy.

Completeness3/5

Core CRUD operations for decks and cards are present, but notable gaps exist: there is no way to retrieve a single card's details (only list cards in a deck), and card creation is limited to the Basic model. Features like moving cards between decks or searching are missing, leaving some workflows incomplete.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers