mcp-server-maimemo

mcp-server-maimemo

Exposes the Maimemo (墨墨背单词) Open API as MCP tools, enabling AI assistants to look up words, manage mnemonics and study plans, and maintain cloud notepads.

Category
Visit Server

README

mcp-server-maimemo

An MCP (Model Context Protocol) server for the 墨墨背单词 (Maimemo) Open API. It exposes every documented API capability as a typed MCP tool, so AI assistants can look up words, manage mnemonics / interpretations / example sentences, maintain cloud notepads, and read or modify study plans.

CI


Highlights

  • Complete API coverage — 24 tools spanning all six documented resource groups.
  • Streamable HTTP transport — the current MCP spec, at POST /mcp. The deprecated HTTP+SSE transport is still served at GET /sse for older clients.
  • Per-request tokens — clients may send Authorization: Bearer <maimemo_token>, so one deployment can safely serve multiple users. Each session gets an isolated API client.
  • Built-in rate limiting — a multi-window sliding log shapes traffic to Maimemo's quotas (10s/20, 60s/40, 5h/2000 by default) instead of letting the model hit random 429s.
  • Retries, timeouts, and caching — exponential backoff with jitter on transient failures, per-request timeouts, and a bounded spelling → voc_id cache that removes redundant lookups.
  • Schema-validated inputs — tools are declared once as zod schemas and projected into JSON Schema, so advertised contracts and runtime validation cannot drift apart.
  • Actionable errors — failures come back as typed, human-readable isError results (auth, rate_limit, not_found, invalid_input, …) so the model can self-correct.

Tools

Group Tools
Vocabulary 单词 get_vocabulary, query_vocabularies
Notes 助记 list_notes, create_note, update_note, delete_note
Interpretations 释义 list_interpretations, create_interpretation, update_interpretation, delete_interpretation
Phrases 例句 list_phrases, create_phrase, update_phrase, delete_phrase
Notepads 云词本 list_notepads, get_notepad, create_notepad, update_notepad, delete_notepad
Study 学习数据 get_study_progress, get_today_items, query_study_records, add_words, advance_study

Word-scoped tools accept either word (a spelling, resolved automatically and cached) or a raw voc_id. Read-only tools are annotated with readOnlyHint, and delete tools with destructiveHint, so clients can gate them appropriately.


Getting a token

In the Maimemo app: 我的 → 更多设置 → 实验功能 → 开放 API


Quick start

git clone https://github.com/Mrquj/mcp-server-maimemo.git
cd mcp-server-maimemo
npm install
npm run build

cp .env.example .env   # then fill in MAIMEMO_API_TOKEN
npm start

Verify it is up:

curl http://localhost:3000/healthz

Docker

docker build -t mcp-server-maimemo .
docker run -p 3000:3000 -e MAIMEMO_API_TOKEN=your_token mcp-server-maimemo

Configuration

Variable Default Purpose
MAIMEMO_API_TOKEN — Maimemo Open API token. Required for stdio; optional for http when clients send their own.
MAIMEMO_REQUIRE_CLIENT_TOKEN true if no token is set Force every client to send Authorization: Bearer.
MAIMEMO_MCP_TRANSPORT http http or stdio.
PORT / HOST 3000 / 0.0.0.0 HTTP listener.
MAIMEMO_REQUEST_TIMEOUT_MS 20000 Per-request timeout.
MAIMEMO_MAX_RETRIES 3 Retry attempts for transient failures.
MAIMEMO_RATE_LIMITS 10s:20,60s:40,5h:2000 Client-side throttling windows.
MAIMEMO_API_BASE_URL https://open.maimemo.com/open/ Override the API base.

Invalid configuration fails fast at startup with an explicit message.


Connecting clients

Remote clients (Notion, and other hosted MCP clients)

Deploy behind HTTPS, then register the MCP server URL:

https://your-domain.example.com/mcp

If you set MAIMEMO_REQUIRE_CLIENT_TOKEN=true, configure the connection's Bearer token to your Maimemo API token. Otherwise the server falls back to MAIMEMO_API_TOKEN.

Local clients (Claude Desktop, and similar)

{
  "mcpServers": {
    "maimemo": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-server-maimemo/dist/index.js"],
      "env": {
        "MAIMEMO_MCP_TRANSPORT": "stdio",
        "MAIMEMO_API_TOKEN": "your_token_here"
      }
    }
  }
}

MCP Inspector

npm run inspect

Endpoints

Method Path Purpose
POST /mcp Streamable HTTP transport (initialize + requests).
GET /mcp Server-to-client notification stream for an existing session.
DELETE /mcp Terminate a session.
GET /sse Deprecated HTTP+SSE transport.
POST /messages Message sink for the deprecated SSE transport.
GET /healthz Liveness, version, session count, rate-limit usage.

Example calls

{ "name": "get_vocabulary", "arguments": { "word": "apple" } }
{ "name": "create_note", "arguments": { "word": "apple", "note_type": "谐音", "note": "阿派" } }
{ "name": "add_words", "arguments": { "spellings": ["apple", "banana"], "advance": true } }
{ "name": "get_study_progress", "arguments": {} }

Notepad content uses Maimemo's markup:

#DESC
Words from this week's reading
#LIST
apple
banana
cherry

Architecture

src/
  config.ts        Environment parsing and fail-fast validation
  errors.ts        Typed error hierarchy and HTTP status mapping
  rate-limiter.ts  Multi-window sliding-log throttle
  client.ts        Maimemo API client: retries, timeouts, voc_id cache
  tools.ts         zod schemas → JSON Schema + tool annotations
  handlers.ts      Validated dispatch to Maimemo endpoints
  server.ts        MCP server factory
  http.ts          Streamable HTTP + legacy SSE + health, graceful shutdown
  index.ts         Entry point and transport selection

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured