mcpField
F
flashdeck

flashdeck

Local
github.com/CloudCorpRecordsScience & Education0Updated 1w ago

About flashdeck

flashdeck is an MCP server and CLI for studying and managing Anki flashcards through a local Anki instance with AnkiConnect. It supports review actions as well as deck, note, tag, and collection-statistics management.

Key features

  1. 01Review due cards and rate reviews
  2. 02List and create decks
  3. 03Create, search, update, and delete notes
  4. 04Manage note tags and types
  5. 05View deck and collection statistics
  6. 06Sync with AnkiWeb

Use cases

  1. 01Review cards due in a selected deck
  2. 02Add or batch-create notes in Anki
  3. 03Find notes and update their fields
  4. 04Inspect study and collection statistics

MCP support

The MCP server exposes tools for card reviews, decks, notes, tags, note types, synchronization, and statistics. It requires Anki running with the AnkiConnect add-on.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-flashdeck": {
"command": "npx",
"args": [
"-y",
"@reneturcios/flashdeck"
]
}
}
}
Run commandnpx -y @reneturcios/flashdeck

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/flashdeck0.1.0
ocighcr.io/cloudcorprecords/flashdeck:0.1.0

Tools

20

Saved tool list · updated 1w ago

This tool takes no parameters.

Details

From the project README

flashdeck

flashdeck lets an agent study and manage Anki flashcards through a local Anki instance running AnkiConnect. It covers the review loop (due cards, presenting a card, rating it), decks, notes, tags, note types, and collection statistics — a labelled core subset of 20 tools from the 53 documented in the original Anki MCP spec.

Anki must be running with the AnkiConnect add-on installed. By default flashdeck talks to http://127.0.0.1:8765; set ANKICONNECT_URL to point elsewhere.

Install

npx @reneturcios/flashdeck check

Or run the container image:

docker run -i ghcr.io/cloudcorprecords/flashdeck

The container defaults to the MCP server. Pass CLI arguments to use it as a CLI instead. Note the container still needs network access to the host's AnkiConnect endpoint.

CLI

flashdeck check           # probe AnkiConnect (deck list on success)
flashdeck decks           # list decks
flashdeck due [deck]      # due cards, optionally for one deck
flashdeck stats [deck]    # deck stats, or collection stats with no deck
flashdeck tags            # all tags
flashdeck models          # all note types
flashdeck sync            # sync with AnkiWeb
flashdeck --version

Most commands accept --json. Exit codes: 0 success, 1 error (the message names the AnkiConnect or validation problem), 2 usage error.

MCP server

npx -y @reneturcios/flashdeck mcp

MCP client configuration:

{
  "mcpServers": {
    "flashdeck": {
      "command": "npx",
      "args": ["-y", "@reneturcios/flashdeck", "mcp"]
    }
  }
}
Tools
ToolInputWhat it does
sync—Sync with AnkiWeb.
get_due_cardsdeck?, include_answer?Due cards, optional deck filter; answers omitted unless requested.
get_cardsdeck?, state?, include_answer?Cards filtered by state (due/new/learning/suspended/buried) and deck.
present_cardcard_idShow a card's question/front.
rate_cardcard_id, ease (1-4)Rate Again/Hard/Good/Easy and schedule next review.
listDecksinclude_stats?List decks, optional per-deck stats.
deckStatsdeckStatistics for one deck.
createDeckdeckCreate a deck (Parent::Child, max 2 levels).
addNotedeck_name, model_name, fields, tags?Create one note.
addNotesdeck_name, model_name, notesBatch-create up to 100 notes.
findNotesquerySearch notes with Anki query syntax.
notesInfonotesDetails for notes.
updateNoteFieldsnote_id, fieldsUpdate a note's fields.
deleteNotesnotes, confirm?Delete notes; refused without confirm: true.
getTags—All tags.
addTagsnotes, tagsAdd tags to notes.
removeTagsnotes, tagsRemove tags from notes.
modelNames—List note types.
modelFieldNamesmodel_nameField names for a note type.
collection_stats—Aggregated collection statistics.

Deck statistics are computed locally from per-state card searches; no statistics endpoint is assumed. When Anki is not running, tools return an error naming the failed AnkiConnect request rather than an empty result.

Development

npm install
npm run build   # tsc -> dist/
npm test        # node test runner over test/*.test.ts, fake fetch only, no live Anki
npm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.