multilingual-dictionary-mcp
多语言词典 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.comClaude Desktop / Claude Code 配置
{
"mcpServers": {
"multilingual-dictionary": {
"command": "npx",
"args": ["-y", "multilingual-dictionary-mcp"]
}
}
}工具
多语言词汇关系 (ConceptNet)
所有这些工具都接受 word(单词)、ISO 639-1 language(语言)代码(默认为 en)以及 limit(限制)。适用于英语、西班牙语、法语、德语、意大利语、俄语、希伯来语、阿拉伯语、拉丁语、中文、日语等 70 多种语言。
工具 | 描述 |
| 意思相近的词 |
| 反义词 |
| 松散关联的词(RelatedTo 边) |
| 更广泛/父级概念(狗 → 哺乳动物) |
| 更具体/子级概念(狗 → 贵宾犬) |
| 部分/组件(汽车 → 车轮) |
| 包含此项的整体(车轮 → 汽车) |
| 词源词根 |
| 跨语言的同源词和共享词根 |
| 典型用途(刀 → 切割) |
| 典型动作(狗 → 吠叫) |
| 典型位置(书 → 图书馆) |
| 跨语言同义词 — 翻译单词 |
| 一次调用获取单词的所有关系 |
定义与词源 (Wiktionary)
工具 | 描述 |
| 按语言分组的定义(通过 en.wiktionary 支持 4000 多种语言) |
| 来自任何 Wiktionary 版本的简短纯文本摘要 |
| 词源部分,纯文本 |
| 发音部分(通常为 IPA) |
| 在 Wiktionary 版本中搜索匹配页面 |
| 来自任何 Wiktionary 版本的随机单词 |
英语专用工具 (Datamuse)
工具 | 描述 |
| 完全或近乎押韵的词 |
| 同音词 / 听起来相似的词 |
| 基于机器学习的“意思大致相同” — 比同义词范围更广 |
| 使用 |
| 自动补全 |
| 统计学上关联的词(牛 → 牛奶、农场) |
| 通常跟在后面的词(喝 → 咖啡) |
| 通常出现在前面的词(观众 → 俘虏) |
缓存管理
工具 | 描述 |
| 检查内存中响应缓存的命中/未命中/大小情况 |
| 通过清除缓存强制进行新的上游查询 |
缓存
每次成功的上游响应都会在服务器进程的生命周期内缓存在内存中,并以完整的请求 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 specsCI / 发布
CI 在每次推送到
main分支以及提交 PR 时运行,基于 Node 20 和 22。发布 在发布 GitHub Release 时运行 — 执行测试、构建,然后发布到 npm(作为
multilingual-dictionary-mcp)和 GitHub Packages(作为@eyalm321/multilingual-dictionary-mcp)。
发布步骤:
在
package.json中增加version并提交。打标签并推送(例如
git tag v0.1.1 && git push --tags)。创建指向该标签的 GitHub Release — 发布工作流将处理其余事项。
发布工作流需要两个仓库密钥:NPM_TOKEN(npm 自动化令牌)和 GITHUB_TOKEN(由 GitHub Actions 自动提供)。
许可证
MIT © Eyalm321
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Eyalm321/multilingual-dictionary-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server