Anki Mcp

io.github.arielbk由 GitHub 帳號 arielbk 發布v0.3.2更新於 Oct 24, 2026

MCP server for integrating with Anki flashcards through conversational AI

概覽

AI 產生的概覽

本機 MCP 伺服器,透過 AnkiConnect 把 AI 助理連到你的 Anki 卡片庫,用來測驗、製作卡片、整理與學習分析。

可以做什麼
  • 建立、更新、刪除與搜尋卡片,支援批次修改與標籤
  • 進行互動測驗、管理卡片排程並找出待複習卡片
  • 建立與整理牌組、在牌組間移動卡片並調整牌組設定
  • 讀取學習統計、複習歷史與記憶保留情形
  • 自訂筆記類型、欄位、範本與卡片樣式
  • 處理同步、媒體檔案、匯入匯出,並取回卡片中的圖片或音訊
適用情境
適合用 Anki 學習、希望助理針對指定牌組或卡片出題測驗、依筆記或文件產生新卡片、批次加標籤或重新整理卡片,或回報學習模式與較弱環節的情境。
執行需求
以 npm 套件形式在桌面本機執行,需要 Node.js 18 以上版本。需安裝並執行 Anki,並裝好 AnkiConnect 外掛(建議 25.2.25.0 或更新版本);預設連線 localhost:8765,可用 ANKI_CONNECT_HOST 與 ANKI_CONNECT_PORT 調整。Anki 需手動啟動。
安裝前請注意
助理可以改動你的卡片庫:建立、更新與刪除卡片,在牌組間移動卡片,批次為數千張卡片加標籤,以及執行同步、匯入與匯出。建議先備份或指向可還原的卡片庫,並在核准批次操作或刪除前逐項確認。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Anki Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🧠 Anki MCP

[NPM Package anki-mcp] [License: MIT]
[Anki MCP server]

Transform your Anki flashcard experience with AI! This MCP (Model Context Protocol) server bridges your Anki flashcard collection with AI assistants like Claude, enabling natural conversations about your study materials.

🚀 What Can You Do?

Imagine having an AI tutor that knows your entire flashcard collection and can:

📚 Interactive Learning

  • "Quiz me on Japanese vocabulary I haven't seen in 3 days"
  • "Test me on challenging cards from my medical deck"
  • "Show me cards I've been struggling with recently"

✨ Smart Content Creation

  • "Create flashcards about photosynthesis with diagrams"
  • "Turn this PDF chapter into spaced repetition cards"
  • "Generate cloze deletion cards from my lecture notes"

🔍 Powerful Analytics

  • "Which topics am I struggling with most?"
  • "Show me my study patterns for the last month"
  • "What's my retention rate for different card types?"

🎯 Bulk Operations

  • "Tag all my chemistry cards with 'exam-prep'"
  • "Move cards with low retention to an intensive review deck"
  • "Find and fix duplicate cards across my decks"

🎯 Features

  • 🎯 Smart Tool Design: Intuitive, high-level tools designed specifically for AI agents
  • 💬 Natural Conversations: Talk to Claude about your flashcards like you would a study buddy
  • ⚡ Lightning Fast: Efficient operations that don't bog down your AI assistant
  • 📦 Bulk Operations: Update thousands of cards at once with simple commands
  • 📊 Study Insights: Deep analytics on your learning progress and patterns
  • 🎨 Rich Media: Full support for images, audio, and other media in your cards
  • 🔍 Powerful Search: Leverage Anki's advanced search syntax through natural language
  • 🔒 Rock Solid: Fully typed TypeScript with comprehensive error handling

🛠 Technical Stack

  • Node.js: Runtime environment (18+ required)
  • TypeScript: Type safety and developer experience
  • MCP SDK: Model Context Protocol implementation
  • yanki-connect: 🙏 Fully-typed, isomorphic AnkiConnect API client
  • tsup: Fast TypeScript bundler
  • PNPM: Efficient package manager

Special thanks to the yanki-connect library for providing the robust AnkiConnect interface that powers this integration!

📋 Prerequisites

1. Install Anki

Download and install Anki if you haven't already.

2. Install AnkiConnect Plugin

  1. Open Anki
  2. Go to Tools → Add-ons
  3. Click Get Add-ons...
  4. Enter code: 2055492159
  5. Restart Anki

📋 Version Requirements: This server requires AnkiConnect version 25.2.25.0 or newer (released 2025-02-25) for full compatibility. Most features work with older versions, but we recommend updating for the best experience.

3. Configure AnkiConnect (Optional)

AnkiConnect works out of the box, but you can customize settings:

  1. Go to Tools → Add-ons
  2. Select AnkiConnect and click Config
  3. Default settings should work fine for most users

🚀 Quick Start

