yanki-mcp-server
An MCP server that connects to Anki for card review and creation, featuring automatic date-based organization of new cards.
README
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:currentin Anki
- anki://search/isdue
- Returns cards in review and learning waiting to be studied
- Equivalent of
is:duein Anki
- anki://search/isnew
- Returns all unseen cards
- Equivalent of
is:newin 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 withcardId(number) andease(number) fields
-
add_card
- Creates a new card in a date-structured deck (format:
DECK::YYYY::MM::DD) - Inputs:
front(string): Front of cardback(string): Back of card
- Creates a new card in a date-structured deck (format:
-
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:
DECKis the base deck name (default: "00_Inbox" or configured via environment variable)YYYYis the 4-digit yearMMis the 2-digit monthDDis the 2-digit day
Benefits of Date-Based Organization
- Effortless Organization: Cards are automatically organized by creation date without manual categorization
- Temporal Context: Review cards created during specific time periods (e.g., during a course or project)
- Natural Spaced Repetition: Cards naturally group by when you learned concepts
- Time-Efficient: No need to spend time deciding which category each card belongs to
- 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
logsdirectory with date-based filenames - Ensured clean stdout communication for proper MCP JSON-RPC protocol compliance
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。