Skip to main content
Glama
NeuralDarsh

JLPT Study MCP Server

by NeuralDarsh
README.md
# JLPT Study MCP Server

A tiny [Model Context Protocol](https://modelcontextprotocol.io) server that connects
Claude Desktop to my personal Japanese study data — Anki due cards and a local
study session log. Built after completing Anthropic's **Introduction to MCP** and
**MCP Advanced Topics** courses, as a way to apply what those courses taught
instead of just collecting the certificates.

## What it demonstrates

| MCP Primitive | Implementation |
|---|---|
| **Tool** | `get_due_cards` — pulls due flashcards live from Anki via AnkiConnect |
| **Tool** | `log_study_session` — appends a study session to a local JSON log |
| **Tool** | `study_streak` — computes current daily streak from logged sessions |
| **Resource** | `study://progress` — read-only summary stats Claude can pull in as context |
| **Prompt** | `quiz_me` — a reusable template that turns due cards into an interactive quiz |
| **Transport** | stdio (local, per Introduction to MCP course) |

## Setup

1. Install [Anki](https://apps.ankiweb.net/) (free) and the
   [AnkiConnect](https://ankiweb.net/shared/info/2055492159) add-on, then restart Anki.
2. Create a virtual environment and install dependencies:

   ```bash
   python3 -m venv venv
   source venv/bin/activate   # Windows: venv\Scripts\activate
   pip install -r requirements.txt
   ```

3. Register the server with Claude Desktop by adding it to
   `claude_desktop_config.json` (see below).
4. Restart Claude Desktop. You should see a 🔨 tools icon confirming the
   server connected.

## Example usage in Claude Desktop

- "What Japanese cards do I have due today?"
- "I just finished a 25 minute Bunpro lesson on te-form, log it."
- "What's my study streak?"
- "Quiz me on today's deck."

## Stretch goal

v1 uses stdio transport (local only). A planned v2 migrates to
StreamableHTTP so the server could run on a small remote host instead of
only on my own machine — applying the transport concepts from the
Advanced Topics course.

## Tech

Python, [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) (`FastMCP`), AnkiConnect API.