{
  "markdown": "# 🧠 Anki MCP\n\n[![NPM Package anki-mcp](https://img.shields.io/npm/v/@arielbk/anki-mcp.svg)](https://npmjs.com/package/@arielbk/anki-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n<br />\n<a href=\"https://glama.ai/mcp/servers/@arielbk/anki-mcp\">\n<img width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/@arielbk/anki-mcp/badge\" alt=\"Anki MCP server\" />\n</a>\n\nTransform your Anki flashcard experience with AI! This [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server bridges your Anki flashcard collection with AI assistants like Claude, enabling natural conversations about your study materials.\n\n## 🚀 What Can You Do?\n\nImagine having an AI tutor that knows your entire flashcard collection and can:\n\n### 📚 **Interactive Learning**\n\n- _\"Quiz me on Japanese vocabulary I haven't seen in 3 days\"_\n- _\"Test me on challenging cards from my medical deck\"_\n- _\"Show me cards I've been struggling with recently\"_\n\n### ✨ **Smart Content Creation**\n\n- _\"Create flashcards about photosynthesis with diagrams\"_\n- _\"Turn this PDF chapter into spaced repetition cards\"_\n- _\"Generate cloze deletion cards from my lecture notes\"_\n\n### 🔍 **Powerful Analytics**\n\n- _\"Which topics am I struggling with most?\"_\n- _\"Show me my study patterns for the last month\"_\n- _\"What's my retention rate for different card types?\"_\n\n### 🎯 **Bulk Operations**\n\n- _\"Tag all my chemistry cards with 'exam-prep'\"_\n- _\"Move cards with low retention to an intensive review deck\"_\n- _\"Find and fix duplicate cards across my decks\"_\n\n## 🎯 Features\n\n- **🎯 Smart Tool Design**: Intuitive, high-level tools designed specifically for AI agents\n- **💬 Natural Conversations**: Talk to Claude about your flashcards like you would a study buddy\n- **⚡ Lightning Fast**: Efficient operations that don't bog down your AI assistant\n- **📦 Bulk Operations**: Update thousands of cards at once with simple commands\n- **📊 Study Insights**: Deep analytics on your learning progress and patterns\n- **🎨 Rich Media**: Full support for images, audio, and other media in your cards\n- **🔍 Powerful Search**: Leverage Anki's advanced search syntax through natural language\n- **🔒 Rock Solid**: Fully typed TypeScript with comprehensive error handling\n\n## 🛠 Technical Stack\n\n- **[Node.js](https://nodejs.org/)**: Runtime environment (18+ required)\n- **[TypeScript](https://www.typescriptlang.org/)**: Type safety and developer experience\n- **[MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk)**: Model Context Protocol implementation\n- **[yanki-connect](https://www.npmjs.com/package/yanki-connect)**: 🙏 _Fully-typed, isomorphic AnkiConnect API client_\n- **[tsup](https://github.com/egoist/tsup)**: Fast TypeScript bundler\n- **[PNPM](https://pnpm.io/)**: Efficient package manager\n\n_Special thanks to the [yanki-connect](https://github.com/kitschpatrol/yanki-connect) library for providing the robust AnkiConnect interface that powers this integration!_\n\n## 📋 Prerequisites\n\n### 1. Install Anki\n\nDownload and install [Anki](https://apps.ankiweb.net/) if you haven't already.\n\n### 2. Install AnkiConnect Plugin\n\n1. Open Anki\n2. Go to **Tools** → **Add-ons**\n3. Click **Get Add-ons...**\n4. Enter code: `2055492159`\n5. Restart Anki\n\n> **📋 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.\n\n### 3. Configure AnkiConnect (Optional)\n\nAnkiConnect works out of the box, but you can customize settings:\n\n1. Go to **Tools** → **Add-ons**\n2. Select **AnkiConnect** and click **Config**\n3. Default settings should work fine for most users\n\n## 🚀 Quick Start\n\n### Option 1: Use with Claude Desktop (Recommended)\n\n1. **Install the package**\n\n   ```bash\n   npm install -g @arielbk/anki-mcp\n   ```\n\n2. **Configure Claude Desktop**\n\n   Edit your Claude Desktop configuration file:\n\n   **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n   **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n   Add this configuration:\n\n   ```json\n   {\n     \"mcpServers\": {\n       \"anki\": {\n         \"command\": \"anki-mcp\",\n         \"args\": []\n       }\n     }\n   }\n   ```\n\n3. **Restart Claude Desktop**\n\n4. **Start using it!**\n   - Make sure Anki is running with AnkiConnect enabled\n   - Ask Claude: _\"Show me my Anki decks\"_ or _\"Quiz me with 5 cards\"_\n\n> **💡 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?\"_\n\n### Option 2: Development Setup\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/arielbk/anki-mcp.git\n   cd anki-mcp\n   ```\n\n2. **Install dependencies**\n\n   ```bash\n   pnpm install\n   ```\n\n3. **Build the project**\n\n   ```bash\n   pnpm build\n   ```\n\n4. **Test the server**\n   ```bash\n   # Use the MCP inspector to test functionality\n   pnpm inspect\n   ```\n\n### Option 3: Use with Other MCP Clients\n\nThis server works with any MCP-compatible client. You can also use it with:\n\n- **[MCP Inspector](https://github.com/modelcontextprotocol/inspector)**: Interactive debugging tool\n- **[Cline](https://github.com/clinebot/cline)**: VS Code extension for AI coding\n- **Custom MCP clients**: Build your own using the [MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk)\n\nFor stdio transport, run:\n\n```bash\nnode dist/index.js\n```\n\nFor localhost HTTP (Streamable HTTP) transport, run:\n\n```bash\nnode dist/index.js --http --host=127.0.0.1 --port=3000\n# The MCP endpoint will be at http://127.0.0.1:3000/mcp\n```\n\nClients that support Streamable HTTP can connect directly. Legacy SSE clients may still work via client-side fallback.\n\n## 🎮 Usage Examples\n\nOnce configured with Claude Desktop, you can have natural conversations like:\n\n### 📖 Study Sessions\n\n```\nYou: \"I have a Japanese exam tomorrow. Can you quiz me on Hiragana cards I haven't reviewed in a week?\"\n\nClaude: I'll find your Hiragana cards that need review and start a quiz session...\n```\n\n### 📝 Content Creation\n\n```\nYou: \"Create flashcards for the major battles of World War II with dates and significance\"\n\nClaude: I'll create comprehensive flashcards covering the key WWII battles...\n```\n\n### 📊 Study Analytics\n\n```\nYou: \"How am I doing with my medical terminology deck? Show me my weak areas.\"\n\nClaude: Let me analyze your performance on the medical terminology deck...\n```\n\n### 🏷️ Organization\n\n```\nYou: \"Tag all cards about cardiovascular system with 'cardiology' and move them to my MCAT prep deck\"\n\nClaude: I'll help you organize those cards...\n```\n\n## 🔧 Available Tools\n\nThe server provides **7 intuitive tools** that cover everything you need:\n\n### 📝 **Manage Flashcards**\nCreate, update, delete, and search your flashcards. Perfect for content creation, bulk updates, and organization.\n\n### 🎯 **Study Sessions**\nRun interactive quiz sessions, manage card scheduling, and track which cards need review.\n\n### 📚 **Manage Decks**\nCreate and organize decks, move cards around, and configure deck settings.\n\n### 📊 **Get Analytics**\nDive into your study statistics, review history, and learning patterns.\n\n### 🎨 **Manage Models**\nCustomize note types, add fields, modify templates, and style your cards.\n\n### 🔧 **Anki Operations**\nHandle sync, media files, imports/exports, and other utility operations.\n\n### 🖼️ **Get Media File**\nRetrieve media files (images, audio, etc.) from your Anki collection. AI assistants can analyze images directly (though they won't display in the UI).\n\n> **💡 Pro Tip:** Many operations support pagination to prevent overwhelming your context window. Use `limit` and `offset` parameters when working with large result sets.\n\n## 🛠 Development\n\n```bash\n# Run in development mode with auto-reloading\npnpm dev\n\n# Lint the code\npnpm lint\n\n# Format the code\npnpm format\n\n# Test with MCP inspector\npnpm inspect\n```\n\n## 🔧 Configuration\n\n### AnkiConnect Settings\n\nThe server connects to AnkiConnect on `localhost:8765` by default. If you've customized your AnkiConnect configuration, you may need to adjust the connection settings.\n\n**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.\n\n> **💡 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.\n\n### Claude Desktop Advanced Configuration\n\nFor advanced users, you can pass additional parameters:\n\n```json\n{\n  \"mcpServers\": {\n    \"anki\": {\n      \"command\": \"anki-mcp\",\n      \"args\": [\"--verbose\"],\n      \"env\": {\n        \"ANKI_CONNECT_HOST\": \"localhost\",\n        \"ANKI_CONNECT_PORT\": \"8765\"\n      }\n    }\n  }\n}\n```\n\n### Troubleshooting\n\n**Common Issues:**\n\n- **\"Failed to connect to AnkiConnect\"**: Ensure Anki is running and AnkiConnect plugin is installed\n- **\"No decks found\"**: Make sure you have at least one deck in Anki\n- **Claude doesn't respond**: Restart Claude Desktop after configuration changes\n- **Permission errors**: Check that the global npm install worked correctly with `npm list -g @arielbk/anki-mcp`\n\n## 🤝 Contributing\n\nWe welcome contributions! Please:\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## 📜 License\n\nMIT - see [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- **[yanki-connect](https://github.com/kitschpatrol/yanki-connect)** - Excellent TypeScript client for AnkiConnect\n- **[AnkiConnect](https://github.com/FooSoft/anki-connect)** - The plugin that makes Anki automation possible\n- **[Model Context Protocol](https://modelcontextprotocol.io)** - Enabling seamless AI integrations\n\n---\n\n_Transform your flashcard experience with AI-powered conversations! 🚀_\n",
  "bytes": 9951,
  "sha": "e9146513fb6c57c99bab4747f7cf6b7de48149436fc8988d0a624ad3e7b2c9a1",
  "repo_slug": "arielbk/anki-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_arielbk_anki_mcp_91655921/readme"
}