home / mcp / genanki mcp server

Genanki MCP Server

Automated Anki deck generation service built with genanki and the Model Context Protocol (MCP). Focuses on dependable deck creation, strict media sandboxing, and keeping the workflow lean—nothing more.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "epiphany-0312-genanki-mcp": {
      "url": "http://0.0.0.0:<PORT>/anki",
      "headers": {
        "PORT": "10099",
        "SREVERIP": "127.0.0.1"
      }
    }
  }
}

This MCP server provides a fast, HTTP-based tool for generating and delivering Anki decks via the Model Context Protocol. It focuses on dependable deck creation, safe media handling, and a lean workflow you can integrate with any MCP-capable client.

How to use

Connect your MCP client to the server's endpoint and start creating decks through the MCP protocol. The server exposes an HTTP tool at a predictable path and serves temporary .apkg exports for easy retrieval. Use the HTTP endpoint to list, request, and fetch generated decks, and rely on the media sandbox to keep assets isolated and safe.

How to install

Prerequisites you need before you start:

  • Python 3.13 or newer
  • A runtime tool to manage processes (recommended: UVicorn/uvx)
  • Internet access to install dependencies
git clone https://github.com/Epiphany-0312/genanki-mcp.git
cd genanki-mcp
# With uvx (recommended)
uv sync

# Or with pip
python -m venv .venv
. .venv\Scripts\activate  # PowerShell
pip install -r requirements.txt

Configure environment variables for runtime behavior. Create a file named .env beside the code and populate it with your settings. A typical setup includes the port, public IP for download links, and an optional access token.

PORT=10099
SREVERIP=127.0.0.1
TOKEN=

Run the service using one of the supported start commands. Choose the method that matches your preference for local development or production deployment.

uv run python -m server.anki_server
# or
python -m server.anki_server

Additional notes

- FastMCP endpoint for deck operations is available at the default HTTP path. By default, the MCP endpoint is accessible at http://0.0.0.0:PORT/anki and downloads at http://0.0.0.0:PORT/downloads, where PORT is your configured port.

- The tool supports temporary download links with a default expiry of 600 seconds for .apkg files.