Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ANKI_CONNECT_URLNoThe URL of the AnkiConnect API. Defaults to http://localhost:8765.http://localhost:8765

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tasks
{
  "list": {},
  "cancel": {},
  "requests": {
    "tools": {
      "call": {}
    },
    "prompts": {
      "get": {}
    },
    "resources": {
      "read": {}
    }
  }
}
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_decks

List all available Anki decks.

create_deck

Create a new deck in Anki.

Args: deck_name: Name of the deck to create. Use '::' for nested decks (e.g., 'Parent::Child')

Returns: The deck ID of the created deck

add_flashcard

Add a new flashcard to Anki.

Args: front: The front/question side of the card (supports HTML/markdown) back: The back/answer side of the card (supports HTML/markdown) deck_name: The deck to add the card to (default: 'Default') tags: Optional list of tags for the card

Returns: The note ID of the created card, or None if duplicate

add_flashcards

Add multiple flashcards to Anki in a single operation.

Args: cards: List of dicts with 'front' and 'back' keys deck_name: The deck to add cards to (default: 'Default') tags: Optional list of tags for all cards

Returns: List of note IDs (None for duplicates)

Example: add_flashcards([ {"front": "What is Python?", "back": "A programming language"}, {"front": "What is FastMCP?", "back": "A Python framework for MCP servers"}, ], deck_name="Programming", tags=["python", "mcp"])

search_cards

Search for cards in Anki using Anki's search syntax.

Args: query: Anki search query (e.g., 'deck:Default', 'tag:python', 'front:async') limit: Maximum number of results to return

Returns: List of cards with their fields and info

Common search operators: - deck:DeckName - cards in a specific deck - tag:tagname - cards with a specific tag - is:due - cards that are due for review - is:new - new cards not yet studied - added:1 - cards added today - front:text - search front field

get_deck_stats

Get statistics for a deck including due cards count.

Args: deck_name: Name of the deck to get stats for

Returns: Dict with new_count, learn_count, review_count

sync_anki

Trigger Anki to sync with AnkiWeb.

This syncs your local Anki collection with the cloud, making cards available on mobile devices.

anki_connection_status

Check if AnkiConnect is responding and get version info.

Returns: Dict with connection status and AnkiConnect version

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hbd/anki-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server