New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jishik

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jishik

A Model Context Protocol (MCP) server for Anki

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

anki-mcp

A Model Context Protocol (MCP) server for Anki that enables AI assistants to interact with your Anki flashcard decks.

Prerequisites

Anki Desktop Application

  • Anki Desktop (>=2.1.45, released 2021-07-30) must be installed and running
  • Download from: https://apps.ankiweb.net/

AnkiConnect Add-on

The AnkiConnect add-on is required for API communication with Anki.

  • Install AnkiConnect Add-on:

    • Open Anki Desktop
    • Go to Tools → Add-ons → Get Add-ons...
    • Enter code: 2055492159
    • Click OK and restart Anki
  • Verify Installation:

    • Go to Tools → Add-ons
    • You should see "AnkiConnect" in the list
    • The version should be >=25.2.25.0 (released 2025-02-25) for full compatibility
  • Configure AnkiConnect (Optional):

    • Go to Tools → Add-ons → AnkiConnect → Config
    • Default settings should work for most users:
      {
          "apiKey": null,
          "apiLogPath": null,
          "webBindAddress": "127.0.0.1",
          "webBindPort": 8765,
          "webCorsOriginList": ["http://localhost"]
      }
      

Installation

To install dependencies:

bun install

Building

To build the project:

bun run build

Running

Development

bun run index.ts

MCP Inspector (for testing)

bun run inspector

Preview (build + inspect)

bun run preview

Usage

Once running, the MCP server provides the following tools:

list_anki_decks

Lists all available Anki deck names.

Example output:

Available Anki decks:
• Default
• Japanese
• Spanish
• Programming

Environment Configuration

Default Configuration

The yanki-connect client uses these defaults:

  • Host: http://127.0.0.1
  • Port: 8765
  • API Version: 6
  • Security Key: Not required by default

Custom Configuration

If you need to customize the connection (e.g., different port, security key), you can modify the YankiConnect client initialization in lib/handlers.ts.

Troubleshooting

"Error connecting to Anki"

  • Ensure Anki is running: The Anki Desktop application must be open
  • Check AnkiConnect: Verify the add-on is installed and enabled
  • Check port: Default port 8765 should be free
  • Firewall: Ensure localhost connections on port 8765 are allowed

AnkiConnect Version Issues

  • This library is tested against AnkiConnect version 25.2.25.0
  • Older versions may work but are not guaranteed to support all features
  • Update AnkiConnect if you experience compatibility issues

Permission Issues

Some AnkiConnect actions may require explicit permission. If prompted in Anki, allow the connection.

Development

This project was created using bun init in bun v1.1.37. Bun is a fast all-in-one JavaScript runtime.

Keywords

mcp

FAQs

Package last updated on 01 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts