SA

scorzeth/anki-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

185 stars 28 forks Качество 61 Тренд 17MIT

scorzeth/anki-mcp-server — это кандидат на MCP-сервер, импортированный из https://github.com/scorzeth/anki-mcp-server.

Обзор

scorzeth/anki-mcp-server — это кандидат на MCP-сервер, импортированный из https://github.com/scorzeth/anki-mcp-server.

Обзор (машинный перевод)

Реализация MCP-сервера, которая подключается к локально запущенному Anki, обеспечивая проверку и создание карт.

Этот сервер разработан для работы с десктопным приложением Anki и дополнением Anki-Connect.

Убедитесь, что у вас установлен дополнение перед использованием.

Ресурсы

  • anki://search/deckcurrent
  • Возвращает все карты из текущей колоды
  • Эквивалент deck:current в Anki
  • anki://search/isdue
  • Возвращает карты в обзоре и обучении, ожидая изучения
  • Эквивалент is:due в Anki
  • anki://search/isnew
  • Возвращает все невидимые карты
  • Эквивалент is:new в Anki

Инструменты

  • update_cards

  • Отмечает карточки с указанными ID карт как ответ и даёт им лёгкий балл от 1 (Снова) до 4 (Легко)

  • Входные данные:

  • answers (массив): Массив объектов с полями cardId (число) и ease (число)

  • add_card

  • Создаёт новую карту в стандартной колоде Anki

  • Входные данные:

  • front (строка): Передняя часть карты

  • back (строка): Обратная сторона карты

  • get_due_cards

  • Возврат n количество карт, которые в настоящее время подлежат рассмотрению

  • Входные данные:

  • num (число): Количество карт

  • get_new_cards

  • Возвращает n количество карт из новых

  • Входные данные:

  • num (число): Количество карт

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Anki MCP Server

An MCP server implementation that connects to a locally running Anki, providing card review and creation.

This server is designed to work with the Anki desktop app and the Anki-Connect add-on.

Make sure you have the add-on installed before using.

Resources

  • anki://search/deckcurrent
    • Returns all cards from current deck
    • Equivalent of deck:current in Anki
  • anki://search/isdue
    • Returns cards in review and learning waiting to be studied
    • Equivalent of is:due in Anki
  • anki://search/isnew
    • Returns all unseen cards
    • Equivalent of is:new in Anki

Tools

  • update_cards

    • Marks cards with given card IDs as answered and gives them an ease score between 1 (Again) and 4 (Easy)
    • Inputs:
      • answers (array): Array of objects with cardId (number) and ease (number) fields
  • add_card

    • Creates a new card in the Default Anki deck
    • Inputs:
      • front (string): Front of card
      • back (string): Back of card
  • get_due_cards

    • Returns n number of cards currently due for review
    • Inputs:
      • num (number): Number of cards
  • get_new_cards

    • Returns n number of cards from new
    • Inputs:
      • num (number): Number of cards

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Configuration

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "anki-mcp-server": {
      "command": "/path/to/anki-mcp-server/build/index.js"
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "anki-mcp-server": { "command": "/path/to/anki-mcp-server/build/index.js" } } }