Sponsored by Deepsite.site

Yanki MCP Server ( Yet Another Anki MCP Server )

Created By
htlin2226 months ago
An MCP server implementation that connects to a locally running Anki, providing card review and creation. This is a fork of [scorzeth/anki-mcp-server](
Content

Yanki MCP Server ( Yet Another Anki MCP Server )

A Model Context Protocol server implementation that connects to a locally running Anki, providing card review and creation. This is a fork of scorzeth/anki-mcp-server with date-based organization features.

Available as an npm package: yanki-mcp-server

This server is designed to work with the Anki desktop app and the Anki-Connect add-on.

Make sure you have the add-on installed before using.

Resources

  • anki://search/deckcurrent
    • Returns all cards from current deck
    • Equivalent of deck:current in Anki
  • anki://search/isdue
    • Returns cards in review and learning waiting to be studied
    • Equivalent of is:due in Anki
  • anki://search/isnew
    • Returns all unseen cards
    • Equivalent of is:new in Anki

Tools

  • update_cards

    • Marks cards with given card IDs as answered and gives them an ease score between 1 (Again) and 4 (Easy)
    • Inputs:
      • answers (array): Array of objects with cardId (number) and ease (number) fields
  • add_card

    • Creates a new card in a date-structured deck (format: DECK::YYYY::MM::DD)
    • Inputs:
      • front (string): Front of card
      • back (string): Back of card
  • get_due_cards

    • Returns n number of cards currently due for review
    • Inputs:
      • num (number): Number of cards
  • get_new_cards

    • Returns n number of cards from new
    • Inputs:
      • num (number): Number of cards

Installation & Usage

You can use this package without installation via npx:

npx yanki-mcp-server

Or install it globally:

npm install -g yanki-mcp-server
yanki-server

Development

Clone the repository and install dependencies:

git clone https://github.com/htlin222/yanki-mcp-server.git
cd yanki-mcp-server
npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Run the server directly during development:

npm run dev

Configuration

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "yanki-mcp-server": {
      "command": "npx",
      "args": ["yanki-mcp-server"],
      "env": {
        "DECK": "Default"
      }
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Date-Based Card Organization

This server automatically organizes new cards using a date-based structure instead of traditional topic-based organization. When you create a new card, it's added to a deck with the following format:

DECK::YYYY::MM::DD

Where:

  • DECK is the base deck name (default: "00_Inbox" or configured via environment variable)
  • YYYY is the 4-digit year
  • MM is the 2-digit month
  • DD is the 2-digit day

Benefits of Date-Based Organization

  1. Effortless Organization: Cards are automatically organized by creation date without manual categorization
  2. Temporal Context: Review cards created during specific time periods (e.g., during a course or project)
  3. Natural Spaced Repetition: Cards naturally group by when you learned concepts
  4. Time-Efficient: No need to spend time deciding which category each card belongs to
  5. Historical Record: See your learning journey over time

Configuration

You can customize the base deck name by setting the DECK environment variable in your MCP server configuration:

"env": {
  "DECK": "YourCustomDeckName"
}

If not specified, it defaults to "00_Inbox".

Changelog

1.0.5 (2025-05-31)

  • Completely removed all console output and logging functionality
  • Simplified codebase by eliminating all non-essential output
  • Ensured 100% clean MCP protocol communication with no extraneous output
  • Removed all filesystem operations related to logging

1.0.4 (2025-05-31)

  • Fixed critical issue with logs directory path being created at filesystem root
  • Improved logging system with robust error handling and fallback mechanisms
  • Ensured logs are always created relative to the current working directory
  • Added silent failure for logging to prevent breaking MCP protocol if logging fails

1.0.3 (2025-05-31)

  • Fixed MCP communication protocol issue by redirecting all console output to log files
  • Added file-based logging system that preserves all debug and status information
  • Logs are stored in the logs directory with date-based filenames
  • Ensured clean stdout communication for proper MCP JSON-RPC protocol compliance
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
ChatWiseThe second fastest AI chatbot™
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Serper MCP ServerA Serper MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.