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 分