bunpro-mcp
An unofficial MCP server for Bunpro that exposes its review queue, search, statistics, and SRS management as tools, enabling an LLM agent to read study data and add grammar points or vocabulary to reviews.
README
bunpro-mcp
An unofficial Model Context Protocol server for Bunpro, the Japanese grammar/vocabulary SRS. It exposes Bunpro's review queue, search, statistics, and SRS management as MCP tools, so an LLM agent can read your study data and add grammar points / vocabulary to your reviews.
Disclaimer — please read
This is an independent, unofficial project, not affiliated with, endorsed by, or supported by Bunpro. It wraps Bunpro's private, undocumented frontend API, which can change or break at any time. Built for personal, educational use.
This tool only works because it relies on Bunpro's servers, content, and services. Your use of it — and especially any commercial use — is subject to Bunpro's Terms of Service independently of this project's license. No Bunpro content (grammar explanations, example sentences, vocabulary data, audio) is included in this repository. Use at your own risk. If you build something commercial on top of Bunpro, support Bunpro directly.
Features
- Read your review queue, due counts, SRS overview, JLPT progress, forecasts, and session history.
- Search grammar points and vocabulary — compact results, filterable by type, size-capped.
- Add / remove grammar points and vocabulary to / from your SRS reviews.
- Manage bookmarks.
- Per-call token resolution: refresh an expired token without restarting your MCP client (see below).
Requirements
- Node.js 18+ (uses the built-in
fetch). - A Bunpro account and its
frontend_api_token.
Getting your token
The frontend API uses the frontend_api_token cookie as a bearer token:
- Log in to bunpro.jp.
- DevTools → Application → Cookies →
https://bunpro.jp→ copy the value offrontend_api_token.
The token expires roughly monthly; refresh it the same way when calls start returning
401 AUTH_USER_DENIED.
Install & build
npm install
npm run build
Configure your MCP client
Add the server to your MCP client config (stdio transport). Build it locally first
(npm install builds via the prepare script), then point at dist/index.js — see
claude_desktop_config.example.json:
{
"mcpServers": {
"bunpro": {
"command": "node",
"args": ["/absolute/path/to/bunpro-mcp/dist/index.js"],
"env": { "BUNPRO_API_TOKEN": "your_frontend_api_token_here" }
}
}
}
Not yet published to npm. Once it is, you'll also be able to run it with no local clone via
"command": "npx", "args": ["-y", "@patvandyke/bunpro-mcp"].
BUNPRO_API_KEY (legacy) is optional and only enables the two *_legacy tools.
Token refresh without restarting
The token is resolved per request, not just at startup, so a refreshed token is picked up without restarting the server:
BUNPRO_TOKEN_FILE— if set (or, by default,~/.claude-work/.claude.jsonwhen present), the liveBUNPRO_API_TOKENvalue is read from that JSON file on each call (30 s cache) and re-read on a401. Refresh the token in the file and the next call picks it up — no restart. This is handy under Claude Code, whose config already holds the token.- Otherwise it falls back to the
BUNPRO_API_TOKENenv var supplied at spawn.
A 401 returns a clear "token expired" message instead of dropping the connection.
Tools
| Tool | Description |
|---|---|
get_user |
User profile |
get_due_count |
Number of reviews due |
get_queue |
Full review queue |
get_reviews |
Paginated reviews |
get_base_stats, get_jlpt_progress, get_srs_overview, get_srs_level_details, get_ghost_details |
Statistics |
get_forecast_daily, get_forecast_hourly, get_review_activity |
Forecasts & activity |
get_last_session, get_last_24_hours |
History |
get_item, get_item_notes |
Full detail / notes for one item |
search |
Search grammar + vocab (grammar, vocab, limit params; compact output) |
add_to_reviews, remove_from_reviews |
SRS management (Vocab / GrammarPoint) |
add_bookmark, remove_bookmark |
Bookmarks |
get_study_queue_legacy, get_recent_items_legacy |
Legacy API-key endpoints |
API notes
- Frontend API base:
https://api.bunpro.jp/api/frontend. Auth:Authorization: Bearer <frontend_api_token>. - The reviews endpoint uses the type names
Vocab/GrammarPoint(bookmarks useVocabulary/GrammarPoint). - Raw search responses can be very large; this server returns a compact projection and reports truncation.
Related projects
- brimalval/bunpro-mcp — an independent Python / FastAPI implementation.
License
MIT © Patrik Kollár. Keep the copyright / credit notice in copies. This license covers this client code only — it grants no rights to Bunpro's services or content, which remain governed by Bunpro's Terms of Service.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。