Skip to main content
Glama
multilingual-dictionary-mcp

multilingual-dictionary-mcp

by Eyalm321

多语言词典 MCP

一个用于多语言词典查询及词汇关系的 MCP 服务器——包括同义词、反义词、上位词、下位词、部分词、翻译、词源、定义、押韵等——通过整合三个免费公共 API,覆盖所有语言:

  • ConceptNet — 多语言语义网络(80 多种语言,词汇关系:同义词、反义词、IsA、PartOf、RelatedTo、DerivedFrom 等)

  • Wiktionary — 4000 多种语言的定义、词源和发音

  • Datamuse — 仅限英语的实用工具(押韵、同音词、“意思相近”、拼写模式、上下文触发词)

无需 API 密钥。无需捆绑数据。只需将其插入 Claude(或任何 MCP 客户端),即可查询任何语言的词汇。


安装

通过 npm

npm install -g multilingual-dictionary-mcp

通过 GitHub Packages

npm install -g @eyalm321/multilingual-dictionary-mcp --registry=https://npm.pkg.github.com

Claude Desktop / Claude Code 配置

{
  "mcpServers": {
    "multilingual-dictionary": {
      "command": "npx",
      "args": ["-y", "multilingual-dictionary-mcp"]
    }
  }
}

Related MCP server: word-orb

工具

多语言词汇关系 (ConceptNet)

所有这些工具都接受 word(单词)、ISO 639-1 language(语言)代码(默认为 en)以及 limit(限制)。适用于英语、西班牙语、法语、德语、意大利语、俄语、希伯来语、阿拉伯语、拉丁语、中文、日语等 70 多种语言。

工具

描述

dictionary_synonyms

意思相近的词

dictionary_antonyms

反义词

dictionary_related

松散关联的词(RelatedTo 边)

dictionary_hypernyms

更广泛/父级概念(狗 → 哺乳动物)

dictionary_hyponyms

更具体/子级概念(狗 → 贵宾犬)

dictionary_meronyms

部分/组件(汽车 → 车轮)

dictionary_holonyms

包含此项的整体(车轮 → 汽车)

dictionary_derived_from

词源词根

dictionary_etymologically_related

跨语言的同源词和共享词根

dictionary_used_for

典型用途(刀 → 切割)

dictionary_capable_of

典型动作(狗 → 吠叫)

dictionary_at_location

典型位置(书 → 图书馆)

dictionary_translate

跨语言同义词 — 翻译单词

dictionary_all_relations

一次调用获取单词的所有关系

定义与词源 (Wiktionary)

工具

描述

dictionary_lookup

按语言分组的定义(通过 en.wiktionary 支持 4000 多种语言)

dictionary_summary

来自任何 Wiktionary 版本的简短纯文本摘要

dictionary_etymology

词源部分,纯文本

dictionary_pronunciation

发音部分(通常为 IPA)

dictionary_search

在 Wiktionary 版本中搜索匹配页面

dictionary_random

来自任何 Wiktionary 版本的随机单词

英语专用工具 (Datamuse)

工具

描述

dictionary_rhymes

完全或近乎押韵的词

dictionary_sounds_like

同音词 / 听起来相似的词

dictionary_means_like

基于机器学习的“意思大致相同” — 比同义词范围更广

dictionary_spelled_like

使用 ? 和 * 通配符的拼写模式

dictionary_suggest

自动补全

dictionary_triggers

统计学上关联的词(牛 → 牛奶、农场)

dictionary_follows

通常跟在后面的词(喝 → 咖啡)

dictionary_precedes

通常出现在前面的词(观众 → 俘虏)

缓存管理

工具

描述

dictionary_cache_stats

检查内存中响应缓存的命中/未命中/大小情况

dictionary_cache_clear

通过清除缓存强制进行新的上游查询


缓存

每次成功的上游响应都会在服务器进程的生命周期内缓存在内存中,并以完整的请求 URL 作为键。同一会话内的后续相同调用将立即返回,而无需再次访问 ConceptNet/Wiktionary/Datamuse。

  • 默认 TTL:24 小时

  • 默认最大条目数:5000(LRU 淘汰机制)

  • dictionary_random 禁用缓存(因为它本应是随机的)

  • 无磁盘持久化 — 缓存会在每次服务器启动时重建

通过环境变量进行调整:

MDM_DISABLE_CACHE=true        # turn caching off
MDM_CACHE_TTL_MS=3600000      # 1 hour TTL
MDM_CACHE_MAX_ENTRIES=10000   # bigger cache

示例

> What are the synonyms of "feliz" in Spanish?
[uses dictionary_synonyms with language: "es"]

> Translate "happiness" into Hebrew
[uses dictionary_translate with language: "en", targetLanguage: "he"]

> What's the etymology of the word "serendipity"?
[uses dictionary_etymology]

> Find me words that rhyme with "orange"
[uses dictionary_rhymes]

> What are the parts of a bicycle?
[uses dictionary_meronyms with word: "bicycle"]

开发

npm install
npm run build      # TypeScript compile
npm test           # vitest run
npm run test:watch # vitest watch
npm run dev        # ts-node entry point

项目布局

src/
├── index.ts            # MCP server entry
├── client.ts           # HTTP wrappers for ConceptNet / Wiktionary / Datamuse
├── tools/
│   ├── relations.ts    # ConceptNet-backed multilingual relation tools
│   ├── definitions.ts  # Wiktionary-backed definition/etymology tools
│   └── english.ts      # Datamuse-backed English utilities
└── __tests__/          # vitest specs

CI / 发布

  • CI 在每次推送到 main 分支以及提交 PR 时运行,基于 Node 20 和 22。

  • 发布 在发布 GitHub Release 时运行 — 执行测试、构建,然后发布到 npm(作为 multilingual-dictionary-mcp)和 GitHub Packages(作为 @eyalm321/multilingual-dictionary-mcp)。

发布步骤:

  1. 在 package.json 中增加 version 并提交。

  2. 打标签并推送(例如 git tag v0.1.1 && git push --tags)。

  3. 创建指向该标签的 GitHub Release — 发布工作流将处理其余事项。

发布工作流需要两个仓库密钥:NPM_TOKEN(npm 自动化令牌)和 GITHUB_TOKEN(由 GitHub Actions 自动提供)。


许可证

MIT © Eyalm321

Available Tools

28 tools
dictionary_all_relationsC

All edges (every relation type) for a word in one call from offline ConceptNet.

Inputs: word (required), limit, language.

dictionary_antonymsB

Get antonyms (opposites) for a word in any language using offline ConceptNet.

Inputs: word (required), limit, language.

dictionary_at_locationB

Typical locations (AtLocation) via offline ConceptNet. E.g. book -> library.

Inputs: word (required), limit, language.

dictionary_capable_ofB

Typical actions (CapableOf) via offline ConceptNet. E.g. dog -> bark.

Inputs: word (required), limit, language.

dictionary_derived_fromC

Derivation relations via offline ConceptNet DerivedFrom.

Inputs: word (required), limit, language.

dictionary_etymologyA

Return etymology text for a word from the offline Wiktextract corpus.

Inputs: word (required), language.

dictionary_holonymsB

Holonyms (wholes that contain this word) via offline ConceptNet reverse PartOf.

Inputs: word (required), limit, language.

dictionary_hypernymsA

Hypernyms (broader concepts) via offline ConceptNet IsA. E.g. dog -> mammal.

Inputs: word (required), limit, language.

dictionary_hyponymsB

Hyponyms (narrower concepts) via offline ConceptNet IsA. E.g. dog -> poodle.

Inputs: word (required), limit, language.

dictionary_installA

Manually kick off (or re-trigger) the offline data download. Returns immediately while the install runs in the background. Idempotent — calling repeatedly while a download is in progress is a no-op. Use dictionary_status to track progress.

Inputs: no named parameters.

dictionary_lookupA

Look up definitions for a word from the offline Wiktextract corpus (4,755 languages, 10.5M entries). Returns part-of-speech, definitions per sense, IPA, etymology, and translations grouped by language.

Inputs: word (required), limit, language.

dictionary_means_likeA

Find words/phrases meaning approximately the same as the input via offline Numberbatch embedding cosine. Multilingual — works in any of the 78 languages Numberbatch covers.

Inputs: query (required), limit, language.

dictionary_meronymsC

Meronyms (parts/components) via offline ConceptNet PartOf. E.g. car -> wheel.

Inputs: word (required), limit, language.

dictionary_pronunciationB

Return IPA pronunciation(s) for a word from the offline Wiktextract corpus.

Inputs: word (required), language.

dictionary_randomA

Return a random word entry from the offline Wiktextract corpus, optionally filtered to a language.

Inputs: language.

dictionary_rhymesA

Find words that rhyme with the input word. English only — backed by the offline CMU Pronouncing Dictionary.

Inputs: word (required), limit, perfect.

dictionary_semantic_neighborsA

Embedding-based nearest neighbors via Numberbatch. Returns words from the same OR a different language, sorted by cosine similarity. Multilingual (78 languages).

Inputs: word (required), limit, language, targetLanguage.

dictionary_sounds_likeB

Find English words that sound similar to the input (homophones / soundalikes) via offline CMU dict.

Inputs: word (required), limit.

dictionary_spelled_likeA

Find English words matching a spelling pattern via offline CMU dict. '?' = any single letter, '*' = any zero+ letters. Useful for crosswords.

Inputs: pattern (required), limit.

dictionary_statusA

Get the current state of the offline data installation. Always available — even before the bundle has finished downloading. Returns: state (pending/downloading/ready/failed), per-artifact progress, total bytes downloaded, data directory, CDN URL, manifest version, and any error.

Inputs: no named parameters.

dictionary_suggestA

Get autocomplete suggestions for a partial English word via offline CMU dict (shortest matches first).

Inputs: prefix (required), limit.

dictionary_summaryA

Get a brief plain-text summary of a word's senses from the offline Wiktextract data. Concatenates the first definition of each sense.

Inputs: word (required), language.

dictionary_synonymsA

Get synonyms for a word in any language using the offline ConceptNet 5.7 SQLite (24M edges, 80+ languages).

Inputs: word (required), limit, language.

dictionary_translateC

Translate a word to another language via offline ConceptNet's cross-lingual Synonym links. Returns the same concept expressed in different languages.

Inputs: word (required), limit, language, targetLanguage.

dictionary_used_forB

Typical uses (UsedFor) via offline ConceptNet. E.g. knife -> cutting.

Inputs: word (required), limit, language.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 28 tools

    Disambiguation5/5

    Each tool targets a specific linguistic relation or operation with clear, distinct descriptions. Even potentially overlapping tools like synonyms, means_like, and related are differentiated by their underlying data sources (ConceptNet vs Numberbatch embeddings).

    Naming Consistency5/5

    All tools follow a consistent 'dictionary_' prefix followed by a descriptive snake_case name. The pattern is uniform with no mixing of conventions or styles.

    Tool Count4/5

    28 tools is on the higher end but justified by the comprehensive coverage of dictionary features (definitions, etymology, pronunciation, semantic relations, search, data management). It remains manageable and focused.

    Completeness5/5

    The tool surface covers a wide range of dictionary and lexical relations: definitions, pronunciations, etymology, synonyms, antonyms, hypernyms, hyponyms, meronyms, holonyms, translations, rhymes, spelling, autocomplete, random access, and data installation status. No obvious gaps for the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers