anki-connect-mcp
Exposes every method of the Anki-Connect API v1 (95 methods) as individual MCP tools, enabling management of Anki flashcard collections: creating and modifying decks, notes, cards, models and media, querying and searching the collection, plus long-running operations such as collection sync and package import/export (with polling of operation handles until completion).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@anki-connect-mcp Create a deck called Japanese and add a note with the word こんにちは"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PyAnkiConnectMCP
MCP Server for anki connect
The anki-connect-mcp package is an MCP server for the
Anki-Connect API v1
(JSON-RPC 2.0, POST http://127.0.0.1:8765/api/v1).
Each of the 95 API methods is exposed as a separate MCP tool: decks.create → decks_create,
advanced.cards.update → advanced_cards_update, and so on. Tool input schemas are generated
from the official machine-readable contract api-v1.schema.json (bundled with the package), so
parameters, required fields and constraints match the documentation exactly.
Requirements
Python 3.11+
Anki 26.08+ with the Anki-Connect add-on (a version providing API v1) installed and enabled
Related MCP server: Anki MCP Server
Installation
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .Connecting a client
The server speaks MCP over stdio. The examples below use /path/to/PyAnkiConnectMCP for the
directory you cloned the repository into. The executable is
.venv/bin/anki-connect-mcp on Linux/macOS and .venv\Scripts\anki-connect-mcp.exe on Windows;
python -m anki_connect_mcp from the virtual environment works as well.
Claude Code
claude mcp add anki -- /path/to/PyAnkiConnectMCP/.venv/bin/anki-connect-mcpClaude Desktop and other clients
Add the server to mcpServers in the client config:
{
"mcpServers": {
"anki": {
"command": "/path/to/PyAnkiConnectMCP/.venv/bin/anki-connect-mcp",
"env": { "ANKICONNECT_API_KEY": "" }
}
}
}LangGraph
LangChain agents are LangGraph graphs, and LangChain loads MCP tools through langchain.mcp
(langchain[mcp]>=1.4.0). Install it in your agent's environment:
pip install "langchain[mcp]" "langchain[anthropic]"Then connect the server and hand its tools to an agent:
import asyncio
from langchain.agents import create_agent
from langchain.mcp import MCPAdapter
CONFIG = {
"mcpServers": {
"anki": {
"command": "/path/to/PyAnkiConnectMCP/.venv/bin/anki-connect-mcp",
# Any CLI flag from the Configuration table can be passed here.
"args": ["--include", "decks.*,notes.*,cards.*"],
},
}
}
async def main():
async with MCPAdapter(CONFIG) as adapter:
tools = await adapter.list_tools()
agent = create_agent("claude-sonnet-5-5", tools)
result = await agent.ainvoke(
{"messages": [{"role": "user", "content": "Create a deck called Vocabulary."}]}
)
print(result["messages"][-1].content)
asyncio.run(main())Notes:
With a single server the tool names are unchanged (
decks_create); when the config lists several servers, LangChain prefixes them with the config key (anki_decks_create).langchain.mcpis in beta and emits aLangChainBetaWarningon import.The server process lives as long as the
async withblock; run the agent inside it.Pass the API key with
"args": ["--api-key", "..."]if Anki-Connect requires one.create_agentreturns a compiled LangGraph graph, so the agent can also be used as a node in your ownStateGraph.On LangChain versions before 1.4.0, use
MultiServerMCPClientfrom thelangchain-mcp-adapterspackage with{"anki": {"command": ..., "args": [...], "transport": "stdio"}}andawait client.get_tools()instead.
Configuration
Environment variable | Flag | Default | Purpose |
|
|
| API v1 endpoint |
|
| — |
|
|
|
| HTTP timeout per request, seconds |
|
| off | Expose only read methods (plus |
|
| all | Comma-separated method patterns, e.g. |
|
| — | Hide methods, e.g. |
| — |
| Log level (logs go to stderr) |
If your client struggles with a large number of tools, narrow the set with --include.
How it works
Errors. JSON-RPC errors are returned as a tool result with
isError: trueand the fieldscode,type(notFound,validationFailed,staleSession, …),messageanddata. HTTP rejections (401/403/405/413) and an unreachable Anki are also turned into clear errors.Long-running operations. Methods with
Completion: operation(collection.sync,packages.import,browser.open,api.execute, …) return a handle. The server pollsoperations.getitself and returns the final result. These tools accept two extra arguments that are not sent to Anki:waitForCompletion(defaulttrue) —falsereturns the handle immediately;timeoutSeconds(default300) — when it expires, the pending operation record is returned; the work in Anki is not cancelled.
Annotations.
readOnlyHintis set for methods witheffect: read, anddestructiveHintfor methods that delete or overwrite data. Clients use these hints to ask for confirmation.Write requests are never retried automatically (the documentation states explicitly that a request ID is not an idempotency key).
Updating the schema
When a new API version is released, replace src/anki_connect_mcp/api-v1.schema.json with
api-v1.schema.json from the Anki-Connect repository — new methods will appear automatically.
Tests
.\.venv\Scripts\python.exe -m pip install -e ".[test]"
.\.venv\Scripts\python.exe -m pytestAvailable Tools
95 toolsaccess_requestPermissionaccess.requestPermissionB
Ask for access using the transport-supplied origin.
Never accept origin or allowed from parameters. Authentication exemption matches legacy permission discovery.
Anki-Connect method access.requestPermission. Scope: application. Effect: permission. Completion: completed. Undo: none.
Possible errors: internalError, invalidParams.
Inputs: no named parameters.
advanced_cards_updateadvanced.cards.updateADestructive
Edit validated expert scheduling metadata through native card persistence.
No id/noteId/deckId/template/queue/type/due/mod/usn writes. Moves, due changes and transitions use domain commands. Reject inconsistent coupled-state edits instead of inferring omitted state. Capability detection may restrict writable properties.
Anki-Connect method advanced.cards.update. Scope: collection. Effect: advancedWrite. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession, unsupportedCapability, validationFailed.
Inputs: patch (required), cardId (required), session.
advanced_reviews_importadvanced.reviews.importADestructive
Import historical revlog records, not live answers.
Validate all records; reject duplicate IDs both internally and against collection. Derive answeredAt from ID, set usn=-1 locally. Bound SQL in one database transaction; no schema interpolation. Do not change card scheduling/counters or claim a live answer. FSRS memory remains current stored state; later recomputation may consume imported history. Expose only when transactional import and post-write notifications are verified.
Anki-Connect method advanced.reviews.import. Scope: collection. Effect: advancedWrite. Completion: operation. Undo: clears.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, notFound, staleSession, unsupportedCapability, validationFailed.
Inputs: reviews (required), session, timeoutSeconds, waitForCompletion.
api_describeapi.describeBRead-only
Discover methods, schemas, limits and runtime capabilities.
Anki-Connect method api.describe. Scope: application. Effect: read. Completion: completed. Undo: none.
Possible errors: internalError, invalidParams.
Inputs: no named parameters.
api_executeapi.executeA
Execute commands sequentially with completion barriers and independent results.
Continue after errors. No nested api.execute, application.exit or profiles.switch commands. Pin the active collection session for collection-scoped commands; a session change fails remaining such commands. Validate each command with its named method schema. Never an atomic transaction.
Anki-Connect method api.execute. Scope: application. Effect: batch. Completion: operation. Undo: perCommand.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: internalError, invalidParams.
Inputs: commands (required), timeoutSeconds, waitForCompletion.
application_exitapplication.exitADestructive
Acknowledge a close request, then initiate normal application close after sending the response.
Accepted means the request was scheduled, not that Anki has exited. Native close/save/sync dialogs may cancel it. Retain timer/callback ownership; process exit prevents polling a final operation result.
Anki-Connect method application.exit. Scope: application. Effect: lifecycle. Completion: completed. Undo: none.
Possible errors: internalError, invalidParams.
Inputs: no named parameters.
application_importFileapplication.importFileADestructive
Run the interactive import workflow, including file choice when omitted.
Anki-Connect method application.importFile. Scope: collection. Effect: write. Completion: operation. Undo: clears.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: cancelled, collectionUnavailable, editorConflict, internalError, invalidParams, ioError, notFound, staleSession.
Inputs: path, session, timeoutSeconds, waitForCompletion.
browser_getSelectionbrowser.getSelectionARead-only
Read browser selection; closed browser returns open=false and empty arrays.
Anki-Connect method browser.getSelection. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
browser_openbrowser.openA
Open the browser and finish after the requested search/sort completes.
Omitted query preserves existing browser search. Explicit direction is applied regardless of previous/default column order.
Anki-Connect method browser.open. Scope: collection. Effect: gui. Completion: operation. Undo: none.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, internalError, invalidParams, invalidSearch, invalidState, staleSession.
Inputs: sort, query, session, timeoutSeconds, +1 more.
browser_selectbrowser.selectA
Replace selection in an already open browser.
Exactly one selector. Note IDs select their cards in card mode; card IDs select their notes in note mode. This method does not open a closed browser.
Anki-Connect method browser.select. Scope: collection. Effect: gui. Completion: operation. Undo: none.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, internalError, invalidParams, invalidState, notFound, staleSession.
Inputs: cardIds, noteIds, session, timeoutSeconds, +1 more.
cards_getcards.getARead-only
Read stored card state without rendering or predicting answers.
Anki-Connect method cards.get. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: id (required), session.
cards_getManycards.getManyARead-only
Get cards in input order.
Anki-Connect method cards.getMany. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: ids (required), session.
cards_movecards.moveA
Move cards with Collection.set_deck and target-preset invariants.
Target must already exist and be normal. Moving out of a filtered deck restores native state first through the native move operation.
Anki-Connect method cards.move. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, invalidState, notFound, staleSession.
Inputs: ids (required), deck (required), session.
cards_rendercards.renderBRead-only
Render a stored card with Anki rendering.
Anki-Connect method cards.render. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: id (required), session.
cards_searchcards.searchARead-only
Search cards using Anki search syntax.
Anki-Connect method cards.search. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, invalidSearch, staleCursor, staleSession.
Inputs: query (required), sort, limit, cursor, +1 more.
cards_setFlagscards.setFlagsA
Set the user flag through Anki native flag persistence.
Zero clears the user flag; preserve other backend flag bits.
Anki-Connect method cards.setFlags. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: ids (required), flag (required), session.
cards_setSuspendedcards.setSuspendedA
Suspend or restore cards idempotently.
changed=false means already in requested state. Process repeated mutation IDs once and repeat their result.
Anki-Connect method cards.setSuspended. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: ids (required), suspended (required), session.
collection_checkIntegritycollection.checkIntegrityA
Run Anki database checks and repairs with normal UI completion.
Anki-Connect method collection.checkIntegrity. Scope: collection. Effect: write. Completion: operation. Undo: clears.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: cancelled, collectionUnavailable, editorConflict, internalError, invalidParams, staleSession.
Inputs: session, timeoutSeconds, waitForCompletion.
collection_getcollection.getBRead-only
Inspect the active collection and its session.
Anki-Connect method collection.get. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
collection_refreshcollection.refreshA
Refresh windows, optionally invalidating supported collection caches first.
Does not close/reopen the collection and does not repair invalid scheduling state.
Anki-Connect method collection.refresh. Scope: collection. Effect: refresh. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: target, session.
collection_synccollection.syncADestructive
Run one coordinated GUI/background sync.
Full sync choices are waitingForUser; never launch a second sync. includeMedia is intersected with profile media-sync settings.
Anki-Connect method collection.sync. Scope: collection. Effect: lifecycle. Completion: operation. Undo: none.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: authenticationRequired, busy, cancelled, collectionUnavailable, editorConflict, internalError, invalidParams, ioError, staleSession.
Inputs: session, includeMedia, timeoutSeconds, waitForCompletion.
collection_undocollection.undoADestructive
Undo the current Anki undo entry.
Anki-Connect method collection.undo. Scope: collection. Effect: write. Completion: operation. Undo: undo.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, invalidState, staleSession.
Inputs: session, timeoutSeconds, waitForCompletion.
deckPresets_assigndeckPresets.assignA
Assign a preset and execute native dependent-card updates.
Anki-Connect method deckPresets.assign. Scope: collection. Effect: write. Completion: operation. Undo: perItem.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, invalidState, notFound, staleSession.
Inputs: decks (required), preset (required), session, rescheduleFsrs, +2 more.
deckPresets_createdeckPresets.createA
Create a preset by cloning a specified preset or native defaults.
Anki-Connect method deckPresets.create. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: name (required), session, cloneFrom.
deckPresets_deletedeckPresets.deleteADestructive
Delete a preset, explicitly reassigning dependent decks first.
replacement is required when in use. Reject Default preset deletion. No changes occur on failed preflight; do not promise atomicity across multiple native backend operations.
Anki-Connect method deckPresets.delete. Scope: collection. Effect: write. Completion: operation. Undo: grouped.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: preset (required), session, replacement, timeoutSeconds, +1 more.
deckPresets_getdeckPresets.getARead-only
Read a typed preset.
Anki-Connect method deckPresets.get. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: preset (required), session.
deckPresets_listdeckPresets.listARead-only
List available deck presets.
Anki-Connect method deckPresets.list. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
deckPresets_updatedeckPresets.updateA
Update a preset and all dependent cards through the coordinated backend request.
Require name or settings. Preserve current target deck, collection settings, overrides and custom scheduler in the update request. rescheduleFsrs explicitly controls optional full rescheduling; mandatory native memory/step updates still run.
Anki-Connect method deckPresets.update. Scope: collection. Effect: write. Completion: operation. Undo: single.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession, validationFailed.
Inputs: preset (required), name, session, settings, +3 more.
decks_createdecks.createA
Create a normal deck, returning the existing deck for an exact existing name.
Anki-Connect method decks.create. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, staleSession.
Inputs: name (required), session.
decks_deletedecks.deleteADestructive
Delete decks and their cards with explicit acknowledgement.
Includes native child-deck deletion and removal of resulting cardless notes; deleting Default follows native behavior.
Anki-Connect method decks.delete. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, invalidState, notFound, staleSession.
Inputs: decks (required), deleteCards (required), session.
decks_getdecks.getARead-only
Resolve a deck without creating it or falling back to Default.
Anki-Connect method decks.get. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: deck (required), session.
decks_getCountsdecks.getCountsBRead-only
Get native due-tree counts and total cards.
Anki-Connect method decks.getCounts. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: deck (required), session, includeChildren.
decks_listdecks.listARead-only
List decks in case-sensitive name order.
Anki-Connect method decks.list. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
decks_updatedecks.updateA
Rename a deck using native hierarchy handling.
Anki-Connect method decks.update. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: deck (required), name (required), session.
editors_openAddeditors.openAddA
Open or activate the configured Add editor and optionally populate a draft.
Use the active legacy/Svelte variant. Do not run duplicate/empty-field eligibility checks on an unfinished draft. Return noteId=null until persisted; do not claim ID 0 identifies a future note.
Anki-Connect method editors.openAdd. Scope: collection. Effect: gui. Completion: operation. Undo: none.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: note, session, timeoutSeconds, waitForCompletion.
editors_openNoteeditors.openNoteA
Open the custom note editor and finish once it is ready.
Anki-Connect method editors.openNote. Scope: collection. Effect: gui. Completion: operation. Undo: none.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: noteId (required), session, timeoutSeconds, waitForCompletion.
editors_updateDrafteditors.updateDraftA
Update an Add draft through coordinated dialog setters.
Set note type before explicit deck. replace changes only supplied fields/tags. append concatenates supplied field strings and unions tags; deck/type still replace. Reject invalid fields before altering the draft.
Anki-Connect method editors.updateDraft. Scope: collection. Effect: gui. Completion: operation. Undo: none.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: patch (required), editorId (required), mode, session, +2 more.
media_deletemedia.deleteADestructive
Move media to Anki trash without deleting notes.
Anki-Connect method media.delete. Scope: collection. Effect: media. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: filename (required), session.
media_getmedia.getARead-only
Read media bytes as base64.
A basename is required; no filesystem traversal or arbitrary paths.
Anki-Connect method media.get. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: filename (required), session.
media_getDirectorymedia.getDirectoryARead-only
Return the local active collection media directory.
Anki-Connect method media.getDirectory. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
media_listmedia.listARead-only
List normalized media basenames matching a basename glob.
Anki-Connect method media.list. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: pattern, session.
media_storemedia.storeA
Acquire and store media using Anki filename normalization.
Reject traversal and path separators in filename. Validate strict base64 and source types before acquisition. Skip comparison is against incoming bytes and never deletes an existing file. Replacement is explicit and not collection-undoable.
Anki-Connect method media.store. Scope: collection. Effect: media. Completion: operation. Undo: none.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, conflict, internalError, invalidParams, ioError, notFound, staleSession.
Inputs: source (required), filename (required), session, collision, +3 more.
notes_convertnotes.convertADestructive
Convert same-type notes through Anki note-type conversion.
Mappings are complete target-name to source-name/null lists. Reject duplicate source mappings, mixed source note types and stale tokens. Removed source templates lose their cards/history as defined by Anki; cloze mappings use native supported rules, never raw mid assignment.
Anki-Connect method notes.convert. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, notFound, staleSession, unsupportedCapability.
Inputs: ids (required), fields (required), target (required), planToken (required), +2 more.
notes_createnotes.createB
Create a note and return its actual generated cards.
Anki-Connect method notes.create. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession, validationFailed.
Inputs: deck (required), fields (required), noteType (required), tags, +3 more.
notes_createManynotes.createManyA
Create notes independently, or as one native atomic collection batch.
atomic=true validates the full set including within-batch duplicates, then uses Collection.add_notes. Any failure is a top-level error with indexed issues and no collection changes. Success keeps the same items result shape. Empty input is a no-op.
Anki-Connect method notes.createMany. Scope: collection. Effect: write. Completion: completed. Undo: perItemOrAtomic.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession, validationFailed.
Inputs: notes (required), atomic, session.
notes_deletenotes.deleteADestructive
Delete notes and their cards; missing IDs are item errors.
Anki-Connect method notes.delete. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: ids (required), session.
notes_findEmptynotes.findEmptyARead-only
Find cleanup candidates by an explicit criterion.
No deletion. allFieldsEmpty uses native HTML-aware emptiness; allQuestionsEmpty uses native empty-card generation. Return all matching IDs through normal cursor pagination.
Anki-Connect method notes.findEmpty. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, invalidSearch, staleSession.
Inputs: criterion (required), limit, query, cursor, +1 more.
notes_getnotes.getARead-only
Get a note, including an empty cardIds array for cardless notes.
Anki-Connect method notes.get. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: id (required), session.
notes_getManynotes.getManyARead-only
Get notes in input order, preserving repeated IDs.
Anki-Connect method notes.getMany. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: ids (required), session.
notes_planConversionnotes.planConversionBRead-only
Get native suggested field/template mappings and a schema token.
Anki-Connect method notes.planConversion. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: source (required), target (required), session.
notes_searchnotes.searchARead-only
Search with Anki syntax; an empty query searches all notes.
Anki-Connect method notes.search. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, invalidSearch, staleCursor, staleSession.
Inputs: query (required), sort, limit, cursor, +1 more.
notes_updatenotes.updateA
Apply fields and tags together in one native note update.
Anki-Connect method notes.update. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession, validationFailed.
Inputs: id (required), patch (required), session.
notes_validatenotes.validateARead-only
Validate note content and duplicate scope without acquiring media.
Semantic content failures return valid=false and issues; bad references or parameter types are RPC errors.
Anki-Connect method notes.validate. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: note (required), session.
notes_validateManynotes.validateManyARead-only
Validate each note independently without side effects.
Anki-Connect method notes.validateMany. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: notes (required), session.
noteTypes_createnoteTypes.createA
Create a normal or cloze note type.
Anki-Connect method noteTypes.create. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, staleSession, validationFailed.
Inputs: name (required), fields (required), templates (required), css, +6 more.
noteTypes_deleteUnusednoteTypes.deleteUnusedADestructive
Delete only explicitly selected note types whose use count is zero.
Anki-Connect method noteTypes.deleteUnused. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: noteTypes (required), session.
noteTypes_editStructurenoteTypes.editStructureA
Apply ordered structural edits and persist once using native note-type updates.
Carry original field/template ordinals to preserve card identity. Added entries have no original ordinal. Validate all edits on a copy before saving; reject last field/template removal and invalid cloze structures.
Anki-Connect method noteTypes.editStructure. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession, validationFailed.
Inputs: edits (required), noteType (required), session.
noteTypes_getnoteTypes.getBRead-only
Read ordered fields/templates and styling.
Anki-Connect method noteTypes.get. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: noteType (required), session.
noteTypes_getTemplateUsagenoteTypes.getTemplateUsageARead-only
Inspect question/answer template field references.
Python adapter mirrors native token rules because the parsed tree is not exposed to Python. Includes conditional fields and filtered replacements, ignores HTML comments and special fields, supports legacy alternate delimiters, and returns real fields once in first-reference order.
Anki-Connect method noteTypes.getTemplateUsage. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession, validationFailed.
Inputs: noteType (required), session.
noteTypes_listnoteTypes.listARead-only
List note types in name order.
Anki-Connect method noteTypes.list. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
noteTypes_replaceTextnoteTypes.replaceTextADestructive
Replace literal text in explicit note types or all note types.
Exactly one selector: noteTypes or allNoteTypes=true. Count changed types, not occurrences.
Anki-Connect method noteTypes.replaceText. Scope: collection. Effect: write. Completion: completed. Undo: grouped.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, staleSession.
Inputs: find (required), replace (required), session, targets, +2 more.
noteTypes_updatenoteTypes.updateA
Update nonstructural note-type settings.
Anki-Connect method noteTypes.update. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession, validationFailed.
Inputs: patch (required), noteType (required), session.
operations_canceloperations.cancelADestructive
Request supported cancellation without claiming rollback.
Already terminal returns requested=false. Queued operations can cancel; running operations use native cancellation only. A cancellation request may lose a race with success.
Anki-Connect method operations.cancel. Scope: application. Effect: lifecycle. Completion: completed. Undo: none.
Possible errors: internalError, invalidParams, notFound, unsupportedCapability.
Inputs: operationId (required).
operations_getoperations.getARead-only
Poll operation status and its eventual typed result/error.
Anki-Connect method operations.get. Scope: application. Effect: read. Completion: completed. Undo: none.
Possible errors: internalError, invalidParams, notFound.
Inputs: operationId (required).
packages_exportpackages.exportA
Export the specified deck package.
Anki-Connect method packages.export. Scope: collection. Effect: filesystem. Completion: operation. Undo: none.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: cancelled, collectionUnavailable, internalError, invalidParams, ioError, notFound, staleSession.
Inputs: deck (required), path (required), session, timeoutSeconds, +2 more.
packages_importpackages.importADestructive
Import an Anki package with normal collection completion.
Anki-Connect method packages.import. Scope: collection. Effect: write. Completion: operation. Undo: clears.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: cancelled, collectionUnavailable, editorConflict, internalError, invalidParams, ioError, notFound, staleSession.
Inputs: path (required), session, timeoutSeconds, waitForCompletion.
profiles_getActiveprofiles.getActiveARead-only
Return the active profile or null.
Anki-Connect method profiles.getActive. Scope: application. Effect: read. Completion: completed. Undo: none.
Possible errors: internalError, invalidParams.
Inputs: no named parameters.
profiles_listprofiles.listARead-only
List existing profiles.
Anki-Connect method profiles.list. Scope: application. Effect: read. Completion: completed. Undo: none.
Possible errors: internalError, invalidParams.
Inputs: no named parameters.
profiles_switchprofiles.switchADestructive
Switch profiles and finish when the destination collection is ready.
Anki-Connect method profiles.switch. Scope: application. Effect: lifecycle. Completion: operation. Undo: none.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: busy, cancelled, internalError, invalidParams, notFound.
Inputs: name (required), timeoutSeconds, waitForCompletion.
reviewer_answerreviewer.answerA
Answer the active card using reviewer-retained states and await actual completion.
Requires answer side and an offered rating. Do not resolve success until backend completion and UI notifications; reviewer hook veto returns vetoed.
Anki-Connect method reviewer.answer. Scope: collection. Effect: write. Completion: operation. Undo: single.
Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, invalidState, staleSession, vetoed.
Inputs: rating (required), stateToken (required), session, timeoutSeconds, +1 more.
reviewer_getreviewer.getARead-only
Read active reviewer state and retained custom scheduling predictions.
Inactive reviewer returns null card/rendered/token, side=none and empty answers.
Anki-Connect method reviewer.get. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
reviewer_playAudioreviewer.playAudioA
Replay audio for the current side.
Anki-Connect method reviewer.playAudio. Scope: collection. Effect: gui. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, conflict, internalError, invalidParams, invalidState, staleSession.
Inputs: stateToken (required), session.
reviewer_showAnswerreviewer.showAnswerA
Show the answer for the active reviewer card.
Anki-Connect method reviewer.showAnswer. Scope: collection. Effect: gui. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, conflict, internalError, invalidParams, invalidState, staleSession.
Inputs: stateToken (required), session.
reviewer_showQuestionreviewer.showQuestionA
Show the question for the active reviewer card.
Anki-Connect method reviewer.showQuestion. Scope: collection. Effect: gui. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, conflict, internalError, invalidParams, invalidState, staleSession.
Inputs: stateToken (required), session.
reviewer_startTimerreviewer.startTimerA
Restart the active reviewer card timer.
Anki-Connect method reviewer.startTimer. Scope: collection. Effect: gui. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, conflict, internalError, invalidParams, invalidState, staleSession.
Inputs: stateToken (required), session.
reviews_getLatestIdreviews.getLatestIdBRead-only
Return the latest matching history ID or null.
Anki-Connect method reviews.getLatestId. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: deck, cardIds, session, membership.
reviews_listreviews.listARead-only
Read review history ordered by ascending review ID.
cardIds and deck are mutually exclusive. No selector means all history. afterId is exclusive. Current/home membership is explicit for filtered cards.
Anki-Connect method reviews.list. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleCursor, staleSession.
Inputs: deck, limit, cursor, afterId, +5 more.
scheduling_answerscheduling.answerA
Answer using native states matching the supplied prediction token.
Reject suspended/buried and filtered-preview cards. For the active GUI card use reviewer.answer. Native elapsed-time capping applies. No client-supplied historical answer timestamp.
Anki-Connect method scheduling.answer. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, invalidState, notFound, staleSession.
Inputs: cardId (required), rating (required), stateToken (required), session, +1 more.
scheduling_answerManyscheduling.answerManyA
Answer cards independently in input order.
Anki-Connect method scheduling.answerMany. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, conflict, editorConflict, internalError, invalidParams, invalidState, notFound, staleSession.
Inputs: answers (required), session.
scheduling_getscheduling.getBRead-only
Read authoritative current scheduling state.
Anki-Connect method scheduling.get. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: cardId (required), session.
scheduling_getDuescheduling.getDueARead-only
Inspect queue-aware due eligibility without requiring history.
dueNow excludes learn-ahead and suspended/buried queues. New cards are available but have no timed due obligation. available ignores daily deck limits; includeLearnAhead expands learning availability only.
Anki-Connect method scheduling.getDue. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: cardId (required), session, includeLearnAhead.
scheduling_getQueuescheduling.getQueueARead-only
Read cards in native scheduler order with remaining counts.
Uses Anki's currently selected deck and respects native limits, mixing and scheduler order. Reading the queue is idempotent; subsequent scheduling changes can change the snapshot.
Anki-Connect method scheduling.getQueue. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session, fetchLimit.
scheduling_predictscheduling.predictARead-only
Predict native answers and issue a session-scoped state token.
Does not represent custom states held by the GUI reviewer. Tokens are invalidated by relevant writes, undo, profile change and scheduler-day rollover.
Anki-Connect method scheduling.predict. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, invalidState, notFound, staleSession.
Inputs: cardId (required), session.
scheduling_resetscheduling.resetADestructive
Reset cards as new using the native scheduler.
Anki-Connect method scheduling.reset. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: cardIds (required), log, session, resetCounts, +1 more.
scheduling_setDueDatescheduling.setDueDateA
Set due dates using Anki native days/range syntax.
Anki-Connect method scheduling.setDueDate. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession, validationFailed.
Inputs: days (required), cardIds (required), session.
statistics_getHtmlstatistics.getHtmlBRead-only
Return the supported legacy HTML report, labelled as such.
Anki-Connect method statistics.getHtml. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: deck, session.
statistics_getReviewDaysstatistics.getReviewDaysARead-only
Return all nonempty historical review days in descending date order using native graph day conventions.
Anki-Connect method statistics.getReviewDays. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
statistics_getSummarystatistics.getSummaryARead-only
Get structured collection statistics or an explicit deck including children.
Anki-Connect method statistics.getSummary. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, notFound, staleSession.
Inputs: deck, session.
statistics_getTodaystatistics.getTodayARead-only
Count actual reviews in Anki current scheduler day, excluding manual/rescheduled entries.
Anki-Connect method statistics.getToday. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
tags_addtags.addB
Add tags on selected notes.
Anki-Connect method tags.add. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: tags (required), noteIds (required), session.
tags_deleteUnusedtags.deleteUnusedADestructive
Remove unused tag registrations.
Anki-Connect method tags.deleteUnused. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, staleSession.
Inputs: session.
tags_listtags.listARead-only
List registered tags.
Anki-Connect method tags.list. Scope: collection. Effect: read. Completion: completed. Undo: none.
Possible errors: collectionUnavailable, internalError, invalidParams, staleSession.
Inputs: session.
tags_removetags.removeA
Remove tags on selected notes.
Anki-Connect method tags.remove. Scope: collection. Effect: write. Completion: completed. Undo: perItem.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, notFound, staleSession.
Inputs: tags (required), noteIds (required), session.
tags_replacetags.replaceADestructive
Replace a tag on explicit notes or all notes.
Exactly one selector: noteIds or allNotes=true. Never interpret an omitted selector as all notes.
Anki-Connect method tags.replace. Scope: collection. Effect: write. Completion: completed. Undo: single.
Possible errors: collectionUnavailable, editorConflict, internalError, invalidParams, staleSession.
Inputs: to (required), from (required), noteIds, session, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 95 tools
Tools are organized by resource namespace and most actions are explicitly scoped, but with 95 operations there are many near-neighbors such as get vs getMany, validate vs validateMany, scheduling.answer vs reviewer.answer, and media.get vs media.list. The detailed descriptions usually resolve these boundaries, so an agent can distinguish them, though not effortlessly.
Every tool follows a predictable resource_action convention, with the resource namespace followed by a camelCase action such as notes_create, cards_setSuspended, deckPresets_list, and advanced_cards_update. Suffix variants like getMany or deleteUnused remain systematic and consistent.
95 tools is far beyond an appropriate MCP surface for agent selection; even for a full Anki desktop integration, many granular and long-tail operations are exposed as separate tools. This forces agents to navigate an extremely large toolset rather than a well-scoped set of workflows.
The surface comprehensively covers collection, notes, cards, decks, note types, deck presets, tags, media, scheduling, reviews, statistics, GUI/browser/editor actions, profiles, packages, operations, and advanced maintenance. There are no obvious domain lifecycle gaps.
Maintenance
Related MCP Connectors
Every Canopy public API operation as a tool, run as you after a browser sign-in or on an API key.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Read-only search of 2,189 AI agent tools (MCP servers, x402 APIs) with daily automated trust scores.
Read and edit GA4, Search Console and Google Tag Manager from any MCP client. 29 tools.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceExposes Anki flashcard collections to AI assistants via MCP, enabling AI-powered study sessions, card creation, deck management, and review workflows. Supports comprehensive collection operations including search, media management, and note type customization.102-
- FlicenseNot gradedqualityDmaintenanceProvides programmatic access to Anki flashcard operations through the AnkiConnect API, allowing users to list and create decks and cards. It enables seamless management of flashcards directly from MCP-compatible clients like Claude Desktop.-
- AlicenseNot gradedqualityCmaintenanceExposes Anki as a set of tools for LLM clients, enabling note creation, search, review, and deck management via AnkiConnect.16 npmMIT
- AlicenseBqualityCmaintenanceEnables AI assistants to manage Anki flashcards, decks, note types, tags, and media via AnkiConnect. Supports operations like adding, editing, finding, and syncing cards through a local MCP server.100MIT