Option 1: Use with Claude Desktop (Recommended)

  1. Install the package

    bash
    npm install -g @arielbk/anki-mcp
  2. Configure Claude Desktop

    Edit your Claude Desktop configuration file:

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

    Add this configuration:

    json
    {  "mcpServers": {    "anki": {      "command": "anki-mcp",      "args": []    }  }}
  3. Restart Claude Desktop

  4. Start using it!

    • Make sure Anki is running with AnkiConnect enabled
    • Ask Claude: "Show me my Anki decks" or "Quiz me with 5 cards"

💡 Pro Tip: You can test your setup by asking Claude simple questions like "How many Anki decks do I have?" or "What's in my largest deck?"

Option 2: Development Setup

  1. Clone the repository

    bash
    git clone https://github.com/arielbk/anki-mcp.gitcd anki-mcp
  2. Install dependencies

    bash
    pnpm install
  3. Build the project

    bash
    pnpm build
  4. Test the server

    bash
    # Use the MCP inspector to test functionalitypnpm inspect

Option 3: Use with Other MCP Clients

This server works with any MCP-compatible client. You can also use it with:

  • MCP Inspector: Interactive debugging tool
  • Cline: VS Code extension for AI coding
  • Custom MCP clients: Build your own using the MCP SDK

For stdio transport, run:

bash
node dist/index.js

For localhost HTTP (Streamable HTTP) transport, run:

bash
node dist/index.js --http --host=127.0.0.1 --port=3000# The MCP endpoint will be at http://127.0.0.1:3000/mcp

Clients that support Streamable HTTP can connect directly. Legacy SSE clients may still work via client-side fallback.

🎮 Usage Examples

Once configured with Claude Desktop, you can have natural conversations like:

📖 Study Sessions

You: "I have a Japanese exam tomorrow. Can you quiz me on Hiragana cards I haven't reviewed in a week?"
Claude: I'll find your Hiragana cards that need review and start a quiz session...

📝 Content Creation

You: "Create flashcards for the major battles of World War II with dates and significance"
Claude: I'll create comprehensive flashcards covering the key WWII battles...

📊 Study Analytics

You: "How am I doing with my medical terminology deck? Show me my weak areas."
Claude: Let me analyze your performance on the medical terminology deck...

🏷️ Organization

You: "Tag all cards about cardiovascular system with 'cardiology' and move them to my MCAT prep deck"
Claude: I'll help you organize those cards...

🔧 Available Tools

The server provides 7 intuitive tools that cover everything you need:

📝 Manage Flashcards

Create, update, delete, and search your flashcards. Perfect for content creation, bulk updates, and organization.

🎯 Study Sessions

Run interactive quiz sessions, manage card scheduling, and track which cards need review.

📚 Manage Decks

Create and organize decks, move cards around, and configure deck settings.

📊 Get Analytics

Dive into your study statistics, review history, and learning patterns.

🎨 Manage Models

Customize note types, add fields, modify templates, and style your cards.

🔧 Anki Operations

Handle sync, media files, imports/exports, and other utility operations.

🖼️ Get Media File

Retrieve media files (images, audio, etc.) from your Anki collection. AI assistants can analyze images directly (though they won't display in the UI).

💡 Pro Tip: Many operations support pagination to prevent overwhelming your context window. Use limit and offset parameters when working with large result sets.

🛠 Development

bash
# Run in development mode with auto-reloadingpnpm dev
# Lint the codepnpm lint
# Format the codepnpm format
# Test with MCP inspectorpnpm inspect

🔧 Configuration

AnkiConnect Settings

The server connects to AnkiConnect on localhost:8765 by default. If you've customized your AnkiConnect configuration, you may need to adjust the connection settings.

Important: Make sure Anki is running and AnkiConnect is installed before using the MCP server. The server will fail to connect if AnkiConnect is not accessible.

💡 Note: The underlying yanki-connect library supports auto-launching Anki on macOS, but this feature is not currently exposed in the MCP server configuration. You'll need to start Anki manually.

Claude Desktop Advanced Configuration

For advanced users, you can pass additional parameters:

json
{  "mcpServers": {    "anki": {      "command": "anki-mcp",      "args": ["--verbose"],      "env": {        "ANKI_CONNECT_HOST": "localhost",        "ANKI_CONNECT_PORT": "8765"      }    }  }}

Troubleshooting

Common Issues:

  • "Failed to connect to AnkiConnect": Ensure Anki is running and AnkiConnect plugin is installed
  • "No decks found": Make sure you have at least one deck in Anki
  • Claude doesn't respond: Restart Claude Desktop after configuration changes
  • Permission errors: Check that the global npm install worked correctly with npm list -g @arielbk/anki-mcp

🤝 Contributing

We welcome contributions! Please:

  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 - see LICENSE file for details.

🙏 Acknowledgments


Transform your flashcard experience with AI-powered conversations! 🚀

來源:README.md,提交 de77ac5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.3.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分