Skip to main content
Glama
Personalized Learning Tutor MCP

Personalized Learning Tutor MCP

by ameenah-syed
README.md
# Personalized Learning Tutor MCP

**A source-grounded teaching and learning MCP server for AI hosts.** It helps a connected model turn a concept or reading excerpt into a personalized lesson, alternate learning views, formative practice, and useful feedback.

> Give the learner a choice of ways into an idea. Keep every view tied to the same source. Use their answers to decide what to teach next.

This project is an independent, community-built implementation inspired by Google's *Learn Your Way* research. It is not an official Google product and is not affiliated with or endorsed by Google.

## Why this MCP exists

A static explanation is rarely the best explanation for every learner. The *Learn Your Way* work describes a two-stage approach: personalize source material to a learner, then derive multiple representations from that personalized material. It also uses quizzes and learner responses to help guide the experience. This MCP brings those ideas into a reusable, provider-neutral Model Context Protocol server.

The server gives an AI host structured pedagogical instructions. The connected host model produces the actual lesson or practice interaction. The MCP itself does not contain a model, call a model API, browse for sources, or store lesson content.

## Design principles

1. **Source first.** User-provided material is treated as the authority for claims. The model is instructed to distinguish source claims from explanatory additions, preserve caveats, and say when the material is incomplete.
2. **Personalize, then transform.** Learner level, goals, existing knowledge, interests, and preferred style shape the initial explanation. Alternate representations can then build on that explanation while remaining aligned to the source.
3. **Give learners agency.** A learner can request the format that helps: a worked example, a mind map, flashcards, a dialogue, or another supported view.
4. **Use active retrieval.** Lessons and quizzes ask learners to recall, explain, apply, compare, or predict, rather than relying only on passive reading.
5. **Make feedback diagnostic.** Feedback recognizes sound reasoning, names a specific gap, and offers a next step. It is not a grade or a judgment of ability.
6. **Respect cognitive load.** The framework encourages chunking, plain-language definitions, careful use of examples, and focused follow-up questions.
7. **Keep the learner in control.** This server is stateless: it does not save profiles, answers, or source text. The MCP host and its model provider may have their own data-handling policies; review those separately.

## What it provides

| MCP tool | What it does |
| --- | --- |
| `start_lesson` | Builds a tailored lesson brief from a topic, source excerpt, learning goal, learner context, and known challenge. It asks for a short first lesson and a retrieval question, then pauses for the learner. |
| `create_learning_view` | Re-expresses the same material as an analogy, worked example, mind map, comparison, step-by-step process, timeline, flashcards, slide outline, teacher–student dialogue, or plain-language version. |
| `make_practice_quiz` | Creates source-grounded formative practice, with difficulty and question format options. The host is directed to present questions one at a time and adapt based on answers. |
| `give_formative_feedback` | Responds to one learner answer with specific, source-based feedback and a repair or extension question. |
| `learning_framework` | Returns the teaching contract that guides all the other tools. |

The tools return explicit instructions and input context to the connected host model. They do not return generated lesson content directly from the server. This separation makes the MCP usable with different MCP-compatible AI clients and model providers.

## Requirements

- Node.js 20 or newer
- An MCP-compatible host that can launch a local stdio server
- A model enabled in that host to generate the lesson from the returned tool instructions

## Install from source

```bash
git clone https://github.com/ameenah-syed/personalized-learning-tutor-mcp.git
cd personalized-learning-tutor-mcp
npm install
```

Start the server:

```bash
npm start
```

MCP hosts normally launch it automatically using the configuration below. `npm start` is useful for checking that the process starts; stdio servers wait for an MCP client and do not print a chat interface.

## Configure an MCP host

The following is a local configuration example. Replace the path with the absolute path to your clone. Make sure the host launches the server from the project directory so `npx` can find the installed dependencies.

### Claude Desktop / compatible JSON config

```json
{
  "mcpServers": {
    "personalized-learning-tutor": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/personalized-learning-tutor-mcp/src/index.ts"],
      "cwd": "/absolute/path/personalized-learning-tutor-mcp"
    }
  }
}
```

Some hosts do not support `cwd`. For those, use the full path to the local `tsx` executable under `node_modules/.bin/tsx`, or run a built JavaScript entry point from an absolute path.

### VS Code

Add an `.vscode/mcp.json` file to a workspace (use your own absolute path):

```json
{
  "servers": {
    "personalized-learning-tutor": {
      "type": "stdio",
      "command": "npx",
      "args": ["tsx", "/absolute/path/personalized-learning-tutor-mcp/src/index.ts"],
      "cwd": "/absolute/path/personalized-learning-tutor-mcp"
    }
  }
}
```

Host configuration formats change over time. Consult your client’s current MCP documentation if it expects a different config shape.

## Example interaction

1. Ask your AI host: “Teach me the central limit theorem using this course excerpt. I understand averages but get confused about sampling distributions. Use a simple analogy, then ask me one question and wait.”
2. The host can call `start_lesson` with the excerpt and your learner context.
3. After the explanation, ask for `create_learning_view` with `view: "worked_example"` or `view: "mind_map"` to see the same structure another way.
4. Use `make_practice_quiz` for retrieval and application questions.
5. Submit an answer to `give_formative_feedback` and continue from the identified gap.

