Anki Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Anki Mcp Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
An MCP (Model Context Protocol) server for Claude Desktop that connects to Anki via AnkiConnect and retrieves leech-tagged cards.
git clone https://github.com/yourusername/anki-mcp-server.git
cd anki-mcp-server npm install npm run buildThe server can be configured using environment variables. Copy the provided example file to create your own configuration:
cp .env.example .envThen edit the .env file to customize your settings:
| Environment Variable | Description | Default Value |
|---|---|---|
ANKI_CONNECT_URL | The URL of the Anki Connect API | http://localhost:8765 |
ANKI_CONNECT_VERSION | The version of the Anki Connect API to use | 6 |
ANKI_MOCK_MODE | Enable mock mode for testing (true/false) | false |
If the environment variables are not set, the server will use the default values.
If connecting to localhost doesn't work, you'll need to use your computer's local IP address instead. Configure your .env file with:
ANKI_CONNECT_URL=http://YOUR_LOCAL_IP:8765To find your local IP address:
ifconfig or ipconfig getifaddr en0 (for WiFi)ipconfigip addr show or hostname -ILook for IPv4 addresses like 192.168.x.x or 10.x.x.x in the output.
For testing, a separate configuration file .env.test is provided:
cp .env.example .env.testEdit .env.test to set test-specific values:
ANKI_CONNECT_URL=http://localhost:8765
ANKI_CONNECT_VERSION=6
ANKI_MOCK_MODE=trueTo run in test mode:
npm run start:test npm startTo use this MCP server with Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonmcpServers section:{
"mcpServers": {
"anki": {
"command": "node",
"args": ["path/to/anki-mcp-server/dist/index.js"]
}
}
}Replace "path/to/anki-mcp-server" with the actual path to where you cloned this repository.
Once configured, you can use the following tools in Claude:
Could you analyze my Anki leech cards and suggest ways to improve my study?Claude will use the MCP server to retrieve your leech cards and analyze them.
Retrieves cards tagged as leeches from Anki.
Parameters:
detailed (optional, boolean, default: true): Whether to return comprehensive card data or just IDscount (optional, number): Number of random cards to return (defaults to all cards)Adds a date-stamped "reviewed" tag to specified cards. This allows you to track which cards you've reviewed with Claude.
Parameters:
card_ids (required, array of numbers): Array of card IDs to tag as reviewedcustom_tag_prefix (optional, string, default: "見直し"): Custom prefix for the tagThe tag will be in the format 見直し::YYYYMMDD (or your custom prefix if specified).
Example usage in Claude:
I've reviewed these cards, please tag them as reviewed: [1234567890, 1234567891]localhost:.env file to use ANKI_CONNECT_URL=http://YOUR_LOCAL_IP:8765tag_reviewed_cards toolFor testing without affecting actual Anki data, you can use the mock mode:
ANKI_MOCK_MODE=true in your .env file or use the provided .env.test filenpm run start:testIn mock mode, the server will simulate all Anki operations without actually connecting to Anki. This is useful for testing Claude integrations without risking data changes.
To run the server in development mode with hot reloading:
npm run devFor development with mock mode enabled:
npm run dev:testMIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.