anki-mcp
Provides tools for managing Anki flashcards, including deck management, card operations, model/note types, tags, media files, sync with AnkiWeb, import/export of .apkg packages, and review stats.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@anki-mcpcreate a deck called 'Spanish Vocabulary'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Anki MCP Server
A headless MCP server for Anki flashcards with Google OAuth authentication, deployed on Fly.io.
Features
Deck Management — Create, list, and delete decks
Card Operations — Add, update, query, suspend/unsuspend cards
Model/Note Types — Manage note types, field configs, templates
Tag Operations — Bulk add/remove tags
Media Files — Store, retrieve, and delete media
AnkiWeb Sync — Full collection + media sync
Import/Export — Import and export
.apkgpackagesReview Stats — Query due cards, intervals, scheduling info
Google OAuth — Secure authentication with email allowlist
Related MCP server: TalkToAnki
Quick Start
Prerequisites
Python 3.10+
An AnkiWeb account (for sync)
Google OAuth credentials
Install
cd anki-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e .Configure Environment Variables
# Google OAuth (required)
export GOOGLE_CLIENT_ID="your-google-client-id.apps.googleusercontent.com"
export GOOGLE_CLIENT_SECRET="your-google-client-secret"
# Allowed users (comma-separated emails)
export ANKI_MCP_ALLOWED_EMAILS="user1@gmail.com,user2@gmail.com"
# AnkiWeb (optional, for sync)
export ANKIWEB_USERNAME="your@email.com"
export ANKIWEB_PASSWORD="your-password"
# Server config
export PORT=8000
export ANKI_MCP_BASE_URL="https://your-domain.com"Run
anki-mcpThe server starts on port 8000 with:
MCP endpoint at
/mcp(streamable-http transport)Health check at
/health
Authentication
The server uses Google OAuth via FastMCP. Only users whose emails are listed in ANKI_MCP_ALLOWED_EMAILS can access the server.
Google OAuth Setup
Create a Google Cloud project with an OAuth 2.0 Client ID
Add the redirect URI:
https://your-app.fly.dev/auth/callbackEnable the Google+ API (for userinfo access)
Set the required scopes:
openid,email
Deploy to Fly.io
# Create the app (first time)
fly apps create anki-mcp
# Set secrets
fly secrets set GOOGLE_CLIENT_ID="..."
fly secrets set GOOGLE_CLIENT_SECRET="..."
fly secrets set ANKI_MCP_ALLOWED_EMAILS="zephell@gmail.com,my.buddy.assistant@gmail.com"
fly secrets set ANKIWEB_USERNAME="..."
fly secrets set ANKIWEB_PASSWORD="..."
# Deploy
fly deployAvailable MCP Tools
Category | Tools |
Decks |
|
Models |
|
Notes |
|
Cards |
|
Tags |
|
Media |
|
Sync |
|
Import/Export |
|
Utility |
|
Architecture
MCP Client → /mcp (streamable-http) → Google OAuth → Anki Tools → Anki Collection
↓
Email Allowlist
↓
anki Python package → collection.anki2Development
# Run tests
source .venv/bin/activate
pytest
# Lint
ruff check src/ tests/License
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
- Alicense-qualityAmaintenanceAn MCP server that enables AI assistants to interact with the Anki flashcard application for studying, deck management, and note creation. It supports natural language interaction for reviewing cards, searching content, and managing media files across local and remote environments.695434MIT
- Alicense-qualityDmaintenanceAn MCP server that enables AI assistants to seamlessly manage Anki flashcards, decks, and templates through the AnkiConnect API. It supports intelligent querying, batch note creation, and detailed study progress analysis using natural language.4MIT
- AlicenseAqualityDmaintenanceAn MCP server that connects to Anki for card review and creation, featuring automatic date-based organization of new cards.4141MIT
- Alicense-qualityBmaintenanceSelf-hosted MCP server connecting AI assistants like Claude to Anki for AI-assisted flashcard generation and sync. It supports multi-tenant, authenticated operations to add, search, and analyze cards in real Anki collections.AGPL 3.0
Related MCP Connectors
MCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth2
Official remote MCP server for Archivist AI TTRPG campaign memory: characters, sessions, and more.
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
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/mybuddyassistant/anki-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server