learning-mcp

learning-mcp

An MCP server that enforces a pedagogical workflow to teach topics step by step, using research, decomposition, and spaced retrieval practice.

Category
访问服务器

README

learning-mcp

An MCP server that teaches you a topic by enforcing a pedagogical workflow instead of suggesting one.

Ask a chat model to "teach me Kafka step by step" and it will agree, then quietly compress five steps into one. That isn't disobedience — it's what happens when the whole plan sits in context at once: the model can see step 5 while working step 1, so it hedges step 1 toward the finish and merges anything it judges redundant.

This server holds the steps instead. The next instruction does not exist in the model's context until it has handed back a valid artifact for the current one. Sequencing stops being a request and becomes a data dependency.

The workflow

research  ->  decompose  ->  drill (loop)  ->  done
  1. Research — build a comprehensive, cited picture of the topic.
  2. Decompose — break it into atomic elements, each with its prerequisites. The result is a DAG, not a list.
  3. Drill — the loop that actually teaches. One element at a time, chosen by what's unlocked, due, and weakest.

What makes it a tutor rather than a quiz

Retrieval practice over re-reading. The default action is to ask, wait, and grade. Explanation is the fallback after a miss, not the main event.

Escalating demand. Each element moves recall → explain_back → apply as it becomes familiar. You have to produce the idea, not recognize it.

Prerequisites are enforced. An element is only drillable once everything it depends on is mastered, so you're never quizzed on consumer groups before partitions.

Interleaving comes free. Once several elements are unlocked, the scheduler alternates rather than drilling one to exhaustion.

Spacing, and a gate that resists cramming. Reviews follow an SM-2 interval ladder. Mastery additionally requires that one success landed a full day after a previous one — three right answers in a single sitting is short-term memory, and the gate says so.

The answer has to be yours. During a drill the server suspends mid-call to collect your answer, which reaches the model as a tool result it did not author. It cannot ask a question and answer it on your behalf.

Running it

Requires MCP SDK 2.0+ — the drill loop uses MCPServer and the Resolve/Elicit round trip, neither of which exists in the 1.x FastMCP API.

Locally (start here)

This is the right choice for almost everyone. The server runs as a subprocess of your client, your data stays on your disk, and there is nothing to secure.

pip install learning-mcp          # or: pip install git+https://github.com/ryantthomas/learning-mcp
claude mcp add learning -- learning-mcp

Then ask it to teach you something.

With Docker

docker build -t learning-mcp .
docker run -p 8000:8000 \
  -v learning-data:/data \
  -e LEARNING_MCP_TOKEN="$(openssl rand -hex 32)" \
  learning-mcp

The volume is not optional. Every topic, element and review date lives in one SQLite file under /data. Without a persistent volume the container starts empty every time, and you won't notice until the day you come back to review.

On your own cloud

The Dockerfile is the only deploy artifact, deliberately — it works on Fly, Railway, Render, Cloud Run, or any VPS, and locks you into none of them. Two things actually matter:

  1. Attach a persistent volume and point LEARN_HOME at it (the image defaults to /data). Platforms with ephemeral filesystems will silently discard everything on restart.
  2. Set LEARNING_MCP_TOKEN. The server refuses to start on a non-loopback interface without one. That's a deliberate fail-closed, not an obstacle to work around — an open URL is a read/write handle on your entire learning history.

$PORT is honoured, so most platforms need no further configuration.

Authentication, honestly

LEARNING_MCP_TOKEN enables Authorization: Bearer <token> on the HTTP transport. Configuration is per-instance, and each person runs their own — there is no multi-user mode and no notion of accounts.

Client Works with a bearer token?
Local stdio (Claude Desktop, Claude Code) N/A — no network exposure
Claude Code against a remote URL Yes, via --header
Other CLI / custom MCP clients Yes, if they can send a header
claude.ai and the mobile apps No — the custom connector UI only accepts OAuth

That last row is worth reading twice if your goal is studying on your phone. Claude's custom connector settings expose Authorization URL, Token URL, Client ID and Client Secret — there is no field for a static token or custom header. A bearer-token server cannot be registered there. Making that work needs a real OAuth authorization server; the SDK supports it via auth_server_provider, but this project doesn't implement one yet.

Where your data lives

Everything is under ~/.learn (override with LEARN_HOME). SQLite is the source of truth; markdown is a projection of it, so a topic stays readable and greppable without the tool.

~/.learn/
  learn.db
  topics/kafka/
    research.md
    elements/01-partitions.md
    progress.md

A hosted instance moves this off your machine. The markdown mirror ends up on the server, where you can't grep or commit it. If those local files are the point for you, run stdio locally instead of deploying.

The schema is deliberately graph-shaped — prerequisites and concepts are their own tables, never JSON on a row — so a Neo4j projection later is an export rather than a rewrite. concepts is global while elements are topic-scoped, which is the seam that will let "partitioning" learned under Kafka count for itself again under Kinesis.

Design

The pedagogy lives in steps.py, mastery.py, and scheduler.py, none of which import mcp. That's deliberate: the teaching logic is a plain Python library that happens to be served over MCP, so it can be unit-tested without a model in the loop and re-fronted without a rewrite.

server.py is a thin adapter. Every advance requires the previous step's artifact as an argument — the model cannot obtain step N+1 without paying for step N.

Development

pip install -e ".[dev]"
pytest

The two tests worth knowing about, because they encode the whole point:

  • the gate — a malformed artifact must not advance the phase
  • concealment — a step's response must not contain any later step's text

License

MIT.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选