Kani MCP Server

io.github.Alexxanddr由 GitHub 帳號 Alexxanddr 發布v0.1.4更新於 Oct 29, 2026

Read-only access to WaniKani progress and study data through MCP.

已驗證STDIO僅桌面效率與工作流知識與記憶

概覽

AI 產生的概覽

唯讀 MCP 伺服器,讓助理查詢使用者的 WaniKani 學習進度、複習統計,以及漢字、部首與詞彙等參考資料。

可以做什麼
  • 讀取使用者個人資料、等級、偏好與訂閱狀態,以及未來 24 小時的課程與複習可用情況
  • 列出可依主題、等級、SRS 階段或可用狀態篩選的作業,並列出部首、漢字、詞彙等主題
  • 複習歷史與正確率:已完成的複習紀錄,以及依主題統計的正確率與答錯次數
  • 學習資料:已儲存的筆記與同義詞、等級進階歷史、帳號重設紀錄、SRS 階段定義與發音聲優資訊
  • 依類型與數字 ID 取得單一支援的資源,並使用 API 分頁游標翻頁瀏覽集合
適用情境
適合以 WaniKani 學習日文、希望助理在聊天用戶端中直接回答即將到來的複習與課程、等級進度、正確率較低的主題或已儲存筆記與同義詞等問題的使用者。
執行需求
以 npm 套件形式透過 stdio 在本機執行(npx 或全域安裝),需要 Node.js 18 或更新版本。必須在 WANIKANI_API_TOKEN 環境變數中提供具唯讀權限的 WaniKani API v2 個人存取權杖。需要能連線至 WaniKani API 的網路;WANIKANI_API_BASE_URL 可選擇性覆寫 API 根位址。
安裝前請注意
WANIKANI_API_TOKEN 可存取帳號與學習資料,應妥善保密,優先使用用戶端的安全密鑰儲存而非明文的 JSON 設定檔。變更 WANIKANI_API_BASE_URL 會把 bearer 權杖傳送到該主機,因此只應使用可信任的 HTTPS 位址。伺服器為唯讀,不會修改 WaniKani 資料,但 API 回應會原樣傳遞,大型集合可能需要篩選與分頁。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Kani MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Kani MCP Server

A small, read-only Model Context Protocol server that gives MCP clients access to a user's WaniKani progress and WaniKani reference data through the official API v2.

It can answer questions such as:

  • What reviews and lessons are coming up today?
  • Which kanji are assigned at a given level?
  • Which subjects have the lowest review accuracy?
  • What notes or synonyms have I saved?

The server runs locally over stdio. It does not store data, expose an HTTP service, or modify WaniKani.

Requirements

  • Node.js 18 or newer
  • A WaniKani personal access token with read-only permissions, created in WaniKani API Tokens

Keep the token secret. It grants access to account and study data.

Install

The simplest MCP configuration runs the published package directly with npx:

json
{  "mcpServers": {    "wanikani": {      "command": "npx",      "args": ["-y", "kani-mcp-server@latest"],      "env": {        "WANIKANI_API_TOKEN": "your-read-only-token"      }    }  }}

Alternatively, install the executable globally:

sh
npm install --global kani-mcp-serverkani-mcp-server

Restart the MCP client after changing its configuration. Prefer the client's secure secret facility, when available, over writing a token into a JSON file.

Run from source

sh
git clone https://github.com/Alexxanddr/kani-mcp-server.gitcd kani-mcp-servernpm cicp .env.example .env# Edit .env and set WANIKANI_API_TOKEN.npm run buildnode --env-file=.env dist/index.js

To configure an MCP client against a source checkout, replace the path and token:

json
{  "mcpServers": {    "wanikani": {      "command": "node",      "args": ["/absolute/path/to/kani-mcp-server/dist/index.js"],      "env": {        "WANIKANI_API_TOKEN": "your-read-only-token"      }    }  }}

The process communicates via MCP on stdin/stdout, so an empty terminal after startup is normal.

Tools

ToolPurpose
get_userUser profile, level, preferences, and subscription state
get_summaryLessons and reviews available during the next 24 hours
list_assignmentsAssignments filtered by subjects, levels, SRS stages, or state
list_subjectsRadicals, kanji, vocabulary, and kana vocabulary
list_review_statisticsAccuracy and incorrect-answer totals by subject
list_reviewsCompleted review history
list_study_materialsPersonal notes and meaning/reading synonyms
list_level_progressionsLevel progression history
list_resetsAccount reset history
list_spaced_repetition_systemsSRS stage definitions
list_voice_actorsPronunciation voice actor metadata
get_resourceOne supported resource by type and numeric ID

Collection tools return one API page. Use page_after_id or page_before_id from the WaniKani collection pagination data to continue. Arrays are sent as the comma-delimited filters expected by the API.

Example prompts:

text
Show my WaniKani level and the reviews due in the next 24 hours.List my level 10 kanji assignments and explain their current SRS stages.Find review statistics below 70%, then fetch the matching subjects.

See MCP contracts for exact inputs and outputs.

Configuration

VariableRequiredMeaning
WANIKANI_API_TOKENYesPersonal WaniKani API v2 bearer token
WANIKANI_API_BASE_URLNoAPI root; defaults to https://api.wanikani.com/v2

Changing the base URL sends the bearer token to that host. Remote overrides must use HTTPS; localhost HTTP is accepted for tests and local development.

Development

sh
npm cinpm run checknpm pack --dry-run
  • npm run dev: run TypeScript directly over stdio
  • npm test: run unit and MCP contract tests
  • npm run type-check: check TypeScript without emitting files
  • npm run build: create the bundled executable in dist/

Read CONTRIBUTING.md, architecture, and testing before changing public tools.

Troubleshooting

  • WANIKANI_API_TOKEN is required: pass the variable in the MCP client's env block or start Node with --env-file=.env.
  • 401 Unauthorized: verify the token and recreate it if it may have been exposed.
  • 429 Too Many Requests: wait for WaniKani's rate-limit reset and request narrower collections.
  • Large responses: add filters and paginate rather than requesting broad subject or review histories.
  • Client shows disconnected: use an absolute script path, run npm run build, and confirm Node 18+ is on the client's PATH.

Limitations

  • Read-only: starting assignments, submitting reviews, changing user settings, and editing study materials are intentionally absent.
  • No automatic multi-page aggregation, caching, resources, or prompts.
  • API response objects are passed through unchanged, so upstream additions appear without a package release.

License and distribution

This project is available under the MIT License and is packaged for the public npm registry as kani-mcp-server. GitHub releases publish matching package versions through npm Trusted Publishing; see publishing for the one-time setup and release procedure.

WaniKani is a trademark of Tofugu LLC. This independent project is not affiliated with, endorsed by, or sponsored by WaniKani or Tofugu.

來源:README.md,提交 c16d993

工具

12

get_user

Get the authenticated WaniKani user profile and subscription state

無需輸入參數。

get_summary

Get lesson and review availability for the next 24 hours

無需輸入參數。

list_level_progressions

List level progression history

輸入參數idspage_after_idupdated_afterpage_before_id

list_resets

List account reset history

輸入參數idspage_after_idupdated_afterpage_before_id

list_reviews

List completed reviews

輸入參數idspage_after_idupdated_afterpage_before_id

list_spaced_repetition_systems

List spaced repetition system definitions

輸入參數idspage_after_idupdated_afterpage_before_id

list_study_materials

List user notes and synonyms

輸入參數idspage_after_idupdated_afterpage_before_id

list_voice_actors

List pronunciation voice actors

輸入參數idspage_after_idupdated_afterpage_before_id

list_assignments

List assignments with optional subject, level, SRS, and availability filters

輸入參數idsburnedhiddenlevelspassedstartedunlockedsrs_stagessubject_idspage_after_idsubject_typesupdated_after另有 5 個

list_review_statistics

List accuracy statistics for studied subjects

輸入參數idssubject_idspage_after_idsubject_typesupdated_afterpage_before_idpercentages_less_thanpercentages_greater_than

list_subjects

List radicals, kanji, and vocabulary with optional level, type, or slug filters

輸入參數idsslugstypeshiddenlevelspage_after_idupdated_afterpage_before_id

get_resource

Get one WaniKani resource by type and numeric ID

輸入參數id必填resource必填

版本歷史

1
  1. v0.1.4最新Oct 22, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分