1. Conduid
  2. Developer Tools
  3. Anki MCP
MCP server · Developer Tools

Anki MCP

Anki MCP Server

Unclaimed MIT last commit a year ago devtools
49Fair

Scored 4 months ago · breakdown

About Anki MCP

Anki MCP is an MCP server published by ezynda3 in the Developer Tools category: anki MCP Server. It has been installed 0 times through Conduid.

The repository has 1 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx anki-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Anki MCP

Powered by Claude · Grounded in docs

I know everything about Anki MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

Anki MCP Server

A Model Context Protocol (MCP) server that provides tools for managing Anki flashcards through AnkiConnect. This server allows AI assistants to create, search, and manage Anki cards and decks programmatically.

Features

  • Card Management: Create new flashcards with front/back content
  • Deck Operations: List, create, and manage Anki decks
  • Search Functionality: Search cards using Anki's powerful search syntax
  • Media Support: Add images and audio files to cards
  • Model Support: Work with different note types/models
  • Sync Integration: Trigger AnkiWeb synchronization
  • Configurable: Customizable AnkiConnect URL

Prerequisites

  1. Anki Desktop: Install Anki desktop application
  2. AnkiConnect: Install the AnkiConnect addon in Anki
  3. Go: Go 1.21 or later for building from source

Installation

From Source

git clone https://github.com/ezynda3/anki-mcp.git
cd anki-mcp
go build -o anki-mcp .

Using Go Install

go install github.com/ezynda3/anki-mcp@latest

Configuration

The server can be configured using environment variables:

  • ANKI_CONNECT_URL: AnkiConnect server URL (default: http://localhost:8765)

Usage

With Claude Desktop

Add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "anki": {
      "command": "/path/to/anki-mcp",
      "env": {
        "ANKI_CONNECT_URL": "http://localhost:8765"
      }
    }
  }
}

With MCP Inspector

For development and testing:

# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector

# Run with inspector
mcp-inspector /path/to/anki-mcp

Direct Usage

# Start the server
./anki-mcp

# The server communicates via stdio using the MCP protocol

Available Tools

ping

Check if AnkiConnect is available and responding.

Parameters: None

Example:

Use the ping tool to check if Anki is running.

list_decks

List all available Anki decks.

Parameters: None

Example:

Show me all my Anki decks.

create_deck

Create a new Anki deck.

Parameters:

  • deck_name (required): Name of the deck to create

Example:

Create a new deck called "Spanish Vocabulary".

create_card

Create a new flashcard in a specified deck.

Parameters:

  • deck_name (required): Name of the deck to add the card to
  • front (required): Front side content of the card
  • back (required): Back side content of the card
  • model_name (optional): Note type to use (default: "Basic")
  • tags (optional): Array of tags to add to the card

Example:

Create a card in my "Spanish Vocabulary" deck with front "Hola" and back "Hello" with tags "greetings" and "basic".

search_cards

Search for cards using Anki's search syntax.

Parameters:

  • query (required): Search query using Anki search syntax
  • limit (optional): Maximum number of results to return (default: 10)

Examples:

Search for cards in the "Spanish Vocabulary" deck.
Find cards tagged with "difficult".
Search for cards containing "hello" in any field.

Search Syntax Examples:

  • deck:"Spanish Vocabulary" - Cards in a specific deck
  • tag:difficult - Cards with a specific tag
  • front:hello - Cards with "hello" in the front field
  • is:due - Cards that are due for review
  • added:1 - Cards added in the last day

add_media

Add a media file to Anki's media collection.

Parameters:

  • filename (required): Name of the media file
  • data (required): Base64 encoded media file data

Example:

Add an audio file "pronunciation.mp3" to Anki's media collection.

create_card_with_media

Create a new flashcard with media attachments.

Parameters:

  • deck_name (required): Name of the deck to add the card to
  • front (required): Front side content of the card
  • back (required): Back side content of the card
  • model_name (optional): Note type to use (default: "Basic")
  • tags (optional): Array of tags to add to the card
  • audio_filename (optional): Audio filename to attach
  • audio_data (optional): Base64 encoded audio data
  • image_filename (optional): Image filename to attach
  • image_data (optional): Base64 encoded image data

Example:

Create a card with an image showing a Spanish flag and audio pronunciation.

get_models

Get all available note types/models in Anki.

Parameters: None

Example:

Show me all available note types in Anki.

get_model_fields

Get field names for a specific note type/model.

Parameters:

  • model_name (required): Name of the model to get fields for

Example:

What fields are available for the "Cloze" note type?

sync

Trigger Anki to sync with AnkiWeb.

Parameters: None

Example:

Sync my Anki collection with AnkiWeb.

Error Handling

The server provides detailed error messages for common issues:

  • AnkiConnect not available: Ensure Anki is running and AnkiConnect addon is installed
  • Deck not found: Check deck name spelling and existence
  • Invalid parameters: Verify required parameters are provided
  • Media encoding errors: Ensure media data is properly base64 encoded

Development

Building

go build -v .

Testing

go test -v ./...

Code Structure

  • main.go: MCP server implementation and tool handlers
  • ankiconnect.go: AnkiConnect client wrapper
  • go.mod: Go module dependencies

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Acknowledgments

Troubleshooting

Common Issues

"AnkiConnect is not available"

  • Ensure Anki desktop is running
  • Verify AnkiConnect addon is installed and enabled
  • Check that AnkiConnect is listening on the correct port (default: 8765)

"Failed to create deck/card"

  • Verify deck names don't contain invalid characters
  • Check that required fields are provided
  • Ensure AnkiConnect permissions allow the operation

Media files not working

  • Verify media data is properly base64 encoded
  • Check file extensions are supported by Anki
  • Ensure media files aren't too large

Debug Mode

Set environment variable for verbose logging:

export MCP_DEBUG=1
./anki-mcp

API Reference

For detailed information about the Model Context Protocol, see:

For AnkiConnect API details, see:

README mirrored from the source repository 4 months ago. The original is authoritative.

Questions

About Anki MCP

How do I install Anki MCP?

Run npx anki-mcp, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Anki MCP safe to use with an AI agent?

Its trust score is 49 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Anki MCP still maintained?

The last commit was a year ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.