Skip to main content
Glama

青马易战自动答题MCP服务

青马易战平台设计的 Model Context Protocol (MCP) 服务器,提供自动答题功能。

功能特性

  • 🎓 获取课程列表和信息

  • ❓ 自动获取题目内容和选项

  • ✅ 自动提交答案并获取结果反馈

Related MCP server: LeetCode MCP Server

系统要求

  • Python 3.11+

  • uv 包管理器

  • 依赖包:httpx、mcp、pycryptodome

安装

  1. 克隆仓库:

git clone https://github.com/shibig666/QMYZ-MCP.git
cd QMYZ-MCP
  1. 安装依赖:

uv sync

MCP 工具

get_courses

获取用户的课程列表。

参数:

  • JSESSIONID (str): 用户的会话ID,从浏览器cookie中获取

返回:

  • 课程字典,格式:{课程ID: 课程名称}

示例:

await get_courses("YOUR_JSESSIONID")
# 返回: {'2': '形势与政策', '7': '毛泽东思想和中国特色社会主义理论体系概论', '8': '思想道德与法治', '9': '马克思主义基本原理', '10': '中国近现代史纲要', '12': '习近平新时代中国特色社会主义思想概论', '16': '不忘初心牢记使命', '50': '党史学习', '52': '2020一马当先复赛1(测试)', '68': '学习“四史”', '257': '深学细悟二十大,笃行实干谱新篇', '444': '中华民族一家亲 同心共筑中国梦', '445': '网络文明素养提升', '450': '全民国家安全教育 走深走实十周年', '520': '学思践悟 青春力行——学习党的二十届三中全会精神', '523': '福建红色文化读本'}

get_question

获取指定课程的下一道题目。

参数:

  • JSESSIONID (str): 用户的会话ID

  • course_id (str): 课程ID

返回:

  • 题目信息字典,包含:

    • sub_descript: 题目描述

    • sub_type: 题目类型

    • options: 选项内容(A、B、C、D等)

    • option_count: 选项数量

    • uuid: 题目唯一标识符

submit_question

提交题目答案。

参数:

  • JSESSIONID (str): 用户的会话ID

  • course_id (str): 课程ID

  • question_id (str): 题目UUID(从get_question获取)

  • answer (str): 答案选项(如 "A"、"B"、"C"、"D")

返回:

  • "答题正确" 或 "答题错误"

与 Claude Desktop 集成

在 Claude Desktop 配置文件中添加MCP服务器配置:

{
  "mcpServers": {
    "qmyz": {
      "command": "uv",
      "args": ["--directory", "path/to/qmyz-mcp", "run", "main.py"]
    }
  }
}

使用流程

  1. 获取JSESSIONID:登录青马易战平台,从浏览器开发者工具中复制JSESSIONID cookie值

  2. 配置系统提示词

# 青马易战智能答题助手

你是一个专业的答题助手,帮助用户完成青马易战平台的学习任务。

## 工作流程

1. **获取课程列表**
   - 使用 `get_courses(JSESSIONID)` 获取所有可用课程

2. **智能答题循环**
   - 使用 `get_question(JSESSIONID, course_id)` 获取题目
   - 仔细分析题目内容和选项
   - 基于知识储备选择最合适的答案
   - 使用 `submit_question(JSESSIONID, course_id, uuid, answer)` 提交答案
   - 根据结果反馈继续下一题

## 答题策略

- 仔细阅读题目,理解题意
- 分析所有选项,排除明显错误答案
- 基于相关知识做出最佳判断
- 每题只有一次机会,谨慎作答
- 答完一道题后继续下一题,不要重试

## 交互规范

- 全程使用中文交流
- 详细解释答题思路
- 显示答题进度和结果
- 提供学习建议和知识点总结

## 注意事项

- 仅答题一次,错误后不重复提交
  1. 开始答题:在对话框输入答题说明

请开始答题

- **答题课程**: 思想道德与法治

- **JSESSIONID**: YOUR_JSESSIONID

- **答题说明**: 完成10道答题

注意事项

⚠️ 重要提醒

  • 本工具仅供学习和研究使用

  • 请遵守青马易战平台的使用条款

  • 建议结合实际学习,不要过度依赖自动答题

  • JSESSIONID有时效性,过期后需要重新获取

许可证

本项目仅供学习研究使用,请勿用于商业目的,详情见 LICENSE 文件。

Available Tools

3 tools
get_coursesC

获取课程名称与ID

参数:
    JSESSIONID (str): 用户的JSESSIONID
ParametersJSON Schema
NameRequiredDescriptionDefault
JSESSIONIDYes

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the JSESSIONID parameter but doesn't disclose behavioral traits such as authentication requirements, rate limits, error conditions, or what the return format looks like (e.g., list of courses). The description is minimal and lacks essential operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and structured with a clear purpose statement followed by parameter documentation. It uses minimal sentences without unnecessary fluff. However, it could be slightly more front-loaded by integrating the parameter info more seamlessly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no annotations, no output schema, and a simple input schema with 0% coverage, the description is incomplete. It covers the parameter but fails to address key aspects like return values (what format courses are returned in), error handling, or authentication context beyond the parameter name. For a data retrieval tool, this leaves significant gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explicitly documents the single parameter (JSESSIONID) and its type (str), adding meaning beyond the input schema which has 0% description coverage. Since there's only one parameter and it's fully explained in the description, this compensates well for the schema gap. No additional parameter details are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states '获取课程名称与ID' (Get course names and IDs), which provides a clear verb ('get') and resource ('courses'). However, it doesn't distinguish this tool from its siblings (get_question, submit_question) or specify scope (e.g., all courses vs. user-specific). The purpose is understandable but lacks differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (like authentication context) or compare it to sibling tools. The agent must infer usage from the parameter (JSESSIONID) alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_questionC

获取课程题目

参数:
    JSESSIONID (str): 用户的JSESSIONID
    course_id (str): 课程ID
ParametersJSON Schema
NameRequiredDescriptionDefault
JSESSIONIDYes
course_idYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'gets' questions, implying a read operation, but doesn't specify authentication requirements (JSESSIONID suggests auth needed), rate limits, error conditions, or what the return format looks like. For a tool with 2 parameters and no annotations, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with a clear purpose statement followed by parameter listings. It uses minimal sentences without unnecessary elaboration. However, the structure could be improved by front-loading more critical information like authentication needs or output format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 2 parameters, no annotations, and no output schema, the description is incomplete. It lacks information on authentication requirements (implied by JSESSIONID but not explained), expected output format, error handling, and how it differs from siblings. For a tool in this context, more detail is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description adds basic semantics by listing parameters with brief explanations (e.g., '用户的JSESSIONID' for JSESSIONID, '课程ID' for course_id), which helps clarify what each parameter represents. However, it doesn't provide format details, constraints, or examples, leaving gaps in understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb '获取' (get) and resource '课程题目' (course questions), providing a specific purpose. However, it doesn't explicitly differentiate from sibling tools like 'submit_question', which would require a 5. The purpose is clear but lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_courses' or 'submit_question'. There's no mention of prerequisites, context, or exclusions. It merely lists parameters without usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

submit_questionC

提交课程题目答案, 返回答题结果。提交的answer应为选项的字母,例如 "A" 或 "B"

参数:
    JSESSIONID (str): 用户的JSESSIONID
    course_id (str): 课程ID
    question_id (str): 题目ID
    answer (str): 答案,例如 "A" 或 "B" 等选项
ParametersJSON Schema
NameRequiredDescriptionDefault
JSESSIONIDYes
course_idYes
question_idYes
answerYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions that the tool returns answer results, which is helpful, but doesn't disclose critical behavioral traits like authentication requirements (though JSESSIONID is a parameter), potential side effects (e.g., whether submission is final), error conditions, or rate limits. The description is minimal beyond stating the basic operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise and front-loaded, with the core purpose stated first. It uses two sentences and a parameter list efficiently, though the parameter explanations could be more integrated. There's minimal waste, but it could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a submission tool with 4 parameters), no annotations, and no output schema, the description is incomplete. It lacks details on authentication, error handling, return values beyond '返回答题结果' (return answer results), and how it interacts with the system. For a mutation tool with zero structured coverage, this is inadequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides some semantic context: JSESSIONID is described as '用户的JSESSIONID' (user's JSESSIONID), answer is clarified as '答案,例如 "A" 或 "B" 等选项' (answer, such as 'A' or 'B' options). However, course_id and question_id lack additional meaning beyond their names. The description adds partial value but doesn't fully compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '提交课程题目答案, 返回答题结果' (submit course question answers, return answer results). It specifies the verb (submit) and resource (question answers), though it doesn't explicitly differentiate from sibling tools like get_question. The purpose is specific and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing considerations, or how it relates to sibling tools like get_courses or get_question. Usage is implied but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedget_courses
    • First observedget_question
    • First observedsubmit_question

TDQS

B3.3/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: get_courses retrieves course metadata, get_question fetches questions for a specific course, and submit_question submits answers to specific questions. There is no overlap in functionality, and the descriptions clearly differentiate their roles in the workflow.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with snake_case (get_courses, get_question, submit_question). The naming is predictable and readable, making it easy for agents to understand the action each tool performs.

Tool Count3/5

With only 3 tools, the server feels thin for a course/quiz management domain. While the tools cover core operations, additional functionalities like updating courses or managing user sessions might be expected. However, the count is not critically low, just borderline minimal.

Completeness4/5

The toolset covers a basic workflow: list courses, get questions, and submit answers. Minor gaps exist, such as no tools for creating or deleting courses, or handling user authentication beyond JSESSIONID. Agents can work around these, but the surface is not fully comprehensive for the domain.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables AI clients to send and receive QQ messages through NapCatQQ (OneBot v11) for both private and group chats. It supports message context management, real-time WebSocket listening, and human-like typing simulation.
    7
    25
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    An MCP server that provides tools to interact with the LeetCode API, enabling problem fetching, code template generation, and solution execution/submission.
    7
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A MCP server that exposes QQ bot capabilities over Streamable HTTP, enabling clients to query bot status, read group and friend info, fetch chat history, and send group/private text messages.
    2
    MIT