For best source fidelity, provide a relevant excerpt and any page, section, or lecture-slide labels. Do not paste confidential or restricted material into an AI host unless you are permitted to do so.

## Tool input notes

- `sourceText` is required for lesson, representation, and quiz tools. It accepts up to 60,000 characters; use a relevant excerpt instead of an entire textbook.
- `learnerContext` is optional. It can include course level, prior knowledge, accessibility needs, or learning preferences. Share only what you are comfortable providing to your AI host.
- `personalizedText` is optional in `create_learning_view`. Passing the lesson explanation helps keep a new view aligned with the first one.
- `expectedPrinciples` can guide feedback, but the tool explicitly tells the model to check it against the source.
- Tool calls are stateless. To continue an interaction, the host must include the needed source and answer again.

## Development

```bash
npm install
npm start
```

For interactive local exploration, use the MCP Inspector:

```bash
npm run inspect
```

The server uses the official TypeScript MCP SDK and Zod schemas for validated tool inputs. The stdio transport uses stdout for MCP protocol messages; do not add `console.log` debugging to the server. Use stderr (`console.error`) for diagnostics.

## Current scope and limitations

- This is a pedagogical workflow scaffold, not a standalone AI tutor. The host model controls the generated content and its quality.
- Source grounding depends on the model and host. Always check important explanations against the original course material.
- The current version accepts text excerpts; it does not parse PDFs, retrieve web pages, synthesize audio, or render images.
- Visual and audio representations are requested as text structures (for example, a mind-map outline or narration script). Rendering them is the host application's responsibility.
- The framework draws on research-informed design ideas. This repository has not itself been evaluated in a learning efficacy study, and its results should not be equated with those reported for Learn Your Way.

## Research foundation and acknowledgements

This project is grateful to the LearnLM Team at Google for publishing the research behind *Towards an AI-Augmented Textbook*, and to Gal Elidan and Yael Haramaty for explaining the work and its pedagogy in the Google Research article *Learn Your Way: Reimagining textbooks with generative AI*. The ideas that most directly inform this project are source-preserving personalization, multiple learner-selectable representations, and formative assessment that can guide what happens next.

The paper reports an experimental system and evaluations. This repository is an independent software project inspired by that work; it does not reproduce Google's system, model pipeline, user interface, or study. We also thank the authors and researchers cited in the paper and article whose work informs the broader learning-science ideas they discuss, including dual coding, personalization, self-regulated learning, and formative assessment.

### Primary sources

- LearnLM Team, Google. (2025). [*Towards an AI-Augmented Textbook*](https://arxiv.org/abs/2509.13348) (arXiv:2509.13348; v4, September 30, 2025). [PDF](https://arxiv.org/pdf/2509.13348). The paper is © 2025 Google; all rights reserved.
- Gal Elidan and Yael Haramaty, Google Research. (2025, September 16). [*Learn Your Way: Reimagining textbooks with generative AI*](https://research.google/blog/learn-your-way-reimagining-textbooks-with-generative-ai/).
- [Learn Your Way](https://learnyourway.withgoogle.com/) — Google's research experience referenced by the article.
- [Model Context Protocol TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) — official SDK used to implement the server.
- [Zod](https://github.com/colinhacks/zod) — schema validation library used for tool inputs.

Please cite the primary sources when discussing the research framework. This project's MIT license applies to this repository's original code and documentation; it does not change the paper's or Google's other materials' copyrights or licenses.

## Contributing

Contributions are welcome, especially improvements to tool descriptions, accessibility, source-fidelity safeguards, host setup guides, and additional evidence-informed learning workflows. Please open an issue before a large feature so the scope can be discussed. Keep changes provider-neutral, avoid collecting learner data, and document the research or design rationale for new pedagogical behaviors.

## License

The original code and documentation in this repository are released under the [MIT License](LICENSE). See the acknowledgements above for third-party attribution and the paper's separate copyright status.

TDQS

A3.7/5.0

Scored across 5 tools

Disambiguation4/5

Each tool maps to a distinct pedagogical step: lesson brief, alternate representation, quiz, feedback, and a meta framework reference. The only soft overlap is between start_lesson and create_learning_view, since both take a source-grounded concept and reshape it, but the descriptions distinguish planning/teaching from representation choice.

Naming Consistency4/5

Four of five names follow a verb_noun pattern (start_lesson, create_learning_view, make_practice_quiz, give_formative_feedback), though verbs vary (start/create/make/give). learning_framework breaks the pattern by being a bare noun phrase, a minor deviation that is still readable.

Tool Count5/5

Five tools is well-scoped for a stateless tutoring-prompt server, and each one covers a distinct part of the teaching loop rather than duplicating functionality. Nothing feels padded or missing at the count level.

Completeness4/5

The surface covers the core instructional cycle: lesson planning, multiple representations, active practice, and formative feedback, plus a framework contract tool. Gaps are minor — there is no tool for tracking learner progress or sequencing a multi-lesson curriculum, but those may be intentionally out of scope.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues