memrise-mcp 0.0.0-stage → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +208 -2
- package/dist/index.js +2661 -0
- package/package.json +56 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 volodymyrkoval
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,209 @@
|
|
|
1
|
-
#
|
|
1
|
+
# memrise-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Connect Claude to your Memrise account, so Claude knows which words you've learned, how well you know them, and which lessons they come from. Then it can quiz you, explain things using words you already know, or write practice texts at your level.
|
|
4
|
+
|
|
5
|
+
> **Unofficial.** This is a personal project, not made or endorsed by Memrise. It relies on the way Memrise's website works today, so it may stop working if Memrise changes something. Use it only with your own account, at your own risk.
|
|
6
|
+
|
|
7
|
+
## What you can ask
|
|
8
|
+
|
|
9
|
+
Once it's set up, just talk to Claude about your Memrise learning. For example:
|
|
10
|
+
|
|
11
|
+
- "Which Memrise lessons did I finish this month, and what were they about?"
|
|
12
|
+
- "Quiz me on the words from my last Memrise lesson."
|
|
13
|
+
- "Which of my Memrise words do I find difficult?"
|
|
14
|
+
- "What should I review today?"
|
|
15
|
+
- "Which words from my lesson about food am I still weak on?"
|
|
16
|
+
- "Which words have I only heard but not studied yet?"
|
|
17
|
+
- "Do I already know these words from Memrise: *(a few words in the language you are learning)*?"
|
|
18
|
+
- "Write me a short story using only words I've learned in Memrise."
|
|
19
|
+
|
|
20
|
+
Claude can only **read** your Memrise data. It never changes anything in your account: no reviews, no progress, no settings.
|
|
21
|
+
|
|
22
|
+
## What you need
|
|
23
|
+
|
|
24
|
+
- The [Claude Desktop app](https://claude.ai/download) on a Mac, Windows or Linux.
|
|
25
|
+
- A Memrise account that you log into with an **e-mail and password**. If you signed up with Google, set a password first, for example with "Forgot password" on Memrise's sign-in page.
|
|
26
|
+
- **Node.js**, a free program that runs this tool. Download the "LTS" version from [nodejs.org](https://nodejs.org) and install it like any other app.
|
|
27
|
+
|
|
28
|
+
## Set it up
|
|
29
|
+
|
|
30
|
+
1. **Open Claude's settings file.** In Claude Desktop, open **Settings → Desktop app** and click **Manage** next to **Extensions**. Under **Local MCP servers**, click **Edit config**. This opens (or shows you) a file called `claude_desktop_config.json`.
|
|
31
|
+
2. **Paste the connection details.** If the file is empty, or contains only `{}`, replace everything in it with:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"mcpServers": {
|
|
36
|
+
"memrise": {
|
|
37
|
+
"command": "npx",
|
|
38
|
+
"args": ["-y", "memrise-mcp"],
|
|
39
|
+
"env": {
|
|
40
|
+
"MEMRISE_USERNAME": "your-email@example.com",
|
|
41
|
+
"MEMRISE_PASSWORD": "your-memrise-password"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If the file already has an `"mcpServers"` section, add only the `"memrise": { … }` part inside it, and put a comma between it and the entry before it.
|
|
49
|
+
3. **Put in your own login.** Replace `your-email@example.com` and `your-memrise-password` with your Memrise e-mail and password. Keep the quotation marks.
|
|
50
|
+
4. **Save the file, then quit Claude completely** (on a Mac: **Claude → Quit**, or ⌘Q; on Windows: **File → Exit**, and if Claude keeps running, right-click its icon near the clock and choose **Quit**, or end it in Task Manager; on Linux: quit it from its menu or tray icon) **and open it again.**
|
|
51
|
+
5. **Try it.** Ask Claude: *"List my Memrise courses."*
|
|
52
|
+
|
|
53
|
+
The very first question takes a while, up to a minute or two: the tool downloads itself and then reads all your lessons once. After that, answers come quickly.
|
|
54
|
+
|
|
55
|
+
**Learning more than one language on Memrise?** Ask Claude to list your Memrise courses and note the number of the one you want. Then add a line with that number below your password, in the same file:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
"MEMRISE_LANGUAGE_PAIR_ID": "12345"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
(Put a comma at the end of the password line before it.) Save, quit and reopen Claude.
|
|
62
|
+
|
|
63
|
+
## Be gentle with Memrise
|
|
64
|
+
|
|
65
|
+
This tool uses Memrise's website the way the website itself does. Memrise doesn't offer this as an official service and has never said how much use is acceptable. Heavy use could get your account blocked, or this tool blocked for everyone. So the tool works slowly and politely on purpose: one request at a time, with pauses, and it remembers what it has already fetched instead of asking again.
|
|
66
|
+
|
|
67
|
+
You can help:
|
|
68
|
+
|
|
69
|
+
- **Don't ask Claude to check Memrise over and over in a loop**, or set up anything that does so automatically.
|
|
70
|
+
- **Your word list refreshes at most once an hour.** Words you learned in the last hour may not show up yet. That's intentional.
|
|
71
|
+
- **If Claude reports that Memrise asked us to slow down, stop** and try again later.
|
|
72
|
+
|
|
73
|
+
## Your privacy
|
|
74
|
+
|
|
75
|
+
- **Your password is stored in Claude's settings file** on your computer, as plain text. Anyone who can use your computer account could read it. Use a password you don't use anywhere else.
|
|
76
|
+
- **What Claude reads becomes part of your conversation.** Like anything else you share with Claude, your words and lessons are sent to Claude while you chat.
|
|
77
|
+
- **The tool keeps a copy of your learning data on your computer**, in a folder called `memrise-mcp` (on a Mac or Linux, inside the hidden `.cache` folder in your home folder; on Windows, inside `%LOCALAPPDATA%`), so it doesn't have to ask Memrise every time. It holds your words, your lessons and a login token, never your password.
|
|
78
|
+
- Nothing is sent anywhere else.
|
|
79
|
+
|
|
80
|
+
## If something goes wrong
|
|
81
|
+
|
|
82
|
+
- **Claude doesn't seem to know about Memrise.** Make sure you saved the settings file and *fully* quit and reopened Claude. Then open **Settings → Desktop app → Extensions: Manage**: `memrise` should appear under **Local MCP servers**. If it has a red **Failed** badge, click it and then **View logs** to see why, and check the next items.
|
|
83
|
+
- **"Could not sign in to Memrise".** Check the e-mail and password in the settings file. Try logging into memrise.com with the same details. If you signed up with Google, you may need to set a password first.
|
|
84
|
+
- **Claude says the Memrise tool failed to start.** Check that Node.js is installed: quit Claude, install Node.js from [nodejs.org](https://nodejs.org) (or reinstall it), and open Claude again. On Windows, if Node.js is installed and it still fails, change `"command": "npx"` and `"args"` in the settings file to:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
"command": "cmd",
|
|
88
|
+
"args": ["/c", "npx", "-y", "memrise-mcp"],
|
|
89
|
+
```
|
|
90
|
+
- **The first question timed out.** Just ask again. The tool keeps what it has already fetched, so each try gets further.
|
|
91
|
+
- **"Memrise asked us to slow down".** Memrise is rate-limiting the tool. The message says when to try again; wait until then.
|
|
92
|
+
- **"Another memrise-mcp process is still talking to Memrise".** Another program using the tool (for example a scheduled export) is busy. Wait a few minutes and ask again.
|
|
93
|
+
|
|
94
|
+
## Removing it
|
|
95
|
+
|
|
96
|
+
1. Open the settings file again (**Settings → Desktop app → Extensions: Manage → Local MCP servers → Edit config**) and delete the `"memrise": { … }` part. Save, then quit and reopen Claude.
|
|
97
|
+
2. Delete the tool's saved data: the `memrise-mcp` folder. On a Mac, it is inside the hidden `.cache` folder in your home folder: in Finder choose **Go → Go to Folder…**, type `~/.cache`, press Return, and move `memrise-mcp` to the Trash. On Windows, press **Windows+R**, type `%LOCALAPPDATA%`, press Enter, and delete the `memrise-mcp` folder. On Linux, run `rm -rf ~/.cache/memrise-mcp`.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Advanced
|
|
102
|
+
|
|
103
|
+
[](https://github.com/volodymyrkoval/memrise-mcp/actions/workflows/ci.yml)
|
|
104
|
+
|
|
105
|
+
Everything below is for developers and people using other AI tools. Running the server needs Node.js 22 or newer.
|
|
106
|
+
|
|
107
|
+
### Other MCP clients
|
|
108
|
+
|
|
109
|
+
The server speaks MCP over stdio; any MCP client can run it. For Claude Code:
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
claude mcp add memrise \
|
|
113
|
+
-e MEMRISE_USERNAME='<your-memrise-login>' \
|
|
114
|
+
-e MEMRISE_PASSWORD='<your-password>' \
|
|
115
|
+
-- npx -y memrise-mcp
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
To try it without a client: `npx @modelcontextprotocol/inspector -e MEMRISE_USERNAME=... -e MEMRISE_PASSWORD=... npx -y memrise-mcp`.
|
|
119
|
+
|
|
120
|
+
If a desktop app can't start the server, it may be launching it with a minimal `PATH`: use the absolute path of `npx` (`which npx`) as `command`.
|
|
121
|
+
|
|
122
|
+
### Updating and pinning
|
|
123
|
+
|
|
124
|
+
`npx -y memrise-mcp` runs the latest release from npm. To pin a version, use `memrise-mcp@0.1.2` instead, for example `"args": ["-y", "memrise-mcp@0.1.2"]`. `npx` caches what it downloads, so to move to a newer release change the version, or delete npx's cache (`rm -rf ~/.npm/_npx`) and restart the client. `npx -y memrise-mcp --version` prints the version and `npx -y memrise-mcp --help` the usage.
|
|
125
|
+
|
|
126
|
+
### Settings (environment variables)
|
|
127
|
+
|
|
128
|
+
| Variable | Meaning |
|
|
129
|
+
|----------|---------|
|
|
130
|
+
| `MEMRISE_USERNAME`, `MEMRISE_PASSWORD` | Your login. Required for any data call. |
|
|
131
|
+
| `MEMRISE_LANGUAGE_PAIR_ID` | Which course to read. Only needed if the account has several. |
|
|
132
|
+
| `MEMRISE_CACHE_DIR` | Cache folder (absolute path). Default: macOS and Linux `$XDG_CACHE_HOME/memrise-mcp`, else `~/.cache/memrise-mcp`; Windows `%LOCALAPPDATA%\memrise-mcp`. |
|
|
133
|
+
| `MEMRISE_WORDS_TTL_SECONDS` | How long the word list is cached. Default `3600`; `0` turns it off (debugging only). |
|
|
134
|
+
| `MEMRISE_DEBUG` | `1` writes debug lines to stderr. |
|
|
135
|
+
|
|
136
|
+
### Load and caching
|
|
137
|
+
|
|
138
|
+
- One request at a time, at least 0.3 s apart, across every process sharing the cache folder.
|
|
139
|
+
- Retries network errors and 5xx up to 3 attempts. On HTTP 429 it waits as long as `Retry-After` asks (60 s if absent), retries once, then fails and records a cooldown that every process respects. A wait over 2 minutes fails at once, and no cooldown lasts more than 24 hours.
|
|
140
|
+
- Cache: the login token until Memrise rejects it; details of completed lessons forever (a finished lesson never changes; incomplete ones are re-fetched); the word list for `MEMRISE_WORDS_TTL_SECONDS`.
|
|
141
|
+
- A cold cache costs about one request per completed lesson, plus one page per 50 words and one page per 20 lessons (completed and in-progress lessons are listed separately), plus 2 login requests when there is no saved token (none with one) and 1 more to find the course when `MEMRISE_LANGUAGE_PAIR_ID` is not set.
|
|
142
|
+
- Processes on the same cache folder share what they fetch: when two run at once, the one waiting for its turn uses a lesson or login token the other has just saved instead of asking for it again.
|
|
143
|
+
- A warm cache still lists the lessons again each time the server starts (one page per 20 lessons) and re-fetches unfinished lessons; it asks for nothing else until the word list expires.
|
|
144
|
+
- Cache folder contents: `session.json` (login token), `words-*.json` (word lists), `scenario-details/` (one file per lesson), `pacer.lock` and `pacer.json` (request pacing across processes), `rate-limit.json` (the 429 cooldown).
|
|
145
|
+
- For scheduled jobs, run `export` once a day and read the file instead of polling.
|
|
146
|
+
|
|
147
|
+
### Export
|
|
148
|
+
|
|
149
|
+
```sh
|
|
150
|
+
memrise-mcp export --out words.json [--state any|fully_learned_or_known] [--include-audio]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Writes your words, lessons and a `fetched_at` timestamp to one JSON file. It always fetches the word list fresh, then saves it to the cache shared with the server, so it also warms it.
|
|
154
|
+
|
|
155
|
+
### Tool reference
|
|
156
|
+
|
|
157
|
+
| Tool | What it does |
|
|
158
|
+
|------|--------------|
|
|
159
|
+
| `language_pairs_list` | Your language pairs and their ids. |
|
|
160
|
+
| `learnables_list` | Your words, with lessons and topics. Filter instead of paging (see below). Pages of 200 by default; when `truncated` is true, call again with `after_id` set to `next_after_id`. |
|
|
161
|
+
| `learnables_lookup` | Checks whether given words or phrases appear among your words (ignores case, accents, punctuation and one leading article; the article list is best-effort and covers English, Spanish, Portuguese, French, Italian and German, so for other languages only case, accents and punctuation are loosened). |
|
|
162
|
+
| `scenarios_list` | Your lessons, newest first. Filter with `type` (`completed` or `in_progress`) and `since` (see Dates below). |
|
|
163
|
+
| `scenario_learnables` | The words of one lesson. |
|
|
164
|
+
|
|
165
|
+
Each word comes back as `id` (Memrise's numeric id for the word, the same in every lesson), `word` (as written in the language you are learning) and `translation` (its meaning in your own language), with its growth level, lessons and topics. The `export` file uses the same keys.
|
|
166
|
+
|
|
167
|
+
**`learnables_list` filters.** All are optional, combine with AND, and apply before paging: `total` counts the matching words, and `after_id` continues inside the filtered list (an `after_id` that the filters exclude is an error). A filter that matches nothing gives `total: 0`. `limit` (default 200) is the page size.
|
|
168
|
+
|
|
169
|
+
| Parameter | Keeps |
|
|
170
|
+
|-----------|-------|
|
|
171
|
+
| `difficult`, `learned`, `known`, `heard` | Words where the flag is `true` (or, with `false`, words where it is `false`). |
|
|
172
|
+
| `due_before` | Words whose `next_review` is at or before this moment. Words with no `next_review` (never studied, or already known) are ignored. The result is ordered most overdue first (ascending `next_review`, ties by id); without `due_before` the usual order applies. A plain date `YYYY-MM-DD` means the end of that day, so "due today" is today's date. |
|
|
173
|
+
| `topic`, `lesson` | Words taught by a topic or lesson with that title. Whole words only, any case or accents: `food` matches "Food & Drink" but not "Seafood". Several words must appear next to each other, in order: `at the restaurant` matches "At the Restaurant 1". Words that no lesson teaches never match. When the text matches no topic (or lesson) at all, `warnings` gets one line such as `No topic matches "quantum physics". Topics: Basics, Food, Travel.`, listing up to 30 names sorted alphabetically (`(+N more)` after that); it is not added when the topic exists but other filters leave no word. |
|
|
174
|
+
| `min_growth_level`, `max_growth_level` | Words in that growth-level range, both ends included. The minimum must not be above the maximum. |
|
|
175
|
+
|
|
176
|
+
**Word fields added to every word row (`learnables_list`, `learnables_lookup`, `scenario_learnables`, `export`).**
|
|
177
|
+
|
|
178
|
+
- `heard` is Memrise's own flag that the word has been heard; Memrise does not document exactly what sets it, so nothing more is claimed. `heard: true` on a word that is not learned or known means it was only heard, never studied. Filter with `heard` to list such words.
|
|
179
|
+
- `next_review` is `null` unless the word is learned. Words never studied and words you marked as already known have none, whatever date Memrise holds for them, so they never count as due.
|
|
180
|
+
- `origin` says where the word comes from. `"lesson"`: a completed or in-progress lesson teaches it. `"other"`: none of your lessons teaches it. In practice these are words you have only heard (`heard: true`, not learned or known) from content outside your lessons; they have no `lessons` or `topics`, and `next_review` is `null` so they never look overdue. `"unknown"`: no lesson is linked to it, but some lesson could not be read in this response, so the link may only be missing; `warnings` says the lesson links are incomplete. Asking again once the lesson loads gives the right value. Words from `scenario_learnables` are always `"lesson"`.
|
|
181
|
+
|
|
182
|
+
**Dates.** `due_before` and `since` take either `YYYY-MM-DD` or a date-time that ends in `Z` or an offset such as `+01:00` (used exactly as given). A plain date is read in the time zone of the computer running the tool: `since` means the start of that day (inclusive), `due_before` the end of it. A date-time without a time zone, or something that is not a date, is rejected with a message that says how to fix it. `since` keeps lessons completed at or after that moment.
|
|
183
|
+
|
|
184
|
+
**`learnables_lookup` results.** Each term gets `met`, `match`, `items`, `in_sentences` (up to 5 longer phrases that contain the term; `in_sentences_total` counts them all) and `in_translations` (up to 5 words whose translation contains the term, for a term in your own language; `in_translations_total` counts them all). `match` is `exact` (a word equals the term), `in_sentence` (only longer phrases contain it), `translation` (nothing matched in the language you are learning, only a translation did) or `none`; `met` is true for everything but `none`. A word already listed under `items` or `in_sentences` is not repeated under `in_translations`. There is no stemming: if a conjugated or plural form is not found, try its dictionary form as well. Terms shorter than 3 characters, and a lone article, match whole words and whole translations only, never parts of longer phrases.
|
|
185
|
+
|
|
186
|
+
`state` (on word tools) is `any` (everything you have met, the default) or `fully_learned_or_known`. If some lesson details cannot be fetched, results still come back with a `warnings` field.
|
|
187
|
+
|
|
188
|
+
### Security details
|
|
189
|
+
|
|
190
|
+
- The password is read from the environment and never written to disk. Only a login token is cached, in `session.json`; anyone who can read it can read your Memrise data. On macOS and Linux the file mode is `0600` and the folder `0700`. Windows does not enforce these modes: there the token file is protected only by the default permissions of your user profile.
|
|
191
|
+
- Logs and errors never contain the username, password or tokens.
|
|
192
|
+
- The cache and export files hold learning data; don't share them.
|
|
193
|
+
|
|
194
|
+
### Development
|
|
195
|
+
|
|
196
|
+
```sh
|
|
197
|
+
npm install
|
|
198
|
+
npm test # offline unit tests
|
|
199
|
+
npm run test:realfs # real-filesystem tests: two processes sharing one cache folder
|
|
200
|
+
npm run smoke:startup # packs the server, starts it like npx does, lists the 5 tools
|
|
201
|
+
npm run typecheck
|
|
202
|
+
npm run build
|
|
203
|
+
npm run check-secrets
|
|
204
|
+
npm run check-versions # package.json, server.json and src/version.ts agree
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Developing needs Node.js 22.18 or newer (vitest 5 and tsup 9 require it); CI tests Node 22 and 24.
|
|
208
|
+
|
|
209
|
+
See [AGENTS.md](AGENTS.md) for contributor and AI-agent guidance. Test fixtures are invented data. `npm run smoke` runs a live check when credentials are set and is skipped otherwise.
|