Anki MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Enables interaction with Anki flashcard software through AnkiConnect, providing tools for managing decks, creating various types of flashcards (Basic and Cloze), searching notes, and manipulating note types.

Anki MCP 서버

AnkiConnect를 통해 LLM이 Anki 플래시카드 소프트웨어와 상호 작용할 수 있도록 하는 MCP(모델 컨텍스트 프로토콜) 서버입니다.

특징

도구

  • list_decks - 사용 가능한 모든 Anki 데크 나열
  • create_deck - 새로운 Anki 덱을 만듭니다
  • create_note - 새 노트 만들기(기본 또는 클로즈)
  • batch_create_notes - 여러 개의 노트를 한 번에 만들기
  • search_notes - Anki 쿼리 구문을 사용하여 노트 검색
  • get_note_info - 메모에 대한 자세한 정보를 가져옵니다.
  • update_note - 기존 노트 업데이트
  • delete_note - 메모 삭제
  • list_note_types - 사용 가능한 모든 노트 유형 나열
  • create_note_type - 새로운 노트 유형을 만듭니다
  • get_note_type_info - 노트 유형의 자세한 구조를 가져옵니다.

자원

  • anki://decks/all - 사용 가능한 덱의 전체 목록
  • anki://note-types/all - 사용 가능한 모든 노트 유형 목록
  • anki://note-types/all-with-schemas - 모든 노트 유형에 대한 자세한 구조 정보
  • anki://note-types/{modelName} - 특정 노트 유형에 대한 자세한 구조 정보

필수 조건

  1. 시스템에 Anki가 설치되었습니다
  2. Anki에 AnkiConnect 애드온 설치

구성

Claude Desktop과 함께 사용

claude_desktop_config.json에 서버를 추가합니다.

지엑스피1

Cline 구성

VSCode 설정 cline_mcp_settings.json 내의 Cline MCP 설정 파일에 서버를 추가합니다.

{ "mcpServers": { "anki": { "command": "npx", "args": ["--yes","anki-mcp-server"] } } }

개발

설정

  1. 종속성 설치:
npm install
  1. 서버를 빌드하세요:
npm run build
  1. 자동 재빌드를 사용한 개발의 경우:
npm run watch

테스트

테스트 모음을 실행합니다.

npm test

이는 다음에 대한 테스트를 실행합니다.

  • 서버 초기화
  • AnkiConnect 커뮤니케이션
  • 참고 작업(생성/읽기/업데이트/삭제)
  • 데크 관리
  • 오류 처리

디버깅

MCP 서버는 stdio를 통해 통신하므로 MCP Inspector를 사용하는 것이 좋습니다.

npm run inspector

이는 다음을 위한 브라우저 기반 인터페이스를 제공합니다.

  • MCP 메시지 모니터링
  • 테스트 도구 호출
  • 서버 로그 보기
  • 통신 문제 디버깅

사용 예

  1. 새로운 덱을 만드세요:
Create a new Anki deck called "Programming"
  1. 기본 카드 추가:
Create an Anki card in the "Programming" deck with: Front: What is a closure in JavaScript? Back: A closure is the combination of a function and the lexical environment within which that function was declared.
  1. 빈칸 삭제 카드 추가:
Create a cloze card in the "Programming" deck with: Text: In JavaScript, {{c1::const}} declares a block-scoped variable that cannot be {{c2::reassigned}}.

기여하다

  1. 저장소를 포크하세요
  2. 기능 브랜치를 생성하세요
  3. 테스트 실행: npm test
  4. 풀 리퀘스트 제출

크레딧

아이콘은 macOS Icons 에서 제공되었습니다.

특허

MIT 라이센스 - 자세한 내용은 라이센스 파일을 참조하세요.

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

AnkiConnect를 통해 LLM이 Anki 플래시카드 소프트웨어와 상호 작용할 수 있도록 하는 모델 컨텍스트 프로토콜 서버로, 플래시카드, 데크, 노트 유형을 만들고 관리할 수 있습니다.

  1. Features
    1. Tools
    2. Resources
  2. Prerequisites
    1. Configuration
      1. Usage with Claude Desktop
      2. Configuration for Cline
    2. Development
      1. Setup
      2. Testing
      3. Debugging
    3. Example Usage
      1. Contributing
        1. Credits
          1. License
            ID: fpgag671vh