npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mankey

v1.1.4

Published

MCP server for Anki integration via Anki-Connect

Downloads

35

Readme

Mankey - Anki MCP Server

Supercharge your Anki workflow with MCP! A Model Context Protocol (MCP) server that connects to Anki, enabling AI-powered card creation, learning analytics, and intelligent review management through 45 comprehensive tools.

Mankey

Quick Start

Prerequisites

  1. Anki - Desktop application
  2. Anki-Connect - Install via Anki → Tools → Add-ons → Get Add-ons → Code: 2055492159
  3. Bun - JavaScript runtime

Installation

This will automatically add the MCP server to your Claude Desktop configuration.

{
  "mcpServers": {
    "anki": {
      "command": "npx",
      "args": ["mankey"]
    }
  }
}

Manual Configuration

npx mankey

🚀 What You Can Do

📚 Create Learning Content from Any Source

  • "Create flashcards from this PDF about quantum physics"
  • "Turn this article into language learning cards with audio"
  • "Generate cloze deletions for these medical terms"
  • "Make image occlusion cards from this anatomy diagram"

🎯 Smart Review Management

  • "Show me my hardest cards and explain why I'm struggling"
  • "Reschedule cards I've failed multiple times"
  • "Optimize intervals for cards I know well"
  • "Find and fix duplicate or similar cards"

📖 Generate Stories & Mnemonics

  • "Create a story using my due Japanese vocabulary"
  • "Make mnemonics for these chemical formulas"
  • "Generate example sentences for difficult words"
  • "Create memory palace descriptions for historical dates"

📊 Learning Analytics

  • "Analyze my review patterns and suggest improvements"
  • "Show cards I'm most likely to forget soon"
  • "Find knowledge gaps in my study topics"
  • "Track my progress on specific subjects"

🎨 Custom Card Templates

  • "Create a template for medical case studies"
  • "Design cards optimized for code snippets"
  • "Make interactive cards with hints and explanations"
  • "Build progressive disclosure templates"

🔧 Bulk Operations

  • "Tag all cards about specific topics"
  • "Move cards between decks based on performance"
  • "Update formatting across all cards"
  • "Clean up and standardize card content"

Example Conversations

Creating Cards from Content

You: "I'm reading about the French Revolution. Create cards for key events."
Claude: I'll create flashcards for major French Revolution events...
[Creates cards with dates, causes, key figures, and outcomes]

Learning Optimization

You: "Find my most difficult Spanish vocabulary and create practice sentences"
Claude: I found 15 cards with <50% success rate. Here are contextual sentences...
[Generates sentences and updates cards with example usage]

Study Analytics

You: "How am I doing with my medical terminology deck?"
Claude: You're reviewing 45 cards/day with 78% retention. Cards about prefixes 
need more work. I suggest focusing on these 10 challenging concepts...

Core Features

45 comprehensive tools covering all Anki operations
AI-powered content generation - Create cards from any text, PDF, or webpage
Intelligent review scheduling - Optimize intervals based on performance
Smart normalization - Handles tags/IDs in any format
Pagination - Efficiently handle large collections
Queue priority - Respects Anki's learning system
Auto-batching - Splits large operations automatically
TypeScript + Zod - Full type safety and validation

Tool Categories

📇 Cards (15 tools)

  • Query: findCards - Find with pagination, supports deck:current
  • Info: cardsInfo, cardsModTime, getIntervals, getEaseFactors
  • State: suspend, unsuspend, areSuspended, areDue
  • Actions: answerCards, forgetCards, relearnCards, setEaseFactors
  • Queue: getNextCards ⭐, getDueCardsDetailed

📝 Notes (10 tools)

  • CRUD: addNote, addNotes, updateNote, deleteNotes
  • Query: findNotes, notesInfo (auto-batched)
  • Tags: addTags, removeTags, getTags, replaceTags

📚 Decks (7 tools)

  • Manage: createDeck, deleteDecks, deckNames, deckNamesAndIds
  • Config: getDeckConfig, saveDeckConfig, getDeckStats

🎨 Models (5 tools)

  • Query: modelNames, modelNamesAndIds, modelFieldNames
  • Create: createModel, updateModelTemplates

🖼️ Media (3 tools)

  • storeMediaFile, retrieveMediaFile, getMediaFilesNames

📊 Stats & GUI (5 tools)

  • Stats: getNumCardsReviewedToday, getCollectionStatsHTML, sync
  • GUI: guiBrowse, guiAddCards

Key Capabilities

Pagination

{
  "query": "deck:current is:due",
  "offset": 0,
  "limit": 100
}
// Returns: cards + {total, hasMore, nextOffset}

Queue Priority

Learning → Review → New cards (via getNextCards)

Auto-batching

Operations >100 items split automatically

Flexible IDs

Both [1234] and ["1234"] work

Testing

# Run all E2E tests
bun test:e2e

# Run specific test suites
bun test:e2e:basic      # Basic connectivity
bun test:e2e:tags       # Tag handling
bun test:e2e:fixes      # Return value consistency
bun test:e2e:real       # Real operations
bun test:e2e:pagination # Pagination support
bun test:e2e:queue      # Queue priority

# Run with test runner (includes connection check)
bun test:e2e:all

# Development
bun test:e2e:watch      # Watch mode

Project Structure

anky/
├── src/index.ts           # MCP server (45 tools)
├── tests/                 # E2E integration tests
│   ├── *.test.ts         # Bun Jest test suites
│   ├── test-utils.ts     # Shared test utilities
│   └── run-tests.ts      # Test runner
├── scripts/               # Standalone test scripts
│   ├── test-*.ts         # Manual test scripts
│   └── test-*.sh         # Shell test scripts
├── docs/                  # Documentation
├── package.json          # Dependencies
└── bunfig.toml          # Bun configuration

Troubleshooting

Cannot connect: Ensure Anki is running with Anki-Connect installed
Permission dialog: Click "Yes" on first connection
macOS background: Disable App Nap if needed:

defaults write net.ankiweb.dtop NSAppSleepDisabled -bool true

Environment Variables

  • ANKI_CONNECT_URL - Default: http://127.0.0.1:8765
  • ANKI_API_KEY - Optional, if configured in Anki-Connect

API Patterns

| Operation | Returns | |-----------|---------| | CREATE | ID (number/string) | | UPDATE/DELETE/ACTION | true on success | | GET | Data or null |

Common Use Cases

🌐 Language Learning

  • Create vocabulary cards with example sentences
  • Generate grammar pattern cards
  • Build cards from reading materials

🔬 STEM Studies

  • Convert formulas into practice problems
  • Create diagram-based cards
  • Build concept relationship cards

💼 Professional Learning

  • Create cards from documentation
  • Build terminology databases
  • Track skill progression

Power User Tips

  • Web Content: "Create cards from this article about machine learning"
  • Code Learning: "Generate cards explaining this Python function"
  • Document Analysis: "Extract key points from this PDF chapter"
  • Bulk Management: "Tag all biology cards and optimize their intervals"

Links

Contributing

We welcome contributions! Please check out our Contributing Guide for details.

License

MIT