
amidvidy/anki-mcp
Data science & MLこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
Anki 用の MCP サーバー, ほとんどは claude コードで vibecoded.
概要
モデルコンテキストプロトコル(MCP)を介してAnkiと相互作用するためのFastMCPサーバー。 このサーバーは、AIを搭載した音声生成、バルク操作、および意味のある類似性検索などの高度な機能を備えた、Ankiデッキ、ノート、ノート型を管理するための包括的なツールを提供しています。 このプロジェクトは、複数の外部APIと連携し、機能強化を実現します。 - : Googleのチルプボイスを使用してテキストから高品質のオーディオ生成 - : フラッシュカード用の発音オーディオファイルを生成します - : 自然発音のHD品質ボイス、特に中国語で優れています - : GOOGLE CLOUD API KEY環境変数が必要です - : Ankiデスクトップアプリケーションとインターフェイス - : 全Anki操作(create/read/updateのメモ、デッキの管理など) - : HTTP APIを介して完全なAnki機能 - : AnkiConnectアドオンをインストールし、Ankiを実行する必要があります 2.
概要(AI 翻訳)
モデルコンテキストプロトコル(MCP)を介してAnkiと相互作用するためのFastMCPサーバー。 このサーバーは、AIを搭載した音声生成、バルク操作、および意味のある類似性検索などの高度な機能を備えた、Ankiデッキ、ノート、ノート型を管理するための包括的なツールを提供しています。
外部 API を使用
このプロジェクトは、複数の外部APIと連携し、機能強化を実現します。
Google Cloud テキストからスピーナ API
-Purpose:Googleのチルプボイスを使用してテキストから高品質のオーディオ生成
- ユースケース:フラッシュカード用の発音オーディオファイルを生成
- 特徴: 自然な発音の HD の質の声、特に中国のために優秀
-Setup:
GOOGLE_CLOUD_API_KEY環境変数を要求します
AnkiConnect API (ローカル)
-Purpose:Ankiデスクトップアプリケーションとインターフェイス -ユースケース:すべてのAnki操作(作成/読み込み/更新ノート、デッキの管理など)
- 機能:HTTP APIによる完全なAnki機能 -Setup:AnkiConnectアドオンをインストールし、Ankiを実行する必要があります
セットアップ
1。 uvを使用して依存関係をインストールします。
- AnkiConnectアドオンがインストールされていることを確認してください
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Anki MCP Server
A FastMCP server for interacting with Anki through the Model Context Protocol (MCP). This server provides comprehensive tools for managing Anki decks, notes, and note types, with advanced features including AI-powered audio generation, bulk operations, and semantic similarity search.
External APIs Used
This project integrates with several external APIs to provide enhanced functionality:
Google Cloud Text-to-Speech API
- Purpose: High-quality audio generation from text using Google’s Chirp voices
- Use Case: Generate pronunciation audio files for flashcards
- Features: HD quality voices with natural pronunciation, especially excellent for Chinese
- Setup: Requires
GOOGLE_CLOUD_API_KEYenvironment variable
AnkiConnect API (Local)
- Purpose: Interface with Anki desktop application
- Use Case: All Anki operations (create/read/update notes, manage decks, etc.)
- Features: Complete Anki functionality via HTTP API
- Setup: AnkiConnect add-on must be installed and Anki must be running
Setup
-
Install dependencies using uv:
uv sync -
Make sure Anki is running with the AnkiConnect add-on installed:
- In Anki, go to Tools > Add-ons > Get Add-ons
- Enter code:
2055492159 - Restart Anki
-
(Optional) Set up API key for audio generation:
# For audio generation with Google Cloud TTS export GOOGLE_CLOUD_API_KEY='your-google-cloud-api-key-here' -
Run the server:
uv run server.py
Claude Desktop Integration
To use this MCP server with Claude Desktop, add the following configuration to your claude_desktop_config.json file:
Configuration Location
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration Example
{
"mcpServers": {
"anki-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/anki-mcp/",
"run",
"server.py"
],
"env": {
"GOOGLE_CLOUD_API_KEY": "your-google-cloud-api-key-here"
}
}
}
}
Setup Steps
- Ensure dependencies are installed: Make sure you’ve run
uv syncin your anki-mcp directory - Find your config file at the location above (create it if it doesn’t exist)
- Update the path: Replace
/path/to/your/anki-mcp/with the actual path to your anki-mcp directory - Add your API key:
- Replace
your-google-cloud-api-key-herewith your actual Google Cloud API key (for audio generation)
- Replace
- Restart Claude Desktop for the changes to take effect
Important Notes
- Make sure Anki is running with the AnkiConnect add-on before using the tools
- The
uvcommand will automatically handle the Python environment and dependencies - Make sure
uvis installed on your system (curl -LsSf https://astral.sh/uv/install.sh | sh)
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"anki-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/anki-mcp/",
"run",
"server.py"
],
"env": {
"GOOGLE_CLOUD_API_KEY": "your-google-cloud-api-key-here"
}
}
}
}