home / mcp / anki mcp elevenlabs server
FastMCP server for Anki with ElevenLabs TTS support, enabling deck management, audio generation, and bulk note operations.
Configuration
View docs{
"mcpServers": {
"spencerf2-anki-mcp-elevenlabs": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/anki-mcp/",
"run",
"server.py"
],
"env": {
"GOOGLE_CLOUD_API_KEY": "YOUR_GOOGLE_CLOUD_API_KEY"
}
}
}
}You run an MCP server that connects Anki with ElevenLabs-powered text-to-speech and a suite of deck-management tools. It lets you create, read, update, and bulk-manage notes and media, with high-quality audio generation powered by Google Cloud TTS and seamless AnkiConnect integration for local decks.
To use this MCP server with your client, start the server and connect via the local MCP endpoint. You can list decks, inspect deck notes, generate audio, and bulk-create or update notes. Use the available tools to perform common tasks like extracting deck structures, adding audio, saving media to Anki, and searching for similar notes across your decks.
Practical workflows include: creating a new note in a deck, generating pronunciation audio for a card, bulk-adding multiple notes, and updating existing notes to attach audio while preserving other fields. When you generate audio, the system uses Google Cloud Text-to-Speech with a Chinese-optimized voice by default, and you can adjust language or voice as needed.
Prerequisites you need to have installed on your system before starting are Python, the uv utility, and Anki running with AnkiConnect enabled.
Step by step install and run flow:
# 1) Install the MCP runtime tooling
uv sync
# 2) Ensure Anki is running with AnkiConnect installed (Tools > Add-ons > Get Add-ons, then enter 2055492159 and restart Anki)
# 3) Set up API key for audio generation (optional, if using Google Cloud TTS)
export GOOGLE_CLOUD_API_KEY='your-google-cloud-api-key-here'
# 4) Start the MCP server
uv run server.pyConfiguration includes wiring the server to use Google Cloud TTS for audio generation and enabling local AnkiConnect access. The server reads GOOGLE_CLOUD_API_KEY from your environment when generating audio.
Claude Desktop integration is supported. You configure Claude to launch the MCP server via a stdio process, passing the required directory and start commands, and you can supply the Google Cloud API key through the environment. The example below shows how Claude can be pointed at the MCP server.
{
"mcpServers": {
"anki_mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/anki-mcp/",
"run",
"server.py"
],
"env": {
"GOOGLE_CLOUD_API_KEY": "your-google-cloud-api-key-here"
}
}
}
}Lists all available Anki decks with their note counts.
Retrieves all notes from a specified deck with detailed field information.
Fetches a random sample of notes from a deck to inspect structure.
Analyzes a deck to identify note types and their fields.
Creates a new note in a specified deck with given model and fields.
Updates specific fields of an existing note while preserving others.
Creates a new deck and optionally a new note type with custom fields and templates.
Lists all available note types (models) with their fields and templates.
Generates base64-encoded MP3 audio from text using Google Cloud TTS.
Saves base64-encoded media data to Anki's media collection.
Generates audio from text and saves it directly to Anki's media collection.
Creates multiple notes in a single batch with duplicate handling and detailed results.
Updates multiple notes in a single batch with detailed results.
Finds notes containing any of the search terms, grouped by term, with local filtering.