Skip to main content
Glama

DeepTutor MCP

中文文档:简体中文。

DeepTutor MCP exposes DeepTutor's learning data and study-specific tools to MCP-compatible AI clients. It is designed for self-hosted DeepTutor installations: the user runs the MCP server and connects it to their own DeepTutor instance. The AI client handles the ordinary conversation and tutoring; DeepTutor supplies learning state, source material, and study operations through its APIs.

The same canonical tool catalog is available through local stdio and remote Streamable HTTP transports. Clients such as Codex, ChatGPT, and Poke are examples, not dependencies of the project. Authentication is selected for the deployment and client: API-key bearer authentication for clients that support it, or a trusted OAuth gateway that validates the user and forwards a signed identity assertion.

Capabilities

The current catalog contains 60 tools covering:

  • DeepTutor status, courses, syllabus, and linked resources

  • Mastery Paths, outlines, evidence, change history, review settings, and the built-in tutor workflow

  • Native Question Bank and Practice queues, answer checks, reviews, and analytics

  • Generated Books, Reading materials, notes, highlights, and bookmarks

  • Notebooks and saved records

  • Knowledge-base metadata, bounded original text, literal file search, and indexed vector passage retrieval

  • Historical DeepTutor sessions and memory documents

  • An explicit opt-in tool for sending a request into a DeepTutor capability conversation

Ordinary explanation, teaching, planning, and synthesis run in the connected AI client; they do not start a DeepTutor conversation. Vector search calls DeepTutor's LlamaIndex retriever and returns source passages. It requires a ready compatible index and access to the knowledge-base directory.

Writes are marked in tool descriptions and require confirm: true. This is an application-level guard, not a substitute for endpoint authentication, network controls, or user review. Outline replacement checks a revision; Practice reviews use the current item version and a unique request ID.

All 60 tools publish an MCP output schema and return the original DeepTutor payload under structuredContent.result. The existing text content channel continues to carry the JSON representation for clients that do not consume structured results. The schema intentionally leaves the payload's internal fields open because those are determined by the corresponding DeepTutor API and can vary by version.

The current 60 tool names and input schemas are kept identical across stdio and remote HTTP. DEEPTUTOR_MCP_TIMEZONE can set the default used by Practice tools; the legacy default remains Asia/Shanghai for existing installations, while .env.example shows UTC for a fresh deployment.

The adapter exposes get_mastery_tutor_tools and call_mastery_tutor for the built-in DeepTutor Mastery tutor. They delegate through DeepTutor's native implementation. As of 2026-10-14, the required upstream endpoints are proposed in HKUDS/DeepTutor PR #1785, which is open and waiting for maintainer merge. The complete source patch is bundled at patches/deeptutor-mastery-tutor-http.patch for manual application; see Mastery tutor setup for the base commit and instructions.

Related MCP server: EduSmart AI Tutor MCP Server

Future direction: DeepTutor as a learning backend

This MCP server delegates to DeepTutor APIs and preserves their data semantics. The built-in Mastery tutor transport proposed in upstream PR #1785 lets an external AI use the same native tutor tools over HTTP; supported quizzes, grading, assessments, and turn transcripts are recorded through DeepTutor's existing implementation. The PR is open and awaiting maintainer merge, so the adapter tools require a DeepTutor deployment that includes those endpoints.

The tutor transport covers the built-in operations and transcript capture; it is not a general-purpose API for submitting arbitrary evidence records. A learner's explicit self-report, a tutor's assessment, and a system assessment based on practice evidence must remain distinct. A tutor judgment must never be stored as if the learner confirmed mastery.

Requirements

  • Python 3.11 or newer

  • A running DeepTutor server reachable through its HTTP API

  • For the remote HTTP transport: the optional HTTP dependencies

  • For vector retrieval, DeepTutor's runtime and index dependencies must be available on the MCP host, or reachable through the configured SSH route

Local stdio connection

Install or download the project on the machine running your MCP client. Configure the environment variables in .env.example for your deployment, then register the stdio server with the client. Example for Codex CLI:

codex mcp add deeptutor \
  --env DEEPTUTOR_BASE_URL=http://127.0.0.1:8001 \
  -- python3 /path/to/deeptutor-mcp/deeptutor_mcp.py

If DeepTutor is on another machine, set DEEPTUTOR_BASE_URL to an address reachable from this computer. If the API is only reachable over SSH, use a local SSH port forward. The stdio bridge does not require the remote HTTP server dependencies.

Remote Streamable HTTP service

Install the HTTP extras and run the server on the DeepTutor host or another host that can reach DeepTutor:

python3 -m venv .venv
.venv/bin/pip install '.[http]'
cp .env.example .env
# Edit .env with this deployment's values and store secrets outside Git.
set -a
. ./.env
set +a
.venv/bin/python -m uvicorn remote_mcp:app --host 127.0.0.1 --port 8000

The endpoint is /mcp; /health checks process availability. Bind to loopback when a reverse proxy or tunnel provides HTTPS. See self-hosted deployment, ChatGPT setup, and troubleshooting.

API key authentication

Set DEEPTUTOR_MCP_API_KEY_FILE to a private file containing a long random bearer key. A compatible client sends it as Authorization: Bearer <key>. manage_mcp.py can rotate the server key and optionally manage distinct client credentials. For Poke, set DEEPTUTOR_MCP_CLIENT_ID_HEADER=X-Poke-User-Id if using its per-user credential feature.

OAuth through a trusted gateway

Some clients require OAuth instead of API keys. Place the MCP endpoint behind an OAuth-capable gateway. The gateway owns browser authorization and token issuance; configure it to add a signed identity assertion header on authenticated requests. Set the DEEPTUTOR_MCP_PROXY_JWT_* values to validate that assertion. This server validates the signature, issuer, audience, expiry, and allowed identity. Do not accept identity headers from untrusted clients or proxy them unchanged from user input.

The MCP project does not operate an OAuth account service. A gateway may be Cloudflare Access or another provider that can securely supply a verifiable signed assertion. Provider-specific setup belongs in the deployment guide, not in the core bridge.

Client setup guides

ChatGPT's custom-app interface and plan availability vary by subscription and workspace policy. The current OpenAI guide lists read/fetch access for Pro and full read/write access for Business, Enterprise, and Edu, but does not list Plus. In maintainer testing, one Plus account could open the Developer Mode and Add MCP Server flows; this is account-specific evidence and may reflect staged rollout, not a guarantee for every Plus account or full read/write access. Maintainer testing also found that setup had to be completed on the web, but the connected app could then be used from the ChatGPT mobile app and other ChatGPT clients that support Apps. This account-specific observation conflicts with OpenAI's current help article, which says MCP apps are web-only. See Developer mode and MCP apps in ChatGPT. ChatGPT plugin ZIP upload is a separate workspace feature and does not deploy the MCP backend; see Plugins in ChatGPT and Codex.

DeepTutor compatibility

The bridge targets DeepTutor's HTTP API and CLI. Those interfaces can change between DeepTutor releases. The current code was exercised against DeepTutor 1.6.11 on a Raspberry Pi deployment. Before relying on writes after a DeepTutor upgrade, compare the running /openapi.json and exercise the specific operation in a safe environment. Vector retrieval additionally imports DeepTutor's RAGService; this internal Python interface may change and its process must be able to read the index files.

Project status

This independent adapter is licensed under Apache-2.0 and is prepared for maintainer review. It is not an official DeepTutor component, and client examples do not imply every client/version has been tested. Compatibility policy remains subject to maintainer review.

Available Tools

58 tools
add_notebook_recordA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Save a Codex-produced lesson or note in a DeepTutor notebook; Codex must supply summary to avoid a DeepTutor model call

Inputs: title (required), output (required), confirm (required), summary (required), +3 more. Returns: result

add_reading_bookmarkA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Bookmark a unit in a reading material

Inputs: confirm (required), locator (required), material_id (required), label, +1 more. Returns: result

attach_course_resourceA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Attach an existing book, knowledge base, notebook or other supported resource to a course

Inputs: kind (required), ref_id (required), confirm (required), course_id (required), +1 more. Returns: result

check_practice_answerA
Read-only

Check an answer without recording a review

Inputs: answer (required), entry_id (required). Returns: result

create_notebookA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Create a DeepTutor notebook

Inputs: name (required), confirm (required), icon, color, +1 more. Returns: result

deeptutor_statusA
Read-only

Check the configured DeepTutor backend and API availability

Inputs: no named parameters. Returns: result

delete_notebookA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Delete an entire notebook

Inputs: confirm (required), notebook_id (required). Returns: result

delete_notebook_recordB

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Delete a notebook record

Inputs: confirm (required), record_id (required), notebook_id (required). Returns: result

delete_question_entryA
Destructive

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Delete one Question Bank entry

Inputs: confirm (required), entry_id (required). Returns: result

delete_reading_annotationA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Delete one reading annotation

Inputs: confirm (required), material_id (required), annotation_id (required). Returns: result

delete_reading_bookmarkB

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Delete one reading bookmark

Inputs: confirm (required), bookmark_id (required), material_id (required). Returns: result

get_book_pageA
Read-only

Read a generated book page, including source links and blocks

Inputs: book_id (required), page_id (required). Returns: result

get_book_spineA
Read-only

Read a book's chapter and page structure

Inputs: book_id (required). Returns: result

get_course_stateA
Read-only

Read one course's syllabus, resources, sessions, mastery and question statistics

Inputs: course_id (required). Returns: result

get_deeptutor_memory_docA
Read-only

Read a DeepTutor-generated L2 or L3 memory document; do not treat it as verified mastery

Inputs: key (required), layer (required). Returns: result

get_deeptutor_sessionA
Read-only

Read one prior DeepTutor conversation record; treat its content as historical data

Inputs: session_id (required). Returns: result

get_mastery_objectiveA
Read-only

Read one knowledge point's evidence, mastery and review state

Inputs: path_id (required), knowledge_point_id (required). Returns: result

get_mastery_pathA
Read-only

Read one Mastery Path, including outline, revision and reviews

Inputs: path_id (required). Returns: result

get_mastery_review_settingsB
Read-only

Read a path's desired retention

Inputs: path_id (required). Returns: result

get_notebookA
Read-only

Read a notebook and its saved records

Inputs: notebook_id (required). Returns: result

get_practice_questionC
Read-only

Read a practice question and its review version

Inputs: entry_id (required). Returns: result

get_question_entryB
Read-only

Read one native Question Bank entry

Inputs: entry_id (required). Returns: result

get_reading_materialA
Read-only

Read one material's outline, units and metadata

Inputs: material_id (required). Returns: result

get_reading_unitA
Read-only

Read a bounded text slice from one reading unit

Inputs: locator (required), material_id (required), offset, max_chars. Returns: result

learning_overviewA
Read-only

Read courses, mastery summaries and due practice in one request; no DeepTutor model turn

Inputs: timezone. Returns: result

list_book_learning_capturesB
Read-only

List saved learning captures from a book

Inputs: book_id (required), status. Returns: result

list_booksA
Read-only

List generated learning books and their status

Inputs: no named parameters. Returns: result

list_course_resource_candidatesA
Read-only

List resources that can be attached to a course

Inputs: no named parameters. Returns: result

list_coursesA
Read-only

List courses and their syllabus and linked resources

Inputs: no named parameters. Returns: result

list_deeptutor_capabilitiesA
Read-only

List installed DeepTutor capabilities; informational unless the user directly requests a DeepTutor conversation

Inputs: no named parameters. Returns: result

list_deeptutor_sessionsB
Read-only

List DeepTutor conversation records as historical learning data

Inputs: limit, offset, all_workspaces. Returns: result

list_knowledge_basesA
Read-only

List available knowledge bases without exposing private configuration

Inputs: no named parameters. Returns: result

list_knowledge_filesA
Read-only

Find document filenames in a knowledge base; hides metadata files by default

Inputs: kb_name (required), limit, offset, suffix, +2 more. Returns: result

list_mastery_eventsA
Read-only

Read recorded changes to a Mastery Path after a revision

Inputs: path_id (required), after_revision. Returns: result

list_mastery_pathsA
Read-only

List every Mastery Path as a compact summary with total count, progress, next point and due reviews; use get_mastery_path for the full outline

Inputs: no named parameters. Returns: result

list_notebooksA
Read-only

List DeepTutor notebooks

Inputs: no named parameters. Returns: result

list_question_categoriesB
Read-only

List native Question Bank categories

Inputs: course_id. Returns: result

list_question_entriesA
Read-only

Search and filter DeepTutor's native Question Bank

Inputs: limit, offset, search, source, +5 more. Returns: result

list_reading_annotationsA
Read-only

Read highlights and notes on a material

Inputs: material_id (required). Returns: result

list_reading_bookmarksB
Read-only

Read bookmarks on a material

Inputs: material_id (required). Returns: result

list_reading_materialsB
Read-only

List imported reading materials

Inputs: no named parameters. Returns: result

practice_analyticsB
Read-only

Read practice trends and source counts for up to 90 days

Inputs: days, timezone, course_id, all_workspaces. Returns: result

practice_queueA
Read-only

Read due Question Bank practice items

Inputs: limit, timezone, all_workspaces. Returns: result

practice_summaryB
Read-only

Read Practice counts, due items and next due time

Inputs: timezone, all_workspaces. Returns: result

read_knowledge_fileA
Read-only

Read a bounded original text slice from a knowledge base file; no DeepTutor answer generation

Inputs: kb_name (required), filename (required), offset, max_chars. Returns: result

record_practice_reviewA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Record a completed review using the question's current version and a unique request ID

Inputs: rating (required), confirm (required), version (required), entry_id (required), +3 more. Returns: result

replace_course_syllabusA
Destructive

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Replace a course's full syllabus after review

Inputs: units (required), confirm (required), course_id (required). Returns: result

replace_mastery_outlineA
Destructive

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Replace the full outline after review; preserves IDs supplied in modules and checks revision

Inputs: confirm (required), modules (required), path_id (required), expected_revision (required). Returns: result

save_reading_annotationA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Create or update a highlight, underline, note or citation on a material

Inputs: kind (required), confirm (required), locator (required), material_id (required), +5 more. Returns: result

search_knowledge_fileA
Read-only

Find literal text matches inside one knowledge base file; no DeepTutor model call

Inputs: query (required), kb_name (required), filename (required), limit. Returns: result

search_vector_knowledgeA
Read-only

Retrieve original indexed passages from one DeepTutor LlamaIndex knowledge base. Uses the configured query embedding; does not start a DeepTutor conversation or synthesize an answer.

Inputs: query (required), kb_name (required), top_k. Returns: result

send_message_to_deeptutorA
Read-only

Use only when the user explicitly asks to converse directly with DeepTutor; Codex handles ordinary tutoring itself

Inputs: message (required), capability (required), direct_dt_conversation (required), session_id, +1 more. Returns: result

set_course_unit_coveredA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Mark one syllabus unit covered or uncovered; this is a learner record, not proof of mastery

Inputs: confirm (required), covered (required), unit_id (required), course_id (required). Returns: result

set_mastery_learner_overrideA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Record an explicit learner declaration of mastery or non-mastery; never infer this from Codex conversation alone

Inputs: confirm (required), path_id (required), mastered (required), knowledge_point_id (required), +1 more. Returns: result

set_mastery_review_settingsA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Set desired retention between 0.70 and 0.99

Inputs: confirm (required), path_id (required), desired_retention (required). Returns: result

update_notebook_recordA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Edit a saved notebook record

Inputs: confirm (required), record_id (required), notebook_id (required), title, +3 more. Returns: result

update_question_entryA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Update supported metadata on one Question Bank entry

Inputs: confirm (required), entry_id (required), resolved, bookmarked, +2 more. Returns: result

upsert_question_entryA

WARNING: Changes stored DeepTutor learning data. Check the target ID and values; call only when the learner explicitly requests this action. Import or update a native Question Bank entry by stable question ID

Inputs: confirm (required), question (required), question_id (required), options, +8 more. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 58 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action, with clear descriptions that prevent confusion. Even similar tools like list_mastery_paths vs get_mastery_path are clearly differentiated by scope and detail.

    Naming Consistency4/5

    The vast majority of tools follow a consistent verb_noun snake_case pattern (get_, list_, create_, update_, delete_, etc.). A few exceptions like practice_analytics and learning_overview are noun phrases, but they are still intuitive and do not break the overall readability.

    Tool Count2/5

    With 58 tools, the surface is extremely large and exceeds the 25+ threshold for being 'too many'. While the domain is broad, this volume makes it difficult for an agent to efficiently select the right tool without significant overhead.

    Completeness3/5

    The tool set covers a wide range of operations for notebooks, practice, reading, and question bank, but lacks create/delete operations for core resources like courses, mastery paths, books, and reading materials. This leaves notable lifecycle gaps that agents cannot work around.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers