YKB-MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| YKB_MCP_HOME | No | Changes the cache directory (default is ~/.ykb-mcp/, containing cache.db and credentials.json). | |
| YKB_MCP_JITTER | No | Adjusts the request timing jitter used alongside the rate limiting interval. | |
| YKB_MCP_MIN_INTERVAL | No | Adjusts the minimum request interval (default ~1.2~2 seconds/request) for rate limiting. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
医考帮(yikaobang)个人账号数据 MCP。
使用流程:
调用 ykb_login() 打开本地网页登录(127.0.0.1 一次性页面,自动开浏览器)。 手机号/密码由用户在浏览器输入,绝不经过对话——严禁向用户索要密码。 返回 pending 时用 ykb_login_status 查询结果。凭据仅存本地 ~/.ykb-mcp/。
ykb_identities 查看可用题库身份;ykb_answer_records(identity_id, filter=wrong|cut|...) 拉取错题/已斩/做题记录。
ykb_chapters + ykb_chapter_questions 获取题目内容;ykb_question 查单题。
ykb_comments / ykb_my_praises / ykb_my_comments / ykb_notes 按题读取; ykb_my_praises_all / ykb_my_comments_all / ykb_notes_all 全局归纳(缓存+限速增量扫描); ykb_sync 批量同步;ykb_search_local 搜索本地缓存。
ykb_collections / ykb_collections_scan 获取收藏题目。
注意:
所有网络请求自动限速(约 1.2~2 秒/请求),批量扫描请耐心续跑,不要并发轰炸。
标注【写操作】的工具(ykb_praise_comment / ykb_publish_comment / ykb_cut_question)会改动账号数据,执行前应向用户确认。
登录过期(309)时重新调用 ykb_login;203 表示该章节无权限(VIP/题库未购买)。
本服务仅供个人账号数据读取与学习用途,请遵守医考帮用户协议,勿传播题库内容。
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ykb_loginA | 打开本地网页登录医考帮:在 127.0.0.1 启动一次性登录页并自动打开浏览器(结果中也附 URL)。手机号与密码由用户在浏览器中输入,由本地进程直接提交官方接口,全程不经过对话。严禁向用户索要手机号/密码。默认等待登录完成(120 秒);返回 pending 时让用户继续操作,之后用 ykb_login_status 查询。凭据仅存本地 ~/.ykb-mcp/credentials.json(600 权限),不存储密码。 |
| ykb_login_statusA | 查询本地网页登录的进度与结果(ykb_login 返回 pending 后使用)。logged_in=true 表示登录成功。 |
| ykb_whoamiA | 查询当前医考帮登录状态与本地缓存统计(题目/做题记录/评论/笔记/收藏数量)。 |
| ykb_logoutA | 退出当前医考帮账号:清除本地凭据,保留缓存数据。 |
| ykb_identitiesA | 获取医考帮身份树(可用题库/学期,如临床期末、口腔期末、执业医师)。返回扁平身份列表:identity_id、名称、路径、是否叶子。做题记录/章节工具需要 identity_id;父身份会自动展开为叶子身份。默认读缓存,refresh=True 强制刷新。 |
| ykb_answer_recordsA | 拉取账号在指定身份(题库)下的做题记录。filter: all=全部, wrong=错题, cut=已斩题, right=做对的题。记录含 question_id、我的答案、对错、已斩状态、用时、更新时间;写入本地缓存。identity_id 来自 ykb_identities,父身份自动展开为叶子身份逐个拉取(限速)。refresh=False 仅读缓存。 |
| ykb_chaptersA | 获取指定身份下的科目/章节目录(含每章题量),用于定位 ykb_chapter_questions 的 chapter_id。identity_id 建议用 ykb_identities 中的叶子身份或可选学科节点。 |
| ykb_chapter_questionsA | 拉取并解密一个章节的全部题目(题干、选项、答案、收藏/已斩标记),写入本地缓存。full=True 时额外包含解析(内容较长)。chapter_id 来自 ykb_chapters。无权限章节返回 203 提示。 |
| ykb_questionA | 获取单题完整内容(题干、选项、答案、解析)。优先读缓存;未命中时尝试官方 question/info 接口;提供 identity_id+chapter_id 可整章定位。 |
| ykb_collectionsA | 获取账号收藏的题目。优先读本地缓存;refresh=True 时探测官方收藏列表接口(实验性)。探测不到时用 ykb_collections_scan 按章节扫描收藏标记。 |
| ykb_collections_scanA | 按章节扫描指定身份下的收藏标记(is_collection_question),结果写入本地缓存。budget=本次最多扫描章节数(每章 1 请求,自动限速);断点续传,重复调用直到 remaining=0。 |
| ykb_commentsA | 获取某题的热门评论。sort: likes=最多点赞, hot=最高热度, replies=最多回复, newest=最新发布。列表中本人已点赞/已发表的评论会自动归档到本地缓存。题目元数据优先从缓存解析,必要时显式传 identity_id/subject_id/app_id。 |
| ykb_my_praisesB | 获取某题下我点赞过的评论(官方 func=mypraise),写入本地缓存。 |
| ykb_my_commentsC | 获取某题下我发表过的评论(官方 func=mycomment),写入本地缓存。 |
| ykb_my_praises_allA | 全局「我点赞过的所有评论」列表:先读本地缓存,再对未扫描的已做题限速增量扫描(scan_budget=本次请求数)。remaining>0 时重复调用可续扫;全量同步用 ykb_sync(scope='praise')。identity_id 可选,限定某个题库。 |
| ykb_my_comments_allA | 全局「我发表过的所有评论」列表:先读本地缓存,再对未扫描的已做题限速增量扫描(scan_budget=本次请求数)。remaining>0 时重复调用可续扫;全量同步用 ykb_sync(scope='mycomment')。identity_id 可选,限定某个题库。 |
| ykb_notesA | 获取某题下我的笔记(官方 getNote,含笔记图片 URL),写入本地缓存。题目元数据优先从缓存解析,必要时显式传 identity_id/subject_id/app_id。 |
| ykb_notes_allA | 全局「我的所有笔记」列表:先读本地缓存,再对未扫描的已做题限速增量扫描(scan_budget=本次请求数)。remaining>0 时重复调用可续扫;全量同步用 ykb_sync(scope='notes')。identity_id 可选,限定某个题库。 |
| ykb_syncA | 批量同步我的点赞/我的评论/我的笔记到本地缓存(限速、断点续传)。scope: praise|mycomment|notes|all。budget=每个类别本次最多扫描题数。重复调用直到各类别 remaining=0。扫描范围=已做题∪已缓存题目∪已有评论/笔记的题目。 |
| ykb_search_localA | 在本地缓存中按关键词搜索(questions=题干, comments=评论内容, notes=笔记内容, all=全部)。数据来自此前拉取/同步过的内容,不发起网络请求。 |
| ykb_praise_commentB | 【写操作】给一条评论点赞,会改动账号数据,请谨慎使用。成功后自动归档到本地「我的点赞」。comment_id 可来自 ykb_comments。 |
| ykb_publish_commentB | 【写操作】在某题下发表评论,会改动账号数据,请谨慎使用。成功后自动归档到本地「我的评论」。 |
| ykb_cut_questionB | 【写操作】斩题/取消斩题(标记该题已掌握),会改动账号数据,请谨慎使用。需要 chapter_id(题目已缓存时自动读取,否则请显式传入)。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 23 tools
Core tools (identity tree, chapters, chapter questions, single question, answer records) are clearly separated, but there are several near-duplicate families: ykb_collections vs ykb_collections_scan, and the per-question (ykb_my_praises/ykb_my_comments/ykb_notes) vs global (_all) vs bulk ykb_sync trio. Descriptions do explain which to use when, but an agent still has to reason about cache-first vs incremental-scan vs full-sync before picking.
All names share a stable ykb_ prefix and snake_case, with consistent suffixes (_all, _scan, _status), which helps readability. However, the convention is mixed: most names are resource nouns (ykb_chapters, ykb_question, ykb_notes) while others are verb-led (ykb_login, ykb_search_local, ykb_sync, ykb_publish_comment, ykb_cut_question), so there is no single predictable verb_noun pattern.
23 tools is heavy for the apparent scope; the auth trio (login/login_status/whoami/logout) plus the three parallel _all scan tools and ykb_sync create redundancy that could be consolidated. Each tool does have a stated role, so it is over-scoped rather than bloated with filler.
Coverage of the read/analysis lifecycle is strong: auth/lifecycle, identity tree, chapters, questions, answer records, collections, comments, notes, and batch sync with resume. Gaps exist on the write side — no tool to add/remove a question collection and no note create/edit/delete, while comments and 斩题 are writable — which will leave some user workflows as dead ends.