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
访问服务器

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

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选