anki-mcp
MCP server for seamless integration with Anki via AnkiConnect.
Key Features
Use Cases
README
anki-mcp
A Model Context Protocol (MCP) server for interacting with Anki flashcards via the AnkiConnect add-on. This server exposes AnkiConnect actions as MCP tools, organized into logical services.
Prerequisites
- Anki desktop application
- AnkiConnect add-on installed and configured in Anki
- Python 3.8+
uv(for running and installing dependencies, optional but recommended)
Installation
# Clone the repository
git clone https://github.com/ujisati/anki-mcp.git
cd anki-mcp
# Install dependencies (using uv)
uv pip install -e .
Usage
To run the MCP server:
uv run anki-mcp
The server will start and listen for MCP requests, typically interfacing with AnkiConnect at http://127.0.0.1:8765.
Inspecting the Server
You can use the MCP Inspector to view the available tools:
npx @modelcontextprotocol/inspector uv run anki-mcp
Configuration for MCP Clients
If you're integrating this with an MCP client (like an AI assistant framework), you'll need to configure it to find this server. Here's an example configuration snippet:
{
"mcpServers": {
"anki": {
"command": "uv",
"args": [
"run", // uv will find anki-mcp if run from project root
"anki-mcp"
],
// If running from outside the project directory, specify the path:
// "args": [
// "--directory",
// "/ABSOLUTE/PATH/TO/anki-mcp", // Replace with actual path
// "run",
// "anki-mcp"
// ]
}
}
}
Available MCP Tools
This MCP server provides access to Anki functionality through tools grouped by services. The tool names correspond directly to AnkiConnect actions.
Deck Service (deck.*)
deck.deckNamesAndIds: Gets the complete list of deck names and their respective IDs.deck.getDeckConfig: Gets the configuration group object for a given deck name.deck.deckNames: Gets the complete list of deck names for the current user.deck.createDeck: Creates a new empty deck.deck.deleteDecks: Deletes specified decks.deck.changeDeck: Moves cards to a different deck.deck.saveDeckConfig: Saves a deck configuration group.
Note Service (note.*)
note.findNotes: Returns note IDs for a given Anki search query.note.notesInfo: Returns information for specified note IDs.note.getNoteTags: Gets the tags for a specific note ID.note.addNote: Creates a new note.note.updateNoteFields: Modifies the fields of an existing note.note.deleteNotes: Deletes specified notes.note.addNotes: Creates multiple notes.note.addTags: Adds tags to specified notes.note.removeTags: Removes tags from specified notes.note.updateNote: Modifies the fields and/or tags of an existing note.
Card Service (card.*)
card.findCards: Returns card IDs for a given Anki search query.card.cardsInfo: Returns information for specified card IDs.card.cardsToNotes: Returns note IDs for given card IDs.card.areSuspended: Checks if specified cards are suspended.card.cardsModTime: Returns modification time for specified card IDs.card.suspended: Checks if a single card is suspended.card.suspend: Suspends specified cards.card.unsuspend: Unsuspends specified cards.card.setSpecificValueOfCard: Sets specific values of a single card (use with caution).
Model Service (model.*) (Note Types)
model.modelNamesAndIds: Gets the complete list of model (note type) names and their IDs.model.findModelsByName: Gets model definitions for provided model names.model.modelFieldNames: Gets field names for a given model name.model.modelTemplates: Gets template content for each card of a specified model.model.modelStyling: Gets CSS styling for a given model name.model.createModel: Creates a new model (note type).model.updateModelTemplates: Modifies templates of an existing model.model.updateModelStyling: Modifies CSS styling of an existing model.model.modelFieldAdd: Adds a new field to an existing model.model.modelFieldRemove: Removes a field from an existing model.
Media Service (media.*)
media.retrieveMediaFile: Retrieves the base64-encoded contents of a media file.media.getMediaFilesNames: Gets names of media files matching a glob pattern.media.storeMediaFile: Stores a media file (from base64, path, or URL).media.deleteMediaFile: Deletes a specified media file.
Development
To set up for development:
uv sync
source .venv/bin/activate
uv pip install -e .
Running Tests
pytest
Todo
- Finish adding all AnkiConnect tools
Star History
Repository Owner
User
Repository Details
Programming Languages
Tags
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
FastMCP
The fast, Pythonic way to build MCP servers and clients.
FastMCP is a production-ready framework for building Model Context Protocol (MCP) applications in Python. It streamlines the creation of MCP servers and clients, providing advanced features such as enterprise authentication, composable tools, OpenAPI/FastAPI generation, server proxying, deployment tools, and comprehensive client libraries. Designed for ease of use, it offers both standard protocol support and robust utilities for production deployments.
- ⭐ 20,201
- MCP
- jlowin/fastmcp
Wanaku MCP Router
A router connecting AI-enabled applications through the Model Context Protocol.
Wanaku MCP Router serves as a middleware router facilitating standardized context exchange between AI-enabled applications and large language models via the Model Context Protocol (MCP). It streamlines context provisioning, allowing seamless integration and communication in multi-model AI environments. The tool aims to unify and optimize the way applications provide relevant context to LLMs, leveraging open protocol standards.
- ⭐ 87
- MCP
- wanaku-ai/wanaku
ws-mcp
WebSocket bridge for MCP stdio servers.
ws-mcp wraps Model Context Protocol (MCP) stdio servers with a WebSocket interface, enabling seamless integration with web-based clients and tools. It allows users to configure and launch multiple MCP servers via a flexible configuration file or command-line arguments. The tool is designed to be compatible with services such as wcgw, fetch, and other MCP-compliant servers, providing standardized access to system operations, HTTP requests, and more. Integration with tools like Kibitz enables broader applications in model interaction workflows.
- ⭐ 19
- MCP
- nick1udwig/ws-mcp
mcp-datetime
Datetime formatting service MCP server for Claude Desktop App
mcp-datetime provides a datetime formatting service implemented as an MCP server for integration with the Claude Desktop Application. It offers generation of current date and time strings in various formats, including standard, Japanese, ISO, and filename-friendly outputs. The server exposes a 'get_datetime' tool for easy retrieval of formatted dates and times with support for timezone handling and multi-language output. Seamless integration and Python packaging facilitate installation and extensibility.
- ⭐ 25
- MCP
- ZeparHyfar/mcp-datetime
TickTick MCP
MCP server for AI-powered TickTick task management integration
TickTick MCP is a Model Context Protocol (MCP) server that enables standardized integration of TickTick's task management features with AI assistants and developer applications. It allows programmatic access to create, update, retrieve, complete, or delete tasks and projects in TickTick via Python. Using this MCP server, AI systems can leverage TickTick's API to help automate and manage user's to-do lists and projects through natural language or other interfaces.
- ⭐ 6
- MCP
- ekkyarmandi/ticktick-mcp
TickTick MCP Server
Enable powerful AI-driven task management for TickTick via the Model Context Protocol.
TickTick MCP Server provides comprehensive programmatic access to TickTick task management features using the Model Context Protocol. Built on the ticktick-py library, it enables AI assistants and MCP-compatible applications to create, update, retrieve, and filter tasks with improved precision and flexibility. The server supports advanced filtering, project and tag management, subtask handling, and robust context management for seamless AI integration.
- ⭐ 35
- MCP
- jen6/ticktick-mcp
Didn't find tool you were looking for?