anki-mcp
anki-mcp
AIアシスタント(Claude Code、Hermes Agentなど)がAnkiConnectを介してAnkiカードを直接作成・管理できるようにする、軽量な**Model Context Protocol(MCP)**アダプターです。
独自のAIアプリは不要です。AIがインテリジェンス層を担い、このサーバーはAnkiへのブリッジにすぎません。
Claude Code / Hermes / ChatGPT
│ MCP (stdio)
▼
anki-mcp server
│ AnkiConnect HTTP (localhost:8765)
▼
Anki Desktop + AnkiConnect add-on
│ sync
▼
AnkiWeb ──► Anki mobile (iOS/Android)機能
ツール | 説明 |
| カード数付きで全デッキを一覧表示 |
| 存在しない場合にデッキを作成 |
| 基本的な表面/裏面カード |
| 穴埋め(クローズ)カード( |
| 多数のカードを一括作成 |
| 全文検索(Ankiクエリ構文) |
| ノートIDでカードの表面/裏面を更新 |
| ノートIDでカードを削除 |
Related MCP server: Anki MCP Server
セットアップ
1. Anki Desktopをインストール
https://apps.ankiweb.net/ からダウンロードしてインストールします。一度起動し、AnkiWebアカウントと同期してモバイル同期が機能するようにします。
2. AnkiConnectアドオンをインストール
AnkiConnectは、Ankiをlocalhost:8765のローカルHTTP APIとして公開します。
オプションA — Ankiアドオンブラウザ(最も簡単):
Ankiで: ツール → アドオン → アドオンを取得…
コード
2055492159を入力してインストール。
オプションB — 手動(Git):
cd "$APPDATA/Anki2/addons21" # Windows
# or: ~/.local/share/Anki2/addons21 (Linux)
# or: ~/Library/Application Support/Anki2/addons21 (macOS)
git clone --depth 1 https://github.com/FooSoft/anki-connect.git 2055492159
cd 2055492159
cp plugin/*.py plugin/*.json plugin/*.md .
rm -rf plugin tests .git 2>/dev/nullAnkiを再起動します。起動していることを確認:
curl -s http://127.0.0.1:8765 -X POST -d '{"action":"version","version":6}'
# → {"result": 6, "error": null}3. MCPサーバーを実行
pip install mcp
python server.pyサーバーはstdio経由でMCPを話します。ツールが機能するには、Anki Desktopが(AnkiConnectを読み込んだ状態で)実行されている必要があります。
クライアントでの設定
Hermes Agent
~/.hermes/config.yaml(Windowsでは%USERPROFILE%\AppData\Local\hermes\config.yaml)に追加:
mcp_servers:
anki:
command: python
args:
- /absolute/path/to/server.py
timeout: 60
connect_timeout: 30その後、セッション内でMCPを再読み込み(/reload-mcp)するか、再起動します。ツールはmcp_anki_*として表示されます。
Claude Code
claude mcp add anki -- python /absolute/path/to/server.py使い方
接続が完了したら、AIにやりたいことを伝えるだけです:
「System Designデッキにカードを追加して: 表面 = 『一貫性ハッシュが仮想ノードを使うのはなぜ?』、裏面 = 『キーをより均一に分散するため。』」
「さっき話した重要な概念からAnkiカードを作って。」
カード生成ルール(AIの指示にこれらを入れてください)
1枚のカードにつき1つの概念。
想起を必要とする質問を優先。
長すぎる回答は避ける。
些細な事実のカードは作成しない。
適切な場合は穴埋め(クローズ)カードを使用。
ソース/トピックのタグを追加。
モバイルへの同期
MCPで作成されたカードは、同期するまでAnki Desktopに保存されます。同期を実行:
手動: Anki → 同期(または
Yキーを押す)、またはAnkiConnect経由:
curl -s http://127.0.0.1:8765 -X POST -d '{"action":"sync","version":6}'
その後、Ankiモバイルアプリを同期して新しいカードを取得します。
要件
Python 3.10以上
mcpパッケージ(pip install mcp)Anki Desktop(実行中)
AnkiConnectアドオン
ライセンス
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants like Claude to interact with Anki flashcard decks through AnkiConnect. Supports creating and managing decks, basic and cloze deletion cards, searching existing cards, and organizing content with tags.
- AlicenseNot gradedqualityCmaintenanceEnables interaction with the Anki desktop flashcard application through the Anki-Connect plugin. Supports managing decks, cards, notes, and models, allowing AI assistants to create and query flashcards through natural language.101ISC
- AlicenseAqualityDmaintenanceEnables AI assistants to manage Anki flashcard collections by creating, searching, and updating cards through a standardized interface. It supports media handling, batch operations, and review scheduling via the AnkiConnect add-on.62MIT
- AlicenseAqualityDmaintenanceEnables AI tools to manage Anki flashcards, including deck management, card search, creation, editing, deletion, and statistics.10353Apache 2.0
Related MCP Connectors
AI-powered YouTube to flashcards with spaced repetition and Anki export
Free: turn your AI chats into spaced-repetition vocabulary. 13 tools, reads and writes.
Voice-led, FSRS-scheduled flashcards from YouTube, PDFs, web, or text. Auto-graded quizzes.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Looseling/anki-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server