Anki MCP Server
Anki MCP 서버
AnkiConnect를 통해 Anki에 연결하고 리치 태그가 지정된 카드를 검색하는 Claude Desktop용 MCP(Model Context Protocol) 서버입니다.
특징
AnkiConnect API를 통해 Anki에 연결
"거머리" 태그가 있는 카드를 검색합니다.
카드에 날짜가 찍힌 리뷰 태그를 추가합니다.
Claude가 분석할 수 있는 포괄적인 카드 데이터를 제공합니다.
Claude Desktop과 함께 사용 가능
Related MCP server: Anki MCP
필수 조건
Anki 설치 및 실행
Anki에 AnkiConnect 애드온 설치
Node.js와 npm
설치
이 저장소를 복제하세요:
지엑스피1
종속성 설치:
npm install프로젝트를 빌드하세요:
npm run build
구성
환경 변수를 사용하여 서버를 구성할 수 있습니다. 제공된 예제 파일을 복사하여 직접 구성을 생성하세요.
cp .env.example .env그런 다음 .env 파일을 편집하여 설정을 사용자 정의합니다.
환경 변수 | 설명 | 기본값 |
| Anki Connect API의 URL |
|
| 사용할 Anki Connect API 버전 |
|
| 테스트를 위해 모의 모드 활성화(참/거짓) |
|
환경 변수가 설정되지 않으면 서버는 기본값을 사용합니다.
AnkiConnect에 대한 로컬 IP 주소 찾기
localhost 연결이 작동하지 않으면 컴퓨터의 로컬 IP 주소를 대신 사용해야 합니다. .env 파일을 다음과 같이 구성하세요.
ANKI_CONNECT_URL=http://YOUR_LOCAL_IP:8765로컬 IP 주소를 찾으려면:
macOS : 터미널을 열고
ifconfig또는ipconfig getifaddr en0(WiFi의 경우)을 실행합니다.Windows : 명령 프롬프트를 열고
ipconfig실행합니다.Linux : 터미널을 열고
ip addr show또는hostname -I실행합니다.
출력에서 192.168.xx 또는 10.xxx 와 같은 IPv4 주소를 찾으세요.
테스트 구성
테스트를 위해 별도의 구성 파일 .env.test 가 제공됩니다.
cp .env.example .env.test.env.test 편집하여 테스트별 값을 설정합니다.
ANKI_CONNECT_URL=http://localhost:8765
ANKI_CONNECT_VERSION=6
ANKI_MOCK_MODE=true테스트 모드에서 실행하려면:
npm run start:test용법
AnkiConnect가 설치되어 Anki가 실행 중인지 확인하세요.
MCP 서버를 실행합니다.
npm start
Claude Desktop 구성
Claude Desktop과 함께 이 MCP 서버를 사용하려면:
클로드 데스크톱 열기
다음 위치에 있는 Claude Desktop 구성 파일을 편집하세요.
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json리눅스:
~/.config/Claude/claude_desktop_config.json
mcpServers섹션에 다음 구성을 추가합니다.
{
"mcpServers": {
"anki": {
"command": "node",
"args": ["path/to/anki-mcp-server/dist/index.js"]
}
}
}"path/to/anki-mcp-server" 이 저장소를 복제한 실제 경로로 바꾸세요.
MCP 도구 사용
구성이 완료되면 Claude에서 다음 도구를 사용할 수 있습니다.
사용 예
Could you analyze my Anki leech cards and suggest ways to improve my study?클로드는 MCP 서버를 사용하여 귀하의 흡혈 카드를 검색하여 분석합니다.
사용 가능한 도구
get_leech_cards
Anki에서 거머리로 태그된 카드를 검색합니다.
매개변수:
detailed(선택 사항, 부울, 기본값: true): 포괄적인 카드 데이터를 반환할지 아니면 ID만 반환할지 여부count(선택 사항, 숫자): 반환할 무작위 카드의 수(기본값은 모든 카드)
태그_검토_카드
지정된 카드에 날짜가 적힌 "검토됨" 태그를 추가합니다. 이를 통해 Claude와 함께 검토한 카드를 추적할 수 있습니다.
매개변수:
card_ids(필수, 숫자 배열): 검토됨으로 태그 지정할 카드 ID 배열custom_tag_prefix(선택 사항, 문자열, 기본값: "見直し"): 태그에 대한 사용자 정의 접두사
태그는見直し_YYYYMMDD 형식(또는 지정된 경우 사용자 정의 접두사)을 따릅니다.
Claude에서의 사용 예:
I've reviewed these cards, please tag them as reviewed: [1234567890, 1234567891]문제 해결
"Anki에 연결할 수 없습니다" - Anki가 실행 중이고 AnkiConnect가 제대로 설치되어 있는지 확인하세요.
"거머리 카드를 찾을 수 없습니다" - Anki에 "거머리"로 태그된 카드가 없습니다.
localhost 연결 문제 -
localhost사용하여 연결할 수 없는 경우:구성 섹션에 설명된 대로 로컬 IP 주소를 찾으세요.
.env파일을 업데이트하여ANKI_CONNECT_URL=http://YOUR_LOCAL_IP:8765사용하세요.AnkiConnect가 IP 주소에서 연결을 허용하도록 구성되어 있는지 확인하세요.
이러한 변경 사항을 적용한 후 MCP 서버를 다시 시작하세요.
태그가 나타나지 않음 -
tag_reviewed_cards도구에 유효한 카드 ID를 제공하고 있는지 확인하세요.
테스트 모드
실제 Anki 데이터에 영향을 주지 않고 테스트하려면 모의 모드를 사용할 수 있습니다.
.env파일에서ANKI_MOCK_MODE=true설정하거나 제공된.env.test파일을 사용하세요.npm run start:test로 서버를 실행하세요.
모의 모드에서는 서버가 Anki에 실제로 연결하지 않고 모든 Anki 작업을 시뮬레이션합니다. 이는 데이터 변경 위험 없이 Claude 통합을 테스트하는 데 유용합니다.
개발
핫 리로딩을 사용하여 개발 모드에서 서버를 실행하려면:
npm run dev모의 모드가 활성화된 개발의 경우:
npm run dev:test특허
MIT
Available Tools
2 toolsget_leech_cardsB
Retrieve cards tagged as leeches from Anki
| Name | Required | Description | Default |
|---|---|---|---|
| detailed | No | Whether to return detailed card information or just IDs | |
| count | No | Number of random cards to return (defaults to all) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Retrieve' implies a read operation, it doesn't specify whether this requires authentication, how results are returned (format, pagination), error conditions, or performance characteristics. The description is minimal and lacks behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with zero wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a retrieval tool with 2 parameters and 100% schema coverage but no annotations or output schema, the description provides basic purpose but lacks behavioral context and usage guidance. It's minimally adequate but has clear gaps in explaining how the tool behaves and when to use it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting, though no additional semantic context is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Retrieve') and target resource ('cards tagged as leeches from Anki'), making the purpose immediately understandable. It doesn't explicitly differentiate from its sibling tool 'tag_reviewed_cards', but the distinction is implied through the different operations (retrieval vs tagging).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives or in what context. The description only states what the tool does, without mentioning prerequisites, timing considerations, or relationship to the sibling tool beyond their different names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tag_reviewed_cardsC
Add a 'reviewed on date' tag to specified cards
| Name | Required | Description | Default |
|---|---|---|---|
| card_ids | Yes | Array of card IDs to tag as reviewed | |
| custom_tag_prefix | No | Custom prefix for the tag (default: '見直し') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a mutation ('Add'), but doesn't clarify if this is destructive (e.g., overwrites existing tags), requires authentication, has side effects, or includes error handling. The description is minimal and lacks critical behavioral details for a write operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's mutation nature (adding tags), no annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permissions, side effects, or return values, leaving significant gaps for an AI agent to understand how to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents both parameters (card_ids and custom_tag_prefix). The description adds no additional parameter semantics beyond implying the tag format ('reviewed on date'), which is already suggested by the schema's default value for custom_tag_prefix. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Add') and target resource ('tag to specified cards'), with the specific tag content 'reviewed on date' mentioned. However, it doesn't differentiate from the sibling tool 'get_leech_cards' (which presumably retrieves rather than modifies cards), so it doesn't fully distinguish from alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description doesn't mention the sibling tool 'get_leech_cards' or any other context for selection, nor does it specify prerequisites like required permissions or system states.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
- First observed
get_leech_cards - First observed
tag_reviewed_cards
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: one retrieves cards with a specific tag, while the other adds a tag to cards. There is no overlap in functionality or ambiguity between them.
Both tools follow a consistent verb_noun pattern (get_leech_cards, tag_reviewed_cards) with clear actions and objects, making them predictable and easy to understand.
With only 2 tools, the server feels thin for an Anki integration, lacking basic operations like creating cards, reviewing cards, or managing decks. This minimal set limits agent workflows significantly.
The toolset is severely incomplete for an Anki server, missing core CRUD operations for cards, decks, and reviews. Agents cannot perform essential tasks like adding new cards or scheduling reviews, leading to dead ends.
Maintenance
Related MCP Connectors
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Run UX research from Claude — create card sort studies, list studies, pull headline stats.
- platform7nOAuthtech.p7n
Connect Claude to your Platform7n workspaces — chat, links, and tasks. One-click OAuth.
Connect Claude to your Intervals.icu watch data for fitness, workout review, and plan writing.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with the Anki desktop app for spaced repetition learning. Supports reviewing due cards, creating new flashcards, and managing study sessions through natural language commands.MIT
- 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 gradedqualityNot gradedmaintenanceConnects Claude to Anki flashcard software via AnkiConnect, enabling users to review due cards, create flashcards, and manage spaced repetition learning through natural language conversations.MIT
- FlicenseNot gradedqualityDmaintenanceProvides programmatic access to Anki flashcard operations through the AnkiConnect API, allowing users to list and create decks and cards. It enables seamless management of flashcards directly from MCP-compatible clients like Claude Desktop